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     [SOLVED] Same Report different prompts saved as one combined file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Same Report different prompts saved as one combined file
 Login/Join
 
Gold member
posted
Would like to find out a technique to output a report into one file hopefully without having to create more than one fex since the report is the same other than the parameters. Ultimately, this report will be scheduled (reportcaster?) to run based on providing several criteria of a YearCode and Region (All or only Mainland). Would this use a loop, a new fex with an include of the original report twice or some other method?


In the below example output would show the all regions then only Mainland
All Regions		
		
COUNTRY	CAR	CARSOLD
ENGLAND	JAGUAR		0
	JENSEN		0
	TRIUMPH		0
*TOTAL ENGLAND		0
JAPAN	DATSUN		16
	TOYOTA		12
*TOTAL JAPAN		28
FRANCE	PEUGEOT		0
*TOTAL FRANCE		0
ITALY	ALFA ROMEO	1
	MASERATI	0
*TOTAL ITALY		1
W GERMANY	AUDI	1
	BMW		1
*TOTAL W GERMANY	2
TOTAL			31

MAINLAND REGIONS		
		
COUNTRY	CAR	CARSOLD
FRANCE	PEUGEOT		0
*TOTAL FRANCE		0
ITALY	ALFA ROMEO	1
	MASERATI	0
*TOTAL ITALY		1
W GERMANY	AUDI	1
	BMW		1
*TOTAL W GERMANY	2
TOTAL			3


 
DEFINE FILE CAR
REGION/A20=IF COUNTRY EQ 'ENGLAND' OR COUNTRY EQ 'JAPAN' THEN 'ISLAND' ELSE 'MAINLAND';
END
TABLE FILE CAR
SUM 
     COMPUTE CARSOLD/I3 = SALES / DEALER_COST;
BY  LOWEST REGION NOPRINT 
BY  LOWEST COUNTRY
BY  LOWEST CAR
     
ON COUNTRY SUBTOTAL AS '*TOTAL'
HEADING
-* How to have Report Header Display "All Regions" if no region is selected   ?
-* How to have Report Header Display "Mainland Regions" if NE 'ISLAND' ?
WHERE REGION NE 'ISLAND'; -*How to modify this line so that can run report for ALL or for MAINLAND only? 
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE COLUMN-TOTAL AS 'TOTAL'
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: sxschech,


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Guru
posted Hide Post
 
DEFINE FILE CAR
REGION/A20=IF COUNTRY EQ 'ENGLAND' OR COUNTRY EQ 'JAPAN' THEN 'ISLAND' ELSE 'MAINLAND';
END
TABLE FILE CAR
SUM 
     COMPUTE CARSOLD/I3 = SALES / DEALER_COST;
BY 'CAR.ORIGIN.REGION' NOPRINT
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
     
ON CAR.ORIGIN.COUNTRY SUBTOTAL AS '*TOTAL'
WHERE REGION NE & REGION.(OR(<ALL,FOC_NONE>,<MAINLAND,MAINLAND>,<ISLAND,ISLAND>)).REGION.;
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END



WebFOCUS Administrator @ Worldpay FIS
PROD/DEV/TEST: 8204, SANDBOX: 8206 soon - BIP, Reportcaster, Resource Manager, EUM, HyperStage soon, DB: HIVE,Oracle,MSSQL
 
Posts: 291 | Location: Greater Cincinnati  | Registered: May 11, 2005Report This Post
Gold member
posted Hide Post
That helps with the prompt aspect. Any ideas about the merging of the two runs into one report file output.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Master
posted Hide Post
  
-SET &OC='OPEN';
-SET &OPR='NE';
-REPEAT CARLOOP 2 TIMES

DEFINE FILE CAR
REGION/A20=IF COUNTRY EQ 'ENGLAND' OR COUNTRY EQ 'JAPAN' THEN 'ISLAND' ELSE 'MAINLAND';
END
TABLE FILE CAR
SUM
     COMPUTE CARSOLD/I3 = SALES / DEALER_COST;
BY 'CAR.ORIGIN.REGION' NOPRINT
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'

ON CAR.ORIGIN.COUNTRY SUBTOTAL AS '*TOTAL'
WHERE REGION &OPR.EVAL & REGION.(OR(<ALL,FOC_NONE>,<MAINLAND,MAINLAND>,<ISLAND,ISLAND>)).REGION.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML &OC
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
ENDSTYLE
END
-RUN
-SET &OC='CLOSE';
-SET &OPR='EQ';
-CARLOOP
-ENDREPEAT


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Thank you Pat for your help on this. Your suggestion worked and the loop produces the output.

For my understanding of the code... Regarding &OC, does this mean that 'OPEN' is a keyword meaning to keep the html file open and append additional data into it and then 'CLOSE' closes/saves the file so nothing more is added to it?

Lastly, (if you happen to know) when the output is html, the data flows from the first group to the next, when I changed the format to PDF, the second group ended up on it's own page even though space was available to accommodate the rows on page one. In some cases this will be preferred, but in others it would be nice to have all on one page. Is this a pdf thing or is there a page setting to keep together.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Expert
posted Hide Post
quote:
Regarding &OC
I hope you don't take this as being too picky. But, there's really no need for "&OD" with HTML, or is there? Was that just for illustrative purposes or for use if the output was to change to PDF?
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Hi Doug,

I tried removing the &OC and looks like for HTML it doesn't need it, but for PDF it does.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report This Post
Guru
posted Hide Post
On PDF you have to
do OPEN NOBREAK if you don't want the second report on a new page.


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Gold member
posted Hide Post
Thank you N.Selph. That worked. Appreciate it.


WebFocus 7.7.03
Win7, all output
 
Posts: 80 | Registered: January 26, 2011Report 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     [SOLVED] Same Report different prompts saved as one combined file

Copyright © 1996-2020 Information Builders