Jump to content
The ibi Community has moved to a new platform: Please Sign In and choose Forgot Password to continue

In the html composer, is it possible to have a chained parameter automatically pass all options to the report?


Keith Lyles

Recommended Posts

Using the composer, would like a chained parameter to automatically send all options to the report without the end user having to select them.

Example: Using the CAR file if the CAR field was used to populate a dropdown have it chained to another control that would automatically send all the different models for that car to a report when the “Run” button is hit without the end user having to select them. Currently can only get the first model to automatically send to the report.

Using WebFOCUS 8.207.27

Link to comment
Share on other sites

I tried using IbComposer_setCurrentSelection in conjunction with IbComposer_getCurrentSelectionEx (see code below) but using the Javascript only the last model of the car selected is passed to the report but still not all model values automatically passed for the car selected.

function carcontrol_onchange(event) {

var values = IbComposer_getCurrentSelectionEx('carcontrol');

 for(var i = 0; i < values.length; i++)

{

IbComposer_setCurrentSelection('modelcontrol',values.getDisplayValue(),'false');

}

}

Link to comment
Share on other sites

I don't think I have ever seen such a feature in App Studio.

One way to accomplish this would be to have some code that would, for the given CAR value, populate the values for that CAR into a variable. Something like this:

-DEFAULTH &CAR = 'BMW';-DEFUALTH &MODELS = ' ';  TABLE FILE CAR SUM COMPUTE MODELS/A500V = LAST MODELS | MODEL || ' / '; BY MODEL NOPRINT WHERE CAR EQ '&CAR' ON TABLE HOLD AS MODELS1 END  TABLE FILE MODELS1 SUM LST.MODELS ON TABLE HOLD AS MODELS2 END-RUN-READFILE MODELS2 -TYPE *&MODELS*
Link to comment
Share on other sites

One more alternative

 -* File: IBFS:/localhost/WFC/Repository/Personal_Resources/Patrick/Procedure1.fex Created by WebFOCUS AppStudio -SET &ECHO=ALL; -SET &MY_VALUE='0'; -SET &COUNTRY=''; -RUN TABLE FILE CAR BY COUNTRY -* ADD FILTER WITH VAIABLE HERE ON TABLE HOLD AS MY_LISTE FORMAT ALPHA ON TABLE SET HOLDLIST PRINTONLY END   -RUN   -REPEAT L_LOOP1 &LINES TIMES;   -READFILE MY_LISTE   -SET &MY_VALUE= IF &MY_VALUE.QUOTEDSTRING EQ '0' THEN 'Values: ' | TRUNCATE(&COUNTRY) ELSE &MY_VALUE || ', ' | TRUNCATE(&COUNTRY);   -TYPE &MY_VALUE   -L_LOOP1   TABLE FILE CAR SUM SALES BY COUNTRY HEADING "&MY_VALUE.EVAL" END
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...