Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Dynamic Compound reporting in PDF...BIG Issue...
Go
New
Search
Notify
Tools
Reply
  
[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, 2007Reply With QuoteReport 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, 2007Reply With QuoteReport 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, 2003Reply With QuoteReport 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, 2007Reply With QuoteReport 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, 2007Reply With QuoteReport 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,


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport 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: 1643 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.