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] Display multiple graphs in single pdf page by sorting field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Display multiple graphs in single pdf page by sorting field
 Login/Join
 
Member
posted
Hi,
We have a requirement to display graphs one below the other based on the sorted field. Currently if i use By field, graphs are displayed in separate page in PDF. But customers wanted to display graphs one below the other (say 4-5 graphs per page). I have attached the pdf report that we generated.
In the attached example, there are three Global DUNS values (GDUNS is dynamic might be 3 or 10). 3 GDUNS values are displaying in separate page but we want it in single page. I have attached the mockup report for your reference.
we are using Compound report to build this report and i have attached the code for your reference.
Appreciate your quick response.
Thanks
Yogesh

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


WebFOCUS 7703
Excel, PDF, HTML, AHTML, APDF
 
Posts: 2 | Registered: June 28, 2013Report This Post
Member
posted Hide Post
i have mocked the code to CAR file. I Appreciate your quick response


TABLE FILE CAR
PRINT *
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS HOLD_1
END
-RUN

-IF &RECORDS EQ 0 THEN GOTO NO_DATA;

-SET &RECORD_CNT = &RECORDS ;

-*-**********************************************************************************************

COMPOUND LAYOUT PCHOLD FORMAT PDF
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5^4', MERGE=ON, ORIENTATION=LANDSCAPE, PAGESIZE=C, 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='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(0 3), DIMENSION=(2.5 2), METADATA='HEIGHT: 2.292in; WIDTH: 6.25in; POSITION: absolute; LEFT: 0.833in; Z-INDEX: 100; TOP: 0.729in', $
END

SET COMPONENT='report2'

DEFINE FILE HOLD_1
TITLE/A30='GDO';
VALUE/D12.4 = SEATS;
END

TABLE FILE HOLD_1
PRINT
TITLE
VALUE
BY COUNTRY
ON TABLE HOLD AS LOSTHLD
END

DEFINE FILE HOLD_1
TITLE/A30='Unserved';
VALUE/D12.4 = DEALER_COST;
END
TABLE FILE HOLD_1
PRINT
TITLE
VALUE
BY COUNTRY
ON TABLE HOLD AS CANHLD
END

DEFINE FILE HOLD_1
TITLE/A30='Basebus';
VALUE/D12.4 = RETAIL_COST;
END
TABLE FILE HOLD_1
PRINT
TITLE
VALUE
BY COUNTRY
ON TABLE HOLD AS WONHLD
MORE
FILE LOSTHLD
MORE
FILE CANHLD
END

-*SET LOOKGRAPH=PIE
GRAPH FILE WONHLD
SUM
VALUE AS ''
BY COUNTRY NOPRINT
BY TITLE
-*BY CREATERULESEED NOPRINT
ON GRAPH HOLD AS HOLD FORMAT SVG
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 450
ON GRAPH SET VAXIS 250
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 1
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setTemplateFile("/images/tdg/template/IBITrueColors.txt");
setReportParsingErrors(false);
setSelectionEnableMove(false);
setMarkerSizeDefault(50);
setTransparentBorderColor(getChartBackground(),true);
setLegendDisplay(false);
setPlace(true);
setDisplay(getY1Title(),true);
setDisplay(getO1Title(),true);
setDepthRadius(0);
setDepthAngle(0);
setLegendPosition(1);
setTextJustHoriz(getLegendText(),1);
setPlaceResize(getLegendArea(),false);
setDisplay(getY1MajorGrid(),true);
setDisplay(getO1MajorGrid(),false);
setTransparentBorderColor(getSeries(0),true);
setTransparentBorderColor(getSeries(1),true);
setTransparentBorderColor(getSeries(2),true);
setTransparentBorderColor(getSeries(3),true);
setFontName(getLegendText(),"Arial Unicode MS");
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),20);
setPlaceResize(getLegendText(),0);
setFontStyle(getLegendText(),0);
setFontName(getO1Label(),"Arial Unicode MS");
setFontSizeAbsolute(getO1Label(),true);
setFontSizeInPoints(getO1Label(),20);
setPlaceResize(getO1Label(),0);
setFillColor(getO1Label(),new Color(51,51,51));
setFontName(getY1Label(),"Arial Unicode MS");
setFontSizeAbsolute(getY1Label(),true);
setFontSizeInPoints(getY1Label(),20);
setPlaceResize(getY1Label(),0);
setFillColor(getY1Label(),new Color(51,51,51));
setFillColor(getSeries(0),new Color(155,37,131));
setFillColor(getSeries(1),new Color(40,149,213));
setFillColor(getSeries(2),new Color(112,83,170));
setFillColor(getSeries(3),new Color(126,191,230));
setY1AxisSide(0);
setBorderColor(getFrame(),new Color(192,192,192));
setTextFormatPattern(getY1Label(),"##.##");
setTextRotation(getO1Label(),0);
setScaleMinAuto(getY1Axis(),false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPreset(getDataText(),4);
setPlaceResize(getY1Label(),0);
setPlaceResize(getTitle(),0);
setPlaceResize(getSubtitle(),0);
setTextString(getTitle(),"WALLET SHARE");
setDisplay(getTitle(),true);
setFontStyle(getTitle(),0);
setFontName(getTitle(),'Arial Unicode MS');
setFontSizeAbsolute(getTitle(), true);
setFontSizeInPoints(getTitle(), 20);
setFillColor(getTitle(),new Color(0,0,0));
setDisplay(getSubtitle(),true);
setFontStyle(getSubtitle(),0);
setFontName(getSubtitle(),'Arial Unicode MS');
setFontSizeInPoints(getSubtitle(), 20);
setDisplay(getY1MinorGrid(),true);
setBorderColor(getY1MinorGrid(),new Color(192,192,192));
setPieFeelerTextFormat (1);
getPieSliceLabel(true);
setPieFeelerTextDisplay(4);
setPieLabelDisplay(0);
setLegendDisplay(true);
-*newly added
setTextFormatPreset(getPieSliceLabel(),20);
setFontName(getPieSliceLabel(),"Arial Unicode MS");
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),20);
setPlaceResize(getPieSliceLabel(),0);
setPieFeelerTextDisplay(3);
setPieLabelDisplay(1);
setFontStyle(getPieSliceLabel(),2);
setPieDepth(40);
setPieTilt(15);
setTextFormatPreset(getPieSliceLabel(),-1);
setTextFormatPattern(getPieSliceLabel(),"###,###,###%");
setFillColor(getLegendArea(),new Color(243,243,243));
setFillColor(getFrame(),new Color(229,229,229));
setTextFormatPreset(getDataText(),-1);
setTextFormatPattern(getDataText(),"###,###,###,###");
setTextFormatPreset(getDataText(),0);
setPieFeelerTextDisplay(1);
setLineBasicStrokeType(getPieFeelerLine(),11);
setBorderColor(getPieFeelerLine(),new Color(178,178,178));
setFillColor(getPieSliceLabel(),new Color(51,51,51));
setFillColor(getSubtitle(),new Color(51,51,51));
setFillColor(getChartBackground(),new Color(243,243,243));
setFillColor(getLegendText(),new Color(51,51,51));
setO1TitleDisplay(false);
setY1TitleDisplay(false);
setTitleDisplay(false);
setY1LabelDisplay(false);
setX1TitleDisplay(false);
setPieBarLabelDisplay(false);
*END
ENDSTYLE
END
-RUN

TABLE FILE HOLD_1
SUM
DEALER_COST NOPRINT
COMPUTE CNTR/I4 = CNTR + 1; NOPRINT
COMPUTE CNTR2/A4 = IF &FOCGRAPHCNT EQ 1 THEN ' ' ELSE FTOA(CNTR-1,'(F4)','A4'); NOPRINT
COMPUTE IMG/A16 = IF SEATS EQ 0 AND DEALER_COST EQ 0 AND RETAIL_COST EQ 0 THEN '' ELSE 'HOLD'||LJUST(4,CNTR2,'A4')|| '.svg'; NOPRINT
BY COUNTRY NOPRINT
HEADING
"Wallet Share"
""
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, BORDER=OFF, $
TYPE=HEADING, IMAGE=(IMG), POSITION=(0 0), DIMENSION=(2.5 2), $
TYPE=HEADING, FONT=Arial, SIZE=10, STYLE=BOLD, JUSTIFY=CENTER, $
ENDSTYLE
END
-RUN
COMPOUND END
-EXIT


WebFOCUS 7703
Excel, PDF, HTML, AHTML, APDF
 
Posts: 2 | Registered: June 28, 2013Report This Post
Platinum Member
posted Hide Post
My first post's code was mangled.

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


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Platinum Member
posted Hide Post
How about something like this:
  SET ASNAMES=ON,HOLDLIST=PRINTONLY,BYDISPLAY=OFF,PAGE=NOLEAD,NODATA=0

 ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_WIDTH ='2400';
-DEFAULTH &WF_STYLE_HEIGHT='800';
-DEFAULTH &WF_TITLE='WebFOCUS Report';

-SET &ITEM = ' ';
-SET &NUM  = ' ';
 TABLE FILE ggsales
 SUM COMPUTE X/I5   = X + 1; NOPRINT
     COMPUTE NUM/A5 = EDIT(X);
 BY REGION AS 'ITEM'
 ON TABLE HOLD AS items FORMAT BINARY
 END
-RUN

-READFILE items
-REPEAT ENDREPEAT1 WHILE &IORETURN EQ 0;
 GRAPH FILE ggsales
 SUM     UNITS AS ''
  BY     PCD   AS ''
  ACROSS DATE  AS ''
  WHERE REGION EQ '&ITEM'
  ON TABLE HOLD AS Chart&NUM FORMAT 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 LOOKGRAPH VLINE
 ON GRAPH SET GRMULTIGRAPH 0
 ON GRAPH SET GRLEGEND 0
 ON GRAPH SET GRXAXIS 2
 ON GRAPH SET STYLE *
 INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
 TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
 TYPE=HEADING, SIZE=10,$
 *GRAPH_SCRIPT
 setPlace(true);
 setPieDepth(0);
 setPieTilt(0);
 setDepthRadius(0);
 setUseSeriesShapes(true);
 setMarkerSizeDefault(50);
 setReportParsingErrors(false);
 setSelectionEnableMove(false);
 setCurveFitEquationDisplay(false);
 setDisplay(getO1MajorGrid(),false);
 setFontSizeAbsolute(getO1Label(), true);
 setFontSizeInPoints(getO1Label(), 10);
 setPlaceResize(getO1Label(), 0);
 setFillColor(getFrame(),new Color(253,253,253));
 setFillColor(getSeries(0),new Color(147,169,207));
 setFillColor(getSeries(1),new Color(68,113,167));
 setTransparentBorderColor(getFrame(),true);
 setDisplay(getO1AxisLine(),false);
 setDisplay(getY1AxisLine(),false);
 setTextString(getTitle(),"&ITEM");
 setFontName(getO1Label(),"ARIAL UNICODE MS");
 setFontSizeAbsolute(getO1Label(), true);
 setFontSizeInPoints(getO1Label(), 8);
 setPlaceResize(getO1Label(), 0);
 setTransparentBorderColor(getChartBackground(),false);
 setBorderColor(getChartBackground(),new Color(130,130,130));
 END
-READFILE items
-ENDREPEAT1

 TABLE FILE GGSALES
 SUM
 COMPUTE NUM/I5 = NUM+1;  NOPRINT
 COMPUTE CHARTN/A20 = 'Chart' | EDIT(NUM); AS ''
 BY REGION NOPRINT
 ON REGION SUBFOOT
 " "
 ON TABLE PCHOLD FORMAT PDF
 ON TABLE SET STYLE *
 TYPE=REPORT, ORIENTATION=LANDSCAPE, LEFTMARGIN=.8, $
 TYPE=DATA, COLUMN=CHARTN, IMAGE=(CHARTN), SIZE=(9.0 2.5), $
 ENDSTYLE
 END
 


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Guru
posted Hide Post
Hi Attad,

Here is the IBI Technical documentation for charting.

Creating a Chart

There is also a PDF within the set of links that you can open.

IF you are creating a PDF ...
You will want to search on "coordinated" for a PDF doc.

Also here are a few links to review from the Techsupport knowledge base.
Unable to line up X axis labels in Multi-sort graph

Unable to display multiple JSCHARTS in the same procedure.


How to display multiple pie charts horizontally

Hopefully this will get you pointed in the right direction.

Thank you for participating in the Focal Point Forum.

Kindest regards,
Tamra Colangelo
Focal Point Moderator - Information Builders Inc.
* Summit 2016 – June 13-17 in Reno, Nevada  - http://www.informationbuilders.com/events/summit


WebFOCUS 8x - BI Portal, Developer Studio, App Studio, Excel, PDF, Active Formats and HTML5
 
Posts: 487 | Location: Toronto | Registered: June 23, 2009Report 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] Display multiple graphs in single pdf page by sorting field

Copyright © 1996-2020 Information Builders