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 values as include to second report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
(CLOSED)passing values as include to second report
 Login/Join
 
Platinum Member
posted
We would like to set up dashboards and reports run in report caster to automatically roll to the current academic term or finacial aid year. Accordingly we have developed the code below and would like to pass it at run time to many different reports so that they are "hands free"
and do not require periodic maintenance. I had hoped that this could be done by a -INCLUDE but have not had any luck so far. I see the variables as external but have not been able to figure out how to utilize them to get my desired result setting default parameters.

-SET &SYS_YR = &YYMD;
-SET &CURTERM = STVTERM.STVTERM.STVTERM_CODE ;
-SET &CURFAYR = DEF_FAYR ;

DEFINE FILE STVTERM
SET_START/YYMD=HDATE(STVTERM.STVTERM.STVTERM_START_DATE, 'YYMD');
SET_END/YYMD=HDATE(STVTERM.STVTERM.STVTERM_END_DATE, 'YYMD');
END
TABLE FILE STVTERM
SUM
STVTERM.STVTERM.STVTERM_CODE
COMPUTE DEF_FA1/A2 = EDIT(STVTERM.STVTERM.STVTERM_CODE, '$$99$$'); NOPRINT
COMPUTE DEF_FA2/A2 = EDIT(STVTERM.STVTERM.STVTERM_CODE, '$$$$99'); NOPRINT
COMPUTE DEF_FA3/I2 = EDIT(DEF_FA1); NOPRINT
COMPUTE DEF_FA4/I2 = DEF_FA3 - 1; NOPRINT
COMPUTE DEF_FA5/I2 = DEF_FA3 + 1; NOPRINT
COMPUTE DEF_FA6/A2 = EDIT(DEF_FA4); NOPRINT
COMPUTE DEF_FA7/A2 = EDIT(DEF_FA5); NOPRINT
COMPUTE DEF_FAYR/A4 = IF DEF_FA2 EQ '20' OR '30' OR '40' THEN DEF_FA6 || DEF_FA1 ELSE IF DEF_FA2 EQ '80' THEN DEF_FA1 || DEF_FA7;

BY HIGHEST 1 STVTERM.STVTERM.STVTERM_CODE NOPRINT

WHERE &SYS_YR GE STVTERM.STVTERM.STVTERM_START_DATE;

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END

This message has been edited. Last edited by: Geoff Fish,


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 2008Report This Post
Virtuoso
posted Hide Post
If I understand well what you're trying to do with your code is to retrieve the current value for CURTERM and CURFAYR.
So you should di it that way:
-SET &SYS_YR = &YYMD;

DEFINE FILE STVTERM
SET_START/YYMD=HDATE(STVTERM.STVTERM.STVTERM_START_DATE, 'YYMD');
SET_END/YYMD=HDATE(STVTERM.STVTERM.STVTERM_END_DATE, 'YYMD');
END
TABLE FILE STVTERM
SUM
 STVTERM.STVTERM.STVTERM_CODE
 COMPUTE DEF_FA1/A2 = EDIT(STVTERM.STVTERM.STVTERM_CODE, '$$99$$'); NOPRINT
 COMPUTE DEF_FA2/A2 = EDIT(STVTERM.STVTERM.STVTERM_CODE, '$$$$99'); NOPRINT
 COMPUTE DEF_FA3/I2 = EDIT(DEF_FA1); NOPRINT
 COMPUTE DEF_FA4/I2 = DEF_FA3 - 1; NOPRINT
 COMPUTE DEF_FA5/I2 = DEF_FA3 + 1; NOPRINT
 COMPUTE DEF_FA6/A2 = EDIT(DEF_FA4); NOPRINT
 COMPUTE DEF_FA7/A2 = EDIT(DEF_FA5); NOPRINT
 COMPUTE DEF_FAYR/A4 = IF DEF_FA2 EQ '20' OR '30' OR '40' THEN DEF_FA6 || DEF_FA1 ELSE IF DEF_FA2 EQ '80' THEN DEF_FA1 || DEF_FA7;
BY HIGHEST 1 STVTERM.STVTERM.STVTERM_CODE NOPRINT
WHERE &SYS_YR GE STVTERM.STVTERM.STVTERM_START_DATE;
ON TABLE HOLD AS CURDTA FORMAT BINARY
END
-RUN
-READFILE CURDTA
-RUN
-SET &&CURTERM = STVTERM_CODE;
-SET &&CURFAYR = DEF_FAYR;

-TYPE CURTERM= &CURTERM
-TYPE CURFAYR= &CURFAYR


You can then include the global variables (use of double
&
) in a profile so they become available for either dashboard or RC.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Platinum Member
posted Hide Post
This post was mark closed when in fact it was not. I am unable to implement the solution provided because I do not have access to edit the profile.

Are there any other oprtions for implementing the code above w/o inserting it into every report. I want tutilize it like a called or stored procedure

This message has been edited. Last edited by: Geoff Fish,


809 DevStudio, MRE, Report Caster , Report Library
Output: Excel PDF, HTML
 
Posts: 171 | Registered: April 28, 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 values as include to second report

Copyright © 1996-2020 Information Builders