How to skip certain lines in a band?

  • Hello

    I need to skip certain lines in a band. I've tried a couple of different approaches, but noone is working :-(

    1. I turn on the wpeUseBandStartAsCondition of SuperMerge object and use formula which returns TRUE or FALSE according to the data in Before Process Startcode. This is just ignored. (TWPSuperMerge.Evaluate never changes pResult unless )

    2. I am using BeforeProcessGroup Event and turn ProcessGroup to FALSE. But in this case the entire process of the band is stopped. According to the code FALSE in Before Process Startcode will have same affect once will work.

    Do you have any suggestions how to solve it or any other way how to achieve required functionality

    Thanks in advance
    Vitaly Gamarnik

  • Hello,

    Now I am trying to skip the entire band using the condition in Before Process Startcode and wpeUseBandStartAsCondition turned on.
    As I stated before it seems that TWPSuperMerge.Evaluate never changes pResult.

    Can you please provide some solution?

    Vitaly Gamarnik

  • Hi,
    I didn't get any response so far :-( Can anybody tell me if it is possible to make a condition in Before Process Startcode work? Is it just a bug or I doing something wrong?
    Will it be fixed or I have to fix it on my own? I would prefer to not change the component code to avoid possible trouble with the next updates.

    Thanks
    Vitaly Gamarnik

    • Offizieller Beitrag

    Hi,

    I suggest to use the OnPrepareBand event to skip this. It is probably much simpler to implement than to use the start code. Usually the startcode is only used to initailize variables. The Condition worked but iot is also dangerous since it is not save agaianst endless loops.

    So if you use OnPrepeareBand you can set abort according to your condition. Use the alias name of the band for the condition.

    Julian

  • Hi Julian,

    First of all I cannot find the event OnPrepareBand. Did you mean BeforeProcessGroup?

    The second problem is that this condition is specified by user (We made a report generator used your tools). So do you suggest just reevaluate the StartCode again in order to change band availability?

    Vitaly

    • Offizieller Beitrag

    Hi,

    I meant OnPrepareText, OnPrepareHeader and OnPrepareFooter. BeforeProcessGroup can be also used. This thre events do more or less the same for different kinds of bands.

    >>So do you suggest just reevaluate the StartCode again in order to change band availability?<<

    Yes, you can read it out and pass it to the eval engine or a different interpreter. This makes it easier to debug and you can also add an emergency exit.

    julian