Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] HIGHTEST 1 DATE Default in Parameter
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] HIGHTEST 1 DATE Default in Parameter
 Login/Join
 
Guru
posted
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
 
Posts: 294 | Registered: March 04, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Guru
posted Hide Post
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
 
Posts: 294 | Registered: March 04, 2010Reply With QuoteReport This Post
Expert
posted Hide Post
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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Guru
posted Hide Post
Thank you!


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] HIGHTEST 1 DATE Default in Parameter

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.