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] Dynamic Compound reporting in PDF...BIG Issue...

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Dynamic Compound reporting in PDF...BIG Issue...
 Login/Join
 
Platinum Member
posted
i am trying for a dynamic compound reporting.
Look at the code below...
  
-SET &SLNO =1;
TABLE FILE HLDFICA
PRINT
  DST.REGION AS 'REGION'
ON TABLE HOLD AS TEST FORMAT ALPHA
END
-SET MAXCNT = &LINES;
-TYPE MAXCOUNT IS &MAXCNT
-RUN
-* Read ahead to prime the &IORETURN
-SET &IORETURN = 0;
-REPEAT :end_read WHILE &IORETURN EQ 0;
-READ TEST,&LINE
-IF &IORETURN NE 0 GOTO :end_read;
-TYPE SLNO = &SLNO
-SET &HOLDNAME = 'HLD'|EDIT(&SLNO);
-TYPE HOLDNAME = &HOLDNAME
-TYPE LINE = &LINE

TABLE FILE HLDFICA
PRINT
  PROTO_GRP_N
  MO_USE_Q
  MO_EXP_A
  MO_YTD_USE_Q
  PRYR_MO_YTD_USE_Q
  AVGMTD
  AVGYTD
  AVGPYTD
  REPTYPE
  REGION
WHERE REGION EQ '&LINE'
ON TABLE HOLD AS &HOLDNAME
END

-SET &PDFFOR = IF &SLNO EQ '1' THEN 'OPEN NOBREAK' ELSE IF &SLNO EQ &MAXCNT THEN 'CLOSE' ELSE 'NOBREAK';
-RUN
-TYPE &PDFFOR

-SET &SLNO = &SLNO+1;
-TYPE &SLNO

-IF &SLNO GT &MAXCNT GOTO LOOPEND;

TABLE FILE &HOLDNAME
SUM
     MO_USE_Q AS 'MTD'
     AVGMTD AS 'MTD,Avg $,per ton'
     MO_YTD_USE_Q AS 'YTD'
     AVGYTD AS 'YTD,Avg $,per ton'
BY REGION NOPRINT
BY PROTO_GRP_N AS ''
ACROSS REPTYPE AS ''
ON REGION SUBTOTAL AS 'Total ' OVER
HEADING
"<REGION"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT PDF &PDFFOR
ON TABLE SET STYLE *
     UNITS=IN,
    SQUEEZE=ON,
     ORIENTATION=LANDSCAPE,
$
ENDSTYLE
END

-:end_read
-GOTO LOOPEND
-LOOPEND
-EXIT



The loop works perfectly fine for storing the values in different hold file...but while i am printing them in the same loop it's not working.
But its also not giving any error.

Any help, highly appreciated.

tks/sam

This message has been edited. Last edited by: FP Mod Chuck,


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Platinum Member
posted Hide Post
Off the bat I see
-SET MAXCNT = &LINES;
Which should probably be -SET &MAXCNT = &LINES;


WebFOCUS 7.6.6/TomCat/Win2003,SQL Server 2005,Oracle
 
Posts: 125 | Location: New England | Registered: February 20, 2007Report This Post
Virtuoso
posted Hide Post
Break the loop into TWO loops. Do a loop around the code that creates the HOLD files and then do a loop around the code that builds the PDF from the HOLD files.

The following is a guess as to what the issue is:

The fact that the PDF is OPEN puts WebFOCUS into a mode in which it expects each HOLD to use the PDF output. Therefore when you loop back and create the next HOLD file it may be getting confused.


Thanks!

Mickey

FOCUS/WebFOCUS 1990 - 2011
 
Posts: 995 | Location: Gaithersburg, MD, USA | Registered: May 07, 2003Report This Post
Platinum Member
posted Hide Post
mgrackin : i tried with 2 loops, but not working.

Tom: even if you put (-SET &PDFFOR = IF &SLNO EQ '1' THEN 'OPEN NOBREAK' ELSE IF &SLNO EQ &MAXCNT THEN 'CLOSE' ELSE 'NOBREAK'Wink before (-SET &SLNO = &SLNO+1; ) its not working.

It is capturing the data but can not print in PDF.


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Platinum Member
posted Hide Post
kewl...thanks a bunch...
NoCLOSE and A.10 made all the difference....


WF Server: 7.1.4 on Z/OS and Linux, ReportCaster
Data: DB2, DB2/UDB, Adabas, SQL Server, Oracle Output: HTML,PDF,Excel2K
WF Client: Servlet, CGI
 
Posts: 133 | Registered: May 12, 2007Report This Post
Platinum Member
posted Hide Post
Hi,
This post helped me to loop through and create compound report.
I used NOCLOSE with READ but still i am not getting PDF report output.The data is getting stored as HOLD file ,but PDF output is not displaying,even though there is no error.?

This message has been edited. Last edited by: srajeevan,


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
Well... where is the code that makes this a compound report? So far I only see a loop that sends multiple PDF documents to PCHOLD in sequence. That would only work for the first PDF, the rest comes after the HTTP-response has been sent already and goes nowhere.


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
  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] Dynamic Compound reporting in PDF...BIG Issue...

Copyright © 1996-2020 Information Builders