Thanks....lots of fixing to do!

Marc

----- Original Message ----- From: "Lawrence Lustig" <[EMAIL PROTECTED]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, June 19, 2008 1:36 PM
Subject: [RBASE-L] - Re: Printing reports break points Order by


<<
So do you need an Order by clause ?  Does it
help?


No, it hurts.  If you have breakpoints, don't use an ORDER BY clause.

<<
If you want to have the same report but Order it by
custnum or Lastname ... do you
have to have 2 different
reports?


You can deal with this in a number of ways:

1. Have a report with no breakpoints -- you are free to use an ORDER BY clause to determine how this prints.

2. Manipulate the data so that the same report takes on a different appearance when printed. For instance, add columns SORT1, SORT2, and SORT3 to your table and set your breakpoints on these columns. Before you print, update SORT1 with the customer number if sorting by number, or the customer name if sorting by name. Better yet, base the report on a temporary view with extra columns to handle the sorting and recreate the view immediately before printing with the user-specified columns in the extra columns used to specify sort order.

This works best if you don't have data placed in your break headers and footers (since that data layout would likely be different for different sort orders). But even there, if you're willing to limit what appears in those report sections you can use the method described above and simply add extra columns like BREAKNAME1 and so on to store the data.

There are a few situations in which you may really want to combine report breaks and ORDER BY -- for instance, if the _first_ breakpoint is always the same (eg State), and is heavily formatted while the following breakpoint changes and has no header or footer (eg Customer Number vs Customer Name). In this case you can use the report break and then an ORDER BY to control the second level sorting, but they must have the same number of entries.
--
Larry




Reply via email to