I have sql report(Oracle database) which has prompt in it.I created list box in html composer from my prompt with multiple select option enable.If i select single value in list box i am able to run my report but when i select multiple values i am getting an error.
Here is the sample prompt in where clause.
Where VP.ID IN (&ID)
When i select mulitple values i was not able to replace OR with ,
I need to know how webfocus will process the prompts and i need to print and check how the value submitted in prompt is effecting my sql code dynamically.
Can you guys help me to figure out how to acheive this.It would be great help for me.
Thanks, RakeshThis message has been edited. Last edited by: Rakesh Boddu,
WebFOCUS 8.0.03 Windows, All Outputs
March 25, 2014, 10:32 AM
MattC
You can do the following.
The variable being passed from the HTML, you can get the length first, then use STRREP to replace the OR with a ,
Then I like to truncate to remove all the spaces.
-SET &WhereVPLength = &VP.LENGTH;
-SET &WhereVPAdjust = IF &VP CONTAINS ' OR ' THEN STRREP (&VP.LENGTH, &VP, 4, ' OR ', 1, ',', &VP.LENGTH, 'A&WhereVPLength.EVAL') ELSE &VP ;
-SET &WhereVPTru = TRUNCATE(&WhereVPAdjust);
This message has been edited. Last edited by: MattC,