Home » Developer & Programmer » Reports & Discoverer » Changing report order using the Break Order property
Changing report order using the Break Order property [message #88588] Tue, 26 November 2002 21:05 Go to next message
Evan Briggs
Messages: 12
Registered: November 2002
Junior Member
I am trying to allow the user to pick the order of the report's data. This has lead me to ask the following questions:

How can the Break Order property of a Database Column be set at runtime, specifically in the Before Report program unit??? (changing the ORDER BY clause in the SQL query will not be sufficient because report builder enforces that at least one column’s Break Order in each Group, other than the lowest one, must be set at design time)

How can the order of the Database Columns in a Group be re-arranged at runtime, specifically in the Before Report program unit???

Thanks for any help that you can provide.
Re: Changing report order using the Break Order property [message #88600 is a reply to message #88588] Mon, 02 December 2002 14:07 Go to previous messageGo to next message
feng
Messages: 10
Registered: November 2000
Junior Member
PROBLEM DESCRIPTION: ==================== How do you change the sort order in a select statement by way of user parameters? SOLUTION DESCRIPTION: ===================== Use a lexical parameter for the "SORT ORDER" or "ORDER BY" portion of the query. Solution Explanation: ===================== For example: Select ename, sal, mgr from emp order by &P_1; Remember to give the parameter P_1 a valid initial value. Search Words: orderby
I found a work around. Thanks Feng. [message #88601 is a reply to message #88600] Mon, 02 December 2002 17:57 Go to previous message
Evan Briggs
Messages: 12
Registered: November 2002
Junior Member
Thanks for your help Feng.

I have worked around the problem by using figure 2 rather that figure 1 in the Data Model.

------------------------------------------
Figure 1:
Query1 -> Group1 -> Group2

Figure 2:
Query1 -> Group1 -> Query2 -> Group2
------------------------------------------

Using figure 2 does not require me to set any break order columns at design time. Therefore I can have full control of the report's order at run-time by changing the "order by" part of the queries.

Thanks again.
Previous Topic: Search records
Next Topic: Urgently needed help .. abt forms 6i
Goto Forum:
  


Current Time: Wed Apr 24 18:57:20 CDT 2024