Focal Point
[SOLVED] HIGHTEST 1 DATE Default in Parameter

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

August 31, 2010, 02:01 PM
Arif
[SOLVED] HIGHTEST 1 DATE Default in Parameter
I wrote a repot that I will be posting on my dashboard and I want to caster a job for this report also. This report has parameter that needs to be passed in parameters.

Following is the issue:
This report should run in report caster with HIGHEST 1 DATE, so I have a BY field HIGHEST 1 DATE but when user runs it from the dashboard as live report user see a parameter screen and pass date in the parameter. At the moment i have to maintain two FEX files one for the caster and one for live report. Is there a way I can have WHERE condidion with HIGHEST 1 DATE in the report caster so i dont have to maintain two seperate procedures one for live and other for the report caster?

Arif

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.10
Windows
HTML
August 31, 2010, 05:33 PM
Darin Lee
Yeah, Just set a variable that tell the procedure whether or not it is being run through RC and then brach accordingly when it is. Use -DEFAULTH &var='N' in the procedure but set &var to 'Y' in the RC task (Advanced button)


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
September 01, 2010, 10:15 AM
Arif
Thanks for the tip but I think I still dont know how would I say
IF &CAST EQ Y THEN SORT IT BY HIGHEST 1 DATE ELSE SORT it by user defined date? Can you give me an example? Following is my procedure:
For CASTER
  TABLE FILE TEST
SUM
Field1
Field2
BY HIGHEST 1 DATE
END

FOR LIVE REPORT
TABLE FILE TEST
SUM
Field1
Field2
BY DATE
WHERE DATE EQ '&DATE.(FIND TEST.DATE,TEST.FYPW IN TEST).DATE.';
END




How do I make it one procedure?

Arif


WebFOCUS 7.6.10
Windows
HTML
September 01, 2010, 11:00 AM
Tony A
There are many solutions to this although one I use is something like this -

-SET &Cmt1 = IF &DSTJOBID.EXISTS THEN '' ELSE '-*';
-SET &Cmt2 = IF NOT &DSTJOBID.EXISTS THEN '' ELSE '-*';
TABLE FILE TEST
SUM
Field1
Field2
&Cmt1.EVAL BY HIGHEST 1 DATE
&Cmt2.EVAL WHERE DATE EQ '&DATE.(FIND TEST.DATE,TEST.FYPW IN TEST).DATE.';
END


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 
September 01, 2010, 10:21 PM
Arif
Thank you!


WebFOCUS 7.6.10
Windows
HTML