Jump to content

order of report


balakrishnank86

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

 

You would probably have to do this in the query via the ORDER BY clause.

ORDER BY accepts column names, expressions or result column sequence numbers, e.g.

 

ORDER BY mycol

ORDER BY price-discount

ORDER BY 2

 

So if there is a simple way in the context of your report to get the user to specify one of these via a parameter then you can do

 

ORDER BY $P!{myparam}

 

Peter Gale

Ingres Corporation

Link to comment
Share on other sites

I want to confirm that this does work. We have a few reports where the user can specify the column they want the report to be sorted on. The GUI has the column in the same order as they are on the report. When they choose a column I pass the column number to the report and use ORDER BY $P!{myparam}. Make sure the columns are in the correct order in your select clause of your SQL if you plan to do the number method.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...