Focal Point
Saving WHERE statements

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6831057732

July 19, 2007, 10:16 AM
<Jax>
Saving WHERE statements
Does anybody in the Focus Nation have a way to retain WHERE conditions from a user's session when filtering on dropdowns? We anticipate two or three dropdowns for filters in addition to dates. Optimally the user would have access to the filters and be able to run a the report in the future applying different dates by clicking on an HTML list of saved filters.

Next question - if you have a way to retain the filters how do you delete old WHERE statements.

Thanks to all!
Production: WF 7.6.1
Test: WF 7.1.4
July 19, 2007, 11:18 AM
Darin Lee
There is "Save Entered Values" functionality which I think will provide what you are looking for. The functionality must be turned on for a each specific user, and then after entering parameters, the user has the option of saving them from the HTML launch screen and giving the parameter set a report name. The parameters are saved in the user's "My Reports" under "Saved Parameters Reports"


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 19, 2007, 03:59 PM
<Jax>
Darin – thanks! I'll suggest that to the client. Right now they are not working with users' "My Reports" but it is worth mentioning.

In earlier discussions the users had a mentioned a preference to just keep named code snippets that would be available in a dropdown box. If anybody else has had success with just saving a code string for later access in a dashboard please let me know.
July 19, 2007, 04:31 PM
Darin Lee
All this functionality really does is set default values for parameters and then -INCLUDE a fex. I'm sure you could duplicate this with a few simple fexes that could write out the fex code for the -DEFAULTs and -INCLUDEs to an appropriate folder using parameter values.
This is the contents of the fex that goes into "My Reports."
 -IF &OUTPUT.EXIST EQ 1 THEN GOTO INCFEX;
-DEFAULTS &OUTPUT=PDF;
-IF &PARM1.EXIST EQ 1 THEN GOTO INCFEX;
-DEFAULTS &PARM1= 1;
-IF &PARM2.EXIST EQ 1 THEN GOTO INCFEX;
-DEFAULTS &PROCESS=Y;
-IF &PARM3.EXIST EQ 1 THEN GOTO INCFEX;
-DEFAULTS &EXCL=N ;
-INCFEX
-INCLUDE app/testfex.fex
 


You could then read the contents of the directory back in and populate a dropdown with the name of those fexes. This is all "in theory" but I don't see a reason why it wouldn't work.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
July 19, 2007, 05:55 PM
Tony A
One method that I used at a previous Client was to have a JS function that read through the whole DOM and, if the value for the control wasn't the default option, write a list of parms that were then written to an MS SQL table. The JS module also had functions for loading the saved variables.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10