Variable Level Breaks and Sequence

pdubbelm

Member
Hi All,

I'm trying to build a report with a variable Data Sequence. So far, the sequence is working fine using the System Function "Set User Sequence", but I'm still having problems with the Level Breaks.

I added all BSVW-columns I want to be able to break on in the Data Sequence and added Level Breaks to them. I overwrite the sequence using "Set User Sequence". This works fine, but the report keeps making Level Breaks on the fields I'm not using in the new sequence.

Is there any way to turn off the Level Break mark on a selected field in the sequence?

Attached to this post is an image of the Sequence I set on the Section. I want to be able to sequence/break on either AN8, SHAN or PA8.

Cheers,

Paul.
 

Attachments

  • 80115-R56S015 - Data Sequence.jpg
    80115-R56S015 - Data Sequence.jpg
    16.2 KB · Views: 141
Ha bibi,

Are you using the 'Set Sequence Append Flag' before calling the 'Set User Selection. It is a system function and the append flag should be set to No.

I don't think you can turn off level breaks via event rules.
You could create a workfile in which you load the BC column on which you want to break (so AN8, PA8 or SHAN, depending on the user's choice) and then make a new section and put a level break on that BC column.


p.s. waarom bel je ons niet gewoon? haha - hoe kom je in hemelsnaam aan 4 sterren?
 
Hi Paul,

Does your "un-used" level breaks contain ER logic?
a.) if not, then you can simply issue a Hide or a SuppressSectionWrite for them from ER.
b.) if yes, you should further to issue a StopEventProcessing or StopSectionProcessing or place the logic into a conditional IF statement body.

There is other tricks to play with level-breaks.
You can manipulate BC fields in the BeforeLevelBreak event, simulating, that the value does not changes - so the connected level-break won't be fired.
You can examine this technique in the R04570 Create Payment Groups batch application.

I've used this technique more times with success.
I've also write about it more than one times here, on the Developers Forum.

Hope, this helps a bit.

Regards,

Zoltán
 
Hi,
I have various experiences regarding this issue... In older versions if you changed sequencing - e.g. you inserted non-level-break fields before the level break fields - the level breaks were executed correctly. Now it seems that level break is meant to be a break on the designated field and all fields above - regardless of the actual sequence.
Zoltán's solution about manipulating BC fields works all right but in complicated cases I found "Programmed" level break better.
- Set the sequence with "Set User Sequence" calls
- Program your break logic in "Do Section"
- Program the last break logic in "End Section"
Use conditional sections as LB header and footer.
Regards:
Gergely Pongrácz
e-Best, Hungary
 
Back
Top