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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Passing Parameter Values in Report Caster

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Passing Parameter Values in Report Caster
 Login/Join
 
Platinum Member
posted
I have a report that is in production that prompts for a term code and a date. I now want to put it into Report Caster and have it default to the current term code and system date.

How can I pass those into the report without having to modify the report?

I can create 2 procedures that would get the 2 parameters and put them in amper variables. I tried running them as PRE-PROCESS procedures but that doesn't seem to work.

The best that I've been able to come up with is to put a -INCLUDE in the report and that works. However I lose the prompting capabilty. I suspect I could figure that out with -SET or -DEFAULT if I thought about it long enough.

But this isn't a one time shot. We often will have a report in production and then decide to put it into Report Caster. So it would be nice if there was a way to pass the variable into the report from Report Caster without having to modify the report fex.

Here are my 2 -INCLUDE FEXs.
There are obviously many ways to skin this part of the cat. I could just as easily have used native WebFOCUS code vs. SQL passthru, but that isn't the challenge.

ENGINE SQLORA SET DEFAULT_CONNECTION GOLD
SQL SQLORA PREPARE SQLOUT FOR
SELECT MIN(STVTERM_CODE)
FROM STVTERM
WHERE STVTERM_END_DATE >= SYSDATE;
END
-*
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS A1
END
-RUN
-*
-READ A1, &TERM
-RUN
-TYPE &TERM
  


  
ENGINE SQLORA SET DEFAULT_CONNECTION GOLD
SQL SQLORA PREPARE SQLOUT FOR
SELECT TO_CHAR((TRUNC(SYSDATE)),'YYYYMMDD') FROM DUAL;
END
-*
SET HOLDLIST=PRINTONLY
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS A1
END
-RUN
-*
-READ A1, &PAYDATE.A8.
-RUN
-TYPE &PAYDATE

This message has been edited. Last edited by: Rick Man,


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
 
Posts: 204 | Registered: March 31, 2008Report This Post
Guru
posted Hide Post
We use Dialogue Manager to do this. I am including our code but suggest you modify to suit your needs.

 
-DEFAULT &BEG_DATE_IN = '' ;
-DEFAULT &END_DATE_IN = '' ;
-PROMPT &BEG_DATE_IN.Enter the beginning date (mm/dd/yyyy).
-PROMPT &END_DATE_IN.Enter the ending date (mm/dd/yyyy).
-IF &BEG_DATE_IN EQ '' OR &END_DATE_IN EQ '' THEN GOTO SETDEFAULTZ ;

-*************************************************************************************
-* Use the reporting dates as per user inputs.
-* need to convert the input dates to yyyy/mm/dd format for the SQL
-TYPE *** DATES ENTERED .. &BEG_DATE_IN &END_DATE_IN ***
-SET &BEG_DATE_HDG = &BEG_DATE_IN ;
-SET &END_DATE_HDG = &END_DATE_IN ;
-SET &BEG_DATE = EDIT(&BEG_DATE_IN,'$$$$$$9999') || '/' || EDIT(&BEG_DATE_IN,'99999') ;
-SET &END_DATE = EDIT(&END_DATE_IN,'$$$$$$9999') || '/' || EDIT(&END_DATE_IN,'99999') ;
-GOTO RUNTHEREPORT

*************************************************************************************
-* Get the dates of the previous quarter
-SETDEFAULTZ
-INCLUDE GETQUART
-SET &BEG_DATE = &PREVQBEGY ;
-SET &END_DATE = &PREVQENDY ;
-SET &BEG_DATE_HDG = &PREVQBEGM ;
-SET &END_DATE_HDG = &PREVQENDM ;

-*************************************************************************************
-* We have the dates, either by user input or automatic calculations with procedure.
-RUNTHEREPORT ;



WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Platinum Member
posted Hide Post
Thanks.
That gets me the variables within the fex, or -INCLUDE. I'm hoping there is a slick way to pass them from Report Caster.

I've also done a check like
-IF &FOCFOCEXEC = 'RCASTER' THEN 'do something' ELSE 'do something else'


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
 
Posts: 204 | Registered: March 31, 2008Report This Post
Guru
posted Hide Post
Rick,

We put this code into most of our Focexecs. Alternatively, you can put the values into the RC job in the Advanced Task Options ares.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Platinum Member
posted Hide Post
quote:
Alternatively, you can put the values into the RC job in the Advanced Task Options ares

What do you mean? Hard code them? Like 201108 and 20111130. It might take an amper variable.
I just tried putitng the amper variable in the parameters tab and that didn't work.


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
 
Posts: 204 | Registered: March 31, 2008Report This Post
Guru
posted Hide Post
Exactly, you would have to change them every time you run. The other way works very well and the process can be used for any variable that can either be entered or be defaulted to,


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Virtuoso
posted Hide Post
Another option is to -INCLUDE your fex in a wrapper-fex that calculates the input values for you. Your RC job then calls the wrapper-fex.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Yea, that's what I'll do.
Thanks all


Reporting Server 7.6.10
Dev. Studio 7.6.8
Windows NT
Excel, HTML, PDF
 
Posts: 204 | Registered: March 31, 2008Report 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 Parameter Values in Report Caster

Copyright © 1996-2020 Information Builders