March 01, 2007, 06:01 AM
<Andr33a>Compound report generated by multiple values
Hello,
I have I problem with a compound report; I want that this report to run for multiple values that I introduce into a text box from an invite window.
I have an invite window with a text box in which I can introduce multiple values, delimited by β;β. After I introduce that values, a report (a compound report, made of 2 reports: Rap1 + Rap2) is generated.
If I introduce a single value in the text box, the report is generated OK.
The problem appears when I introduce multiple values in the text box (ex. val1; val2); the report that I get in this situation is not OK:
Rap1 for val1
Rap2 for val1 + val2
In this moment I have created a JavaScript for the parameter that is introduced in invite window and is passed to the report as βval1 OR val2β; in the reports Rap1 and Rap2 I tested if the corresponding column is equal with this parameter.
So, what I want is that for the values introduced in the invite window, to obtain a final report that looks like this:
Rap1 for val1
Rap2 for val1
Rap1 for val2
Rap2 for val2
Can you give me a suggestion regarding this problem?
Thanks for your support,
Andreea
March 01, 2007, 06:38 AM
Alan BAndreea
Try this.
In your javascript, instead of setting the values with an OR in, set up the field to look like this:
&VAR1=val1,&VAR2=val2
and send that across to the focexec (in my example I call the input field on the form myScreen.
In the focexec
-DEFAULTS &mySreen.EVAL
-SET &CNTR=1;
-:MYLAB
report1
WHERE field EQ &VAL.&CNTR
report2
WHERE field EQ &VAL.&CNTR
-SET &CNTR=&CNTR+1;
-IF &VAL.&CNTR.EXIST GOTO :MYLAB;
I think this will work for what you want.
(My first real reason to use .EVAL!)