Report with multiple dataitems

ramsay18477ramsay18477 Member Posts: 52
Hi,

Iam designing a report with multiple dataitems which are not linked to each other with the intention of processing only the dataitem that the user chooses.

But, the report always processes the first dataitem even though I've chosen the second one and I've written a check to 'EXIT' if that dataitem is not chosen. It always goes into the section of the unchosen dataitem, exits because of the check, then goes into the 'On after get record', again exits because of the check and repeats the process continuously. I think goes into a loop for the number of records in that dataitem and processes for each record.

I would like to know if there is a way by which only the dataitem that is chosen is processed and all others are excluded.

Thanks.
Thanks & Best Regards,

Ram.

Answers

  • prototyperprototyper Member Posts: 70
    At a quick thought you should be using CurrReport.BREAK not exit (??)
    Sleep on it... The best solutions come at 2am
  • ramsay18477ramsay18477 Member Posts: 52
    Hi prototyper,

    Thanx a lot for your advise.

    I tried using 'BREAK' but it still comes back to the pre dataitem where I've written the 'BREAK' in the check.

    Actually, the report structure is like this :-

    DataItem1
    |_ Integer (Under Dataitem1)
    DataItem2

    The process gets trapped in the triggers of the 'Integer' dataitem, which is under DataItem1, even with the checks whereas it 'EXITS' successfully from DataItem1 because of the check.

    Thanks again.
    Thanks & Best Regards,

    Ram.
  • prototyperprototyper Member Posts: 70
    OK. What link do you have between dataitem 1 and Integer ? do you have "Print only if detail" set on integer ?
    Sleep on it... The best solutions come at 2am
  • BeliasBelias Member Posts: 2,998
    directly from the help online:
    BREAK (Dataport, Report, XMLport)
    Use this function to exit from a loop or a trigger in a data item trigger of a dataport, report or XMLport.
    break get out from the trigger where you put it, but if this trigger is executed before onaftergetrecord (and i think it's your case), nav will break exec of the current trigger and then proceeds to the next one (e.g. onfatergetrecord).

    solution: put currreport.break in onaftergetrecord, too.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • ramsay18477ramsay18477 Member Posts: 52
    Hi Prototyper / Belias,

    Thanx again.

    No, there are no settings for Integer.

    The print only if detail is set to No by default.

    Only the Data Item Link is set to 'DataItem1' which is default as it is indented.

    Anywayz, I think I've solved it thanks to you guys.

    I put the break right at the on pre-data item of DataItem1 so that it doent go further at all.

    Thanx a lot again.
    Thanks & Best Regards,

    Ram.
Sign In or Register to comment.