Home RAP
New Blog Posts: Merging Reports - Part 1 and Part 2

What's wrong with this?

edited September 2007 in RAP
Hello,
I know this must be easy for most of you, I'm a novice at this. I
don't see what's wrong in the example below.I'm trying to print a report
that only shows certain workorders, DBdetail WOID. Actually I want to be
able to select several workorder id & have them display in a report, so I
thought I'd try just 1, but it did not compile. If this is easy to solve ,
can you tell me how to list several DBdetail WOID's in one report.Also what
would be the difference in between doing this BeforeGenerate as opposed to
BeforePrint?

Thanks for any ideas
Chris

Comments

  • edited September 2007
    Hi Chris,

    I gues it should be

    if DBdetail['WOID'] = 13165 then

    Kind regards
    Ruediger Kabbasch
  • edited September 2007
    Thanks, it compiled correctly, but how would i list multiple numbers within
    an If statemanet?
    if
    DBdetail['WOID'] = 13165
    DBdetail['WOID'] = 14164
    DBdetail['WOID'] = 12134
    DBdetail['WOID'] = 12097 then
  • edited September 2007
    IF ((DBdetail['WOID'] = 13165) OR (DBdetail['WOID'] = 14164) OR ... Then

    or if the list is longer use a boolean variable

    e.g.

    isTrue = ((DBdetail['WOID'] = 13165) OR
    (DBdetail['WOID'] = 14164) OR
    ...
    );

    If there is an IN statement in RAP (I do not know) maybe this could work:

    IF (DBdetail['WOID'] IN [13165, 14164, ...]) Then

    Kind regards,
    Ruediger Kabbasch


  • edited September 2007
    Thanks, I'll give it a try.
This discussion has been closed.