Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


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

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Passing Dynamic Date Parameter
 Login/Join
 
Silver 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: 29 | Registered: September 05, 2017Report 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: 88 | Location: MI | Registered: July 23, 2009Report 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: 2128 | Location: Customer Support | Registered: April 12, 2005Report This Post
Silver Member
posted Hide Post
Thank both for your input. Smiler


WebFOCUS 8
Windows, All Outputs
 
Posts: 29 | Registered: September 05, 2017Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

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

Copyright © 1996-2020 Information Builders