Report sorting and breaks

J

Jim Stoaks

I have a report that is run off of a sorted query. I want the report to
break on a different field than what the report is sorted on. However, when
I setup the break it re-sorts the data on the break field. How can I keep
the data as it is pre-sorted and break on a different field without it
re-sorting the data?

Thanks,
Jim
 
D

Duane Hookom

Sorting and grouping in a report mostly ignores the sorting of your query.
Creating a "break" is done in the sorting and grouping dialog.

If this doesn't get you on the proper track, you will need to provide some
sample data and how you would like it displayed/grouped in your report.
 
J

Jim Stoaks

I am sorting on a WBS code that looks like xx.yy.zz
I sort on the entire code and want to break on xx and yy so that the report
will look like:
01 AAAAAAAAAA
01.01 BBBBBBBBBBBB
01.01.01 CCCCCCCCCCCC
01.01.02 DDDDDDDDD
01.02 EEEEEEEEEE
02 FFFFFFFFFF
..
..
..
I have figured out that if I break on each part of the WBS and sort by the
whole WBS I can get it to format correctly except that if the part of the WBS
is null it stills prints a line. How can I get the report to skip printing
the line if a field contains a null?
 
D

Duane Hookom

You can use code in the Section's On Format event like:
Cancel = [Enter your true/false expression here]
 
Top