Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Column Order Preference? #2

Open
Peardian opened this issue Jan 9, 2013 · 2 comments
Open

Feature Request: Column Order Preference? #2

Peardian opened this issue Jan 9, 2013 · 2 comments

Comments

@Peardian
Copy link
Contributor

Peardian commented Jan 9, 2013

Perhaps you could have a way to set the preferred order for columns in a report?

For example, in the report I am doing, if the first order in the list is a new order, the Order ID column is added at the end (as I intended), but if the first order is already in the system, the Order ID column is put in the middle. It would nice to be able to have a way to make the column always be last (or anywhere else in order) without having to create a bunch of empty columns.

@carl689
Copy link
Owner

carl689 commented Jan 20, 2013

Can you give me a code markup example?

@Peardian
Copy link
Contributor Author

Possible usage example:

$r = new cReport;
$myPref = array("name", "age", "height", "weight");
$r->setOrderPreference($myPref);
//(data sets added as normal)

Data sets given: name, age, weight, city
Resulting table: name, age, weight, city
(does not create unnecessary columns even if defined in the preference)

Data sets given: userID, height, name, age, city
Resulting table: name, age, height, userID, city
(names in the preference come before new ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants