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, GaganThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
October 09, 2018, 11:15 AM
MathematicalRob
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.
October 09, 2018, 12:41 PM
FP Mod Chuck
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