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     [CLOSED] Passing Dynamic Date Parameter
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Passing Dynamic Date Parameter
 Login/Join
 
Member
posted
Hello all,

I am trying to schedule a report for a customer and for the date parameters I would like to pass dynamic date range. For Example:

Begin Date: One year in past from today's date
End Date: Current Date/Today's date

Is there a way to pass this in the text field when scheduling a report? This will allow them to receive a scheduled report without running a report and choosing parameters every week.

Thank you,
Gagan

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 28 | Registered: September 05, 2017Reply With QuoteReport This Post
Gold member
posted Hide Post
Gagan,

You can easily calculate these dates in a procedure. Once you have done so, you can call that procedure as a pre-processing procedure in Report Caster.

I have a report where I calculate some parameters using SQL. Then, I read those parameters into my variables in the pre-processing procedure something like this:

SET HOLDLIST=PRINTONLY
TABLE FILE SQLOUT
PRINT
     AIDY_CODE/A4
     PAYNO/A2
     YEAR/A4
     AID_PERIOD/A3
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS PARAMS FORMAT ALPHA
END
-RUN
-READ PARAMS &aidy.A4. &payno.A2. &year.A4. &period.A3.


In your case it might be easier to do the necessary calculations using Dialog Manager code rather than SQL or FOCUS.

- Rob


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 86 | Location: MI | Registered: July 23, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Gagan

Rob has the right idea of using a pre-processing procedure. You can set a variable for the previous year


-SET &PYEAR_DATE=AYMD(&YYMD,-365,'I8YYMD');


And use &YYMD for the current date and &PYEAR_DATE for the previous year in you report caster fex WHERE statement


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1592 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Member
posted Hide Post
Thank both for your input. Smiler


WebFOCUS 8
Windows, All Outputs
 
Posts: 28 | Registered: September 05, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Passing Dynamic Date Parameter

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