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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
HTML Output to PDF
 Login/Join
 
Member
posted
I'm trying to take my output of looped html and convert into pdf. Please note the line above "HTMLFORM BEGIN" in the code below.


Code:
-*
-SET &MAX_RUN = 3;
-SET &NUMRECS = 0;
-*
-SET &I = 0;
-*
-STARTLOOP
-*
-SET &I = &I + 1;
-*
-IF &I EQ &MAX_RUN GOTO ENDLOOP;
-*
-TYPE &I.A17.
-*
-*-IF &I LT &NUMRECS GOTO STARTLOOP;
-*
-ENDLOOP
-*
-******************************************************************
-******************************************************************
-******************************************************************
-*
-SKP_LOOPING
-*
-* START CODE HERE
DEFINE FILE HIERARCHY
FNAME/A5 = IF &I EQ 1 THEN 'TODD' ELSE IF &I EQ 2 THEN 'MIKE' ELSE 'JOHN';
LNAME/A5 = IF &I EQ 1 THEN 'JONES' ELSE IF &I EQ 2 THEN 'SMITH' ELSE 'DOE';
END
TABLE FILE HIERARCHY
PRINT
FNAME
LNAME
BY DIVISION NOPRINT
WHERE RECORDLIMIT EQ 1;
ON TABLE HOLD AS NAME FORMAT ALPHA
END
-RUN
-READ NAME &FNAME.A5. &LNAME.A5.
-TYPE &FNAME &LNAME
-*
-HTMLFORM BEGIN
-*
-* THIS IS TEST HTML THE REAL CODE IS ABOUT 250 LINES OF HTML CODE
-*
<table border="1">
 <tr>
 <td>!IBI.AMP.LNAME;, !IBI.AMP.FNAME;</td>
 </tr>
 </table> 

-*
-HTMLFORM END
-*
-******************************************************************
-******************************************************************
-******************************************************************
-*
-IF &I LT &MAX_RUN GOTO STARTLOOP;
-*
-*
-ENDLOOP
-TYPE Total Runs: &I
-*
-*
-* Convert to PDF code here!


7.6.8
UNIX
FOCUS,HTML,PDF,EXCEL.
 
Posts: 18 | Registered: September 29, 2010Report This Post
Master
posted Hide Post
Hi,

Need more clarity on problem/issue in your post.

Thanks,
Ram
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
Silver Member
posted Hide Post
I don't think that there is a way to convert your HTML output into PDF easily unless you are looking at using a third party converter program something like CutePDF to print the HTML page into a PDF document. I usually would not use the HTMLFORM technique to generate the report if output formats besides HTML are required. Is there any special reason why this technique is used?

It looks like your program is looping through a program at most 3 times to pull and display data line by line. Could you please describe what your program does in more detail? What do you have in the 250 lines of your html code besides the display of the data? Do you have headers/subheaders or are they styling code?

Basically if you could condense your 250 lines of html code into using a TABLE FILE ... END, then you could say something like:
-SET &TBL_OUTPUT_FORMAT = IF &WFFMT EQ HTML THEN 'ON TABLE HOLD AS NAME FORMAT ALPHA' ELSE IF &WFFMT EQ PDF THEN (IF &I EQ 1 THEN 'ON TABLE PCHOLD FORMAT PDF OPEN NOBREAK' ELSE IF &I EQ &MAX_RUN THEN 'ON TABLE PCHOLD FORMAT PDF CLOSE' ELSE 'ON TABLE PCHOLD FORMAT PDF NOBREAK');

TABLE FILE HIERARCHY
...
&TBL_OUTPUT_FORMAT
END



Sorry for the many questions without any solution but the extra details could help generate more suggestions.


Year(s) of experience in WebFOCUS: 5+. Using WebFOCUS 7.7.03 on Windows platform with Oracle/SQL Server.
 
Posts: 41 | Registered: September 08, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders