Keith Lyles Posted August 7, 2023 Share Posted August 7, 2023 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 More sharing options...
Patrick Huebgen Posted August 8, 2023 Share Posted August 8, 2023 Do you really need to send all values individual - if not why not using the "All" Option? Link to comment Share on other sites More sharing options...
Keith Lyles Posted August 8, 2023 Author Share Posted August 8, 2023 Hi Patrick,In this case all values need to be sent as they will be displayed in a footer in the output. Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted August 8, 2023 Share Posted August 8, 2023 Did you looked into IbComposer_setCurrentSelection Javascript https://docs.tibco.com/pub/wf-as/8207.28.0/doc/pdf/TIB_wfas_8207.28.0_users_guide.pdf?id=0 Link to comment Share on other sites More sharing options...
Keith Lyles Posted August 8, 2023 Author Share Posted August 8, 2023 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 More sharing options...
David Beagan Posted August 8, 2023 Share Posted August 8, 2023 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 More sharing options...
Patrick Huebgen Posted August 8, 2023 Share Posted August 8, 2023 Like your idea! Link to comment Share on other sites More sharing options...
David Beagan Posted August 8, 2023 Share Posted August 8, 2023 Thanks. Link to comment Share on other sites More sharing options...
Keith Lyles Posted August 8, 2023 Author Share Posted August 8, 2023 Thanks, David! Really like the idea and got most of it to work but for some reason I'm running into issues loading the readfile into a parameter. Suspect it's something I'm doing or not doing so will try and figure it out. Link to comment Share on other sites More sharing options...
David Beagan Posted August 8, 2023 Share Posted August 8, 2023 You are welcome. Be sure to have a -RUN before the -READFILE. Link to comment Share on other sites More sharing options...
Patrick Huebgen Posted August 8, 2023 Share Posted August 8, 2023 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 More sharing options...
Keith Lyles Posted August 8, 2023 Author Share Posted August 8, 2023 Thanks, Patrick! That works like a charm as well Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now