Using the GRAPH FILE Command

Most TABLE requests can be converted into GRAPH requests by simply replacing the TABLE FILE command with the GRAPH FILE command. The only limitations are those inherent in the nature of the graph format. When a TABLE request is converted in this manner, the various phrases that make up the body of the request determine the format and layout of the graph. The type of graph produced by a GRAPH FILE request depends on the display command used (SUM or PRINT), and the sort phrase(s) used (ACROSS or BY).

The internal graph engine used by WebFOCUS has been integrated into the ReportCaster Distribution Server. This means that when the data for the GRAPH FILE request is sent back to the ReportCaster Distribution Server, it creates and distributes the graph. When using the GRAPH FILE command, you must include SET GRAPHEDIT=SERVER syntax to return data to the ReportCaster Distribution Server. Bursting is supported and is performed on the second BY field in the GRAPH FILE request. When creating the ReportCaster schedule, you must specify one of the graph image formats (GIF, PNG, or SVG).

Note: If the chart contains a header or footer and you want to distribute an image format (GIF, JPEG, PNG, or SVG), then you must select the InfoAssist option to embed the header and footer in the image. If the embed option is not selected, then the header and footer are not included in the distributed image file. In this case, you must use HTML, HTML5, or PDF to distribute a chart that contains a header or footer.


Top of page

Example: Creating a Report That Displays Output as a Pie Graph

You can use InfoAssist to create a report that displays output as a pie graph:

-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE CENTHR
-* Created by Info Assist for Graph
SUM CENTHR.EMPSEG.EMP_COUNT
BY CENTHR.EMPSEG.PLANT
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET ARGRAPHENGIN JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
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 PIEMULTI
ON GRAPH SET GRAPHSTYLE *
setReportParsingErrors(false);
setSelectionEnableMove(false);
setCurveFitEquationDisplay(false);
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setPieFeelerTextDisplay(1);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
ENDSTYLE
END

The following image shows an example of the type of multi-colored pie graph output that can be distributed by ReportCaster.

ReportCaster multi-colored pie graph image


WebFOCUS