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] Save Report and Graph as PDF (WF 8.0.08)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Save Report and Graph as PDF (WF 8.0.08)
 Login/Join
 
Silver Member
posted
Hello,

I'm trying to combine a report with a graph on a PDF in WebFocus Developer Studio 8.0.08 (Testing phase prior to upgrading). I'd like this to work so I can schedule similar reports in the future via ReportCaster.

If I make the output HTML (Report) and HTML5 (Graph), it is successful. If I make the output PDF and PDF (or even PDF and PDF_GIF), only the report displays and the graph does not. If I do PDF OPEN and PDF CLOSE (or PDF_GIF CLOSE) similar to a compound report, I get an error.

I am using the SALES file for this. I'd like this to work so I can schedule similar reports in the future via ReportCaster.

Here is my code which is PDF and PDF_GIF, which only displays the Report in the PDF output.

 TABLE FILE SALES
SUM 
     SALES.PRODUCT.UNIT_SOLD
BY  LOWEST SALES.STOR_SEG.CITY
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=REPORT,
     LINES-PER-PAGE=20,
     ALLOW-TOOLS=OFF,
$
TYPE=REPORT,
     COLUMN=N1,
     SQUEEZE=ON,
$
ENDSTYLE
END
-*IA_GRAPH_BEGIN
-*Do not delete or modify the comments below
[b]-* I REMOVED THE INTERNAL COMMENT LINES HERE BECAUSE IT WAS STRETCHING THE FORUM PAGE[/b]
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='INCHES';
-DEFAULTH &WF_STYLE_HEIGHT='4.21875';
-DEFAULTH &WF_STYLE_WIDTH='8.020833';
GRAPH FILE SALES
-* Created by Info Assist for Graph
SUM SALES.PRODUCT.UNIT_SOLD
BY SALES.STOR_SEG.CITY
ON GRAPH PCHOLD FORMAT PDF_GIF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 0
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0); 
setCurveFitEquationDisplay(false); 
setPlace(true); 
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDataTextDisplay(true);
*END
ENDSTYLE
END
-*IA_GRAPH_FINISH
 

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


8009
Windows 7
Excel/HTML/AHTML/PDF
 
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011Report This Post
<nick z>
posted
Hi,
You can use PDF composer to create your procedure that will include both Reports and Graphs in PDF document.

Here is a code that would work:

-* Default Mode: ResourceLayout

*-HOLD_SOURCE
-* File report_graph_pdf
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.833 0.729), DIMENSION=(3.021 4.167),  ARREPORTSIZE=DIMENSION, METADATA='HEIGHT: 4.167in; POSITION: absolute; LEFT: 0.833in; Z-INDEX: 1; TOP: 0.729in; WIDTH: 3.021in', $
COMPONENT='graph1', TEXT='graph1', TOC-LEVEL=2, POSITION=(0.833 5.000), DIMENSION=(6.042 3.646), COMPONENT-TYPE=GRAPH,  ARREPORTSIZE=DIMENSION, METADATA='HEIGHT: 3.646in; POSITION: absolute; LEFT: 0.833in; Z-INDEX: 2; TOP: 5in; WIDTH: 6.042in', $
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
PRINT
CAR.ORIGIN.COUNTRY
CAR.BODY.DEALER_COST
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
ENDSTYLE
END
SET COMPONENT='graph1'
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='INCHES';
-DEFAULTH &WF_STYLE_HEIGHT='4.21875';
-DEFAULTH &WF_STYLE_WIDTH='8.020833';
GRAPH FILE ibisamp/CAR
-* Created by Info Assist for Graph
SUM CAR.BODY.DEALER_COST
BY CAR.ORIGIN.COUNTRY
ON GRAPH PCHOLD FORMAT PDF
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
TYPE=REPORT, TITLETEXT='WebFOCUS Report', $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-*IA_GRAPH_FINISH
COMPOUND END



Thanks.
Nick.
 
Report This Post
Silver Member
posted Hide Post
Hi Nick,

I gave that a try and the graph does not output.

When I open composer viewer, I see both the report and the graph - the report has a preview of the data and the graph has a black square with a white X inside on the top left. If I open that graph, it opens correctly in InfoAssist and I see the graph in Live Preview. But running the entire procedure only displays the report without the graph in PDF.

--EDIT:
I just ran with Message Viewer On and the Report displayed in a PDF and the other window had this Error Message:
0 NUMBER OF RECORDS IN TABLE=       18  LINES=      50 
NUMBER OF RECORDS IN GRAPH=       18  PLOT POINTS=      5
(FOC3231) CANNOT OPEN AN HTTP CONNECTION (GRAPHSERVURL)
0 ERROR AT OR NEAR LINE     71  IN PROCEDURE RLTEMP  FOCEXEC *
(FOC3251) IMAGE FILE UNREADABLE OR INVALID: IBIIGRPH.SVG (RC=1)
0 HOLDING PDF FILE ON PC DISK ...
(FOC3296) Error found in Coordinated Compound Report: At Component graph1
Compound Report is TERMINATING.....
WebFOCUS Version 8.0.08 compiled and linked on Wed May  7 20:04:22 EDT 2014 (Gen branch8008:27) 



Thanks,
Aimee

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


8009
Windows 7
Excel/HTML/AHTML/PDF
 
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011Report This Post
<nick z>
posted
Hi Aimee,
That error message just means that you have security set up on your app server.
You can blank out GRAPHSERVURL fom your admin console:
Under Configuration-->Client Settings-->Graph
Blank out value for IBIF_graphservurl.
If this does not help, contact CSS, they will be able to guide you with this issue.
The reason why you are seeing the Graph in IA preview is because the preview is in HTML(or possibly in JSCHART), but never in PDF.
Thank you.
Nick.
 
Report This Post
Silver Member
posted Hide Post
Hi Nick,

That fixed the issue! Thanks so much for your assistance!

Cheers,
Aimee


8009
Windows 7
Excel/HTML/AHTML/PDF
 
Posts: 34 | Location: San Francisco, CA | Registered: July 25, 2011Report This Post
Expert
posted Hide Post
Thanks Nick, That just resolved an issue which I was facing intermittently.
quote:
Add SET GRAPHSERVURL = ' ';




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] Save Report and Graph as PDF (WF 8.0.08)

Copyright © 1996-2020 Information Builders