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.
I am able to save a simple graph code below as PDF.
APP HOLD BASEAPP GRAPH FILE CAR SUM RETAIL_COST BY COUNTRY ON GRAPH HOLD AS 52122539 FORMAT SVG END -RUN TABLE FILE CAR SUM COUNTRY ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT,IMAGE=52122539.SVG,$ ENDSTYLE END
I am trying to convert the below code for graph to add the code to save it as pdf. But fail to do so. Please help.
JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_ELEMENT_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_ELEMENT.DQ_ALL_ELEMENT.DQ_ELEMENT_ID IN DQ_ALL_ELEMENT TAG J001 AS J001 END JOIN J001.DQ_ALL_ELEMENT.DQ_TABLE_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_TABLE.DQ_ALL_TABLE.DQ_TABLE_ID IN DQ_ALL_TABLE TAG J002 AS J002 END JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_METRIC_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_METRICS.DQ_ALL_METRICS.DQ_METRIC_ID IN DQ_ALL_METRICS TAG J003 AS J003 END
TABLE FILE DQ_COLUMN_METRICS_TH -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT RANKED BY HIGHEST 4 MTHYEAR WHERE (J003.DQ_ALL_METRICS.DQ_METRIC_TP EQ 'EMPTY COUNT') AND J001.DQ_ALL_ELEMENT.IS_ACTIVE_IN EQ 'Y';; ON TABLE HOLD END -RUN
GRAPH FILE HOLD -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT BY MTHYEAR AS 'PERIOD DATE'
HEADING """
ON GRAPH PCHOLD AS HOLD FORMAT PNG ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET GRWIDTH 1 ON GRAPH SET VZERO ON ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/IBISouthWestern.txt"); setReportParsingErrors(false); setSelectionEnableMove(false); setDisplay(getDataText(),true); setSeriesType(0,2); setLegendDisplay(true); setLegendMarkerPosition(3); setMarkerDisplay(true); setUseSeriesShapes(false); setConnectLineMarkers(true); setConnectScatterMarkers(true); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setY1LabelDisplay(true); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setFontSize(getO1Label(),12); setFontSizeAbsolute(getO1Label(),true); setPlaceResize(getO1Label(),0); setTextRotation(getO1Label(),3); setPlaceRotate(getO1Label(),0); setTextJustHoriz(getO1Label(),0); setPlaceAlign(getO1Label(),0); setTextWrap(getO1Label(),true); setPlaceWordWrap(getO1Label(),0); setFontSize(getO1Title(),12); setFontSizeAbsolute(getO1Title(),true); setPlaceResize(getO1Title(),0); setTextRotation(getO1Title(),0); setPlaceRotate(getO1Title(),0); setTextJustHoriz(getO1Title(),1); setPlaceAlign(getO1Title(),0); setTextWrap(getO1Title(),false); setPlaceWordWrap(getO1Title(),0); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * TYPE=DATA, ACROSSCOLUMN=METRIC_VALUE , SIZE=5,COLOR='BLACK', $ TYPE= HEADING,STYLE=BOLD,SIZE=10,COLOR='BLACK',FONT='Times New Roman',$ ENDSTYLE END -* End Graph AssistantThis message has been edited. Last edited by: Kerry,
Ohh sorry... I made the following change to the code and saved the graph as dq1.svg
JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_ELEMENT_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_ELEMENT.DQ_ALL_ELEMENT.DQ_ELEMENT_ID IN DQ_ALL_ELEMENT TAG J001 AS J001 END JOIN J001.DQ_ALL_ELEMENT.DQ_TABLE_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_TABLE.DQ_ALL_TABLE.DQ_TABLE_ID IN DQ_ALL_TABLE TAG J002 AS J002 END JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_METRIC_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_METRICS.DQ_ALL_METRICS.DQ_METRIC_ID IN DQ_ALL_METRICS TAG J003 AS J003 END
TABLE FILE DQ_COLUMN_METRICS_TH -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT RANKED BY HIGHEST 4 MTHYEAR WHERE (J003.DQ_ALL_METRICS.DQ_METRIC_TP EQ 'EMPTY COUNT') AND J001.DQ_ALL_ELEMENT.IS_ACTIVE_IN EQ 'Y';; ON TABLE HOLD AS DQ1 END -RUN
GRAPH FILE DQ1 -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT BY MTHYEAR AS 'PERIOD DATE'
HEADING """
ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET GRWIDTH 1 ON GRAPH SET VZERO ON ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/IBISouthWestern.txt"); setReportParsingErrors(false); setSelectionEnableMove(false); setDisplay(getDataText(),true); setSeriesType(0,2); setLegendDisplay(true); setLegendMarkerPosition(3); setMarkerDisplay(true); setUseSeriesShapes(false); setConnectLineMarkers(true); setConnectScatterMarkers(true); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setY1LabelDisplay(true); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setFontSize(getO1Label(),12); setFontSizeAbsolute(getO1Label(),true); setPlaceResize(getO1Label(),0); setTextRotation(getO1Label(),3); setPlaceRotate(getO1Label(),0); setTextJustHoriz(getO1Label(),0); setPlaceAlign(getO1Label(),0); setTextWrap(getO1Label(),true); setPlaceWordWrap(getO1Label(),0); setFontSize(getO1Title(),12); setFontSizeAbsolute(getO1Title(),true); setPlaceResize(getO1Title(),0); setTextRotation(getO1Title(),0); setPlaceRotate(getO1Title(),0); setTextJustHoriz(getO1Title(),1); setPlaceAlign(getO1Title(),0); setTextWrap(getO1Title(),false); setPlaceWordWrap(getO1Title(),0); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * TYPE=DATA, ACROSSCOLUMN=METRIC_VALUE , SIZE=5,COLOR='BLACK', $ TYPE= HEADING,STYLE=BOLD,SIZE=10,COLOR='BLACK',FONT='Times New Roman',$ ENDSTYLE ON GRAPH HOLD AS DQ1 FORMAT SVG END -RUN
TABLE FILE DQ1 SUM METRIC_VALUE NOPRINT ON TABLE SET STYLE * TYPE=REPORT, IMAGE=DQ1.SVG, GRID=OFF, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -* End Graph Assistant
But receive the error message as below:
0 NUMBER OF RECORDS IN TABLE= 135 LINES= 135 (BEFORE TOTAL TESTS) 0 NUMBER OF RECORDS IN GRAPH= 91 PLOT POINTS= 91 SVG FILE SAVED ... 0 ERROR AT OR NEAR LINE 122 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC3251) IMAGE FILE UNREADABLE OR INVALID: dq1.svg
Thanks for that input. Yes we will get multiple graphs in our case and we want to save it as one pdf file.
I am new to WebFocus hence not aware much of the code. ON GRAPH SET GRMERGE ON is added to my code but this time it does not give an error but show a CROSS symbol as output without displaying anything.
JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_ELEMENT_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_ELEMENT.DQ_ALL_ELEMENT.DQ_ELEMENT_ID IN DQ_ALL_ELEMENT TAG J001 AS J001 END JOIN J001.DQ_ALL_ELEMENT.DQ_TABLE_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_TABLE.DQ_ALL_TABLE.DQ_TABLE_ID IN DQ_ALL_TABLE TAG J002 AS J002 END JOIN DQ_COLUMN_METRICS_TH.DQ_COLUMN_METRICS_TH.DQ_METRIC_ID IN DQ_COLUMN_METRICS_TH TO MULTIPLE DQ_ALL_METRICS.DQ_ALL_METRICS.DQ_METRIC_ID IN DQ_ALL_METRICS TAG J003 AS J003 END
TABLE FILE DQ_COLUMN_METRICS_TH -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT RANKED BY HIGHEST 4 MTHYEAR WHERE (J003.DQ_ALL_METRICS.DQ_METRIC_TP EQ 'EMPTY COUNT') AND J001.DQ_ALL_ELEMENT.IS_ACTIVE_IN EQ 'Y';; ON TABLE HOLD AS DQ1 END -RUN
APP HOLD BASEAPP
GRAPH FILE DQ1 -* Created by Advanced Graph Assistant SUM METRIC_VALUE AS 'EMPTY COUNT' BY TABLE_ELEMENT BY MTHYEAR AS 'PERIOD DATE'
HEADING """
ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET GRWIDTH 1 ON GRAPH SET VZERO ON ON GRAPH SET GRMERGE ON ON GRAPH SET GRAPHSTYLE * setTemplateFile("/images/tdg/template/IBISouthWestern.txt"); setReportParsingErrors(false); setSelectionEnableMove(false); setDisplay(getDataText(),true); setSeriesType(0,2); setLegendDisplay(true); setLegendMarkerPosition(3); setMarkerDisplay(true); setUseSeriesShapes(false); setConnectLineMarkers(true); setConnectScatterMarkers(true); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setY1LabelDisplay(true); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setFontSize(getO1Label(),12); setFontSizeAbsolute(getO1Label(),true); setPlaceResize(getO1Label(),0); setTextRotation(getO1Label(),3); setPlaceRotate(getO1Label(),0); setTextJustHoriz(getO1Label(),0); setPlaceAlign(getO1Label(),0); setTextWrap(getO1Label(),true); setPlaceWordWrap(getO1Label(),0); setFontSize(getO1Title(),12); setFontSizeAbsolute(getO1Title(),true); setPlaceResize(getO1Title(),0); setTextRotation(getO1Title(),0); setPlaceRotate(getO1Title(),0); setTextJustHoriz(getO1Title(),1); setPlaceAlign(getO1Title(),0); setTextWrap(getO1Title(),false); setPlaceWordWrap(getO1Title(),0); setPlace(true); ENDSTYLE ON GRAPH SET STYLE * TYPE=DATA, ACROSSCOLUMN=METRIC_VALUE , SIZE=5,COLOR='BLACK', $ TYPE= HEADING,STYLE=BOLD,SIZE=10,COLOR='BLACK',FONT='Times New Roman',$ ENDSTYLE ON GRAPH HOLD AS NULLSVG FORMAT SVG END -RUN
TABLE FILE DQ1 SUM METRIC_VALUE NOPRINT ON TABLE SET STYLE * TYPE=REPORT,IMAGE=NULLSVG.SVG, GRID=OFF, $ ENDSTYLE ON TABLE PCHOLD FORMAT PDF END -* End Graph Assistant
To get your individual graphs you must remove the GRMERGE statement.
As I said if you use the composer to create the report then it should automatically insert the graphs
However if you want to do it manually then you need to manipulate it.
This expands on a technique posted previously (a folder in the APP PATH is an absolute requirement)
APP HOLD BASEAPP -RUN GRAPH FILE CAR SUM RETAIL_COST BY CAR BY MODEL ON GRAPH SET GRAPHDEFAULT OFF ON GRAPH SET LOOKGRAPH VLINE ON GRAPH SET 3D OFF ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET GRWIDTH 1 ON GRAPH SET VZERO ON ON GRAPH SET GRAPHSTYLE * ENDSTYLE ON GRAPH SET STYLE * TYPE=DATA, ACROSSCOLUMN=METRIC_VALUE , SIZE=5,COLOR='BLACK', $ TYPE= HEADING,STYLE=BOLD,SIZE=10,COLOR='BLACK',FONT='Times New Roman',$ ENDSTYLE ON GRAPH HOLD AS DQ1 FORMAT SVG END -RUN TABLE FILE CAR SUM COMPUTE CNTR/D5.0 = LAST CNTR +1 ; NOPRINT COMPUTE IMAGE/A5 = FTOA(CNTR -1, '(D5.0)', 'A5'); NOPRINT COMPUTE GRAPH/A12= 'DQ1' || LJUST(5,IMAGE,'A5') || '.svg'; AS '' BY CAR NOPRINT ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=DATA, COLUMN=GRAPH, IMAGE=(GRAPH),SIZE=(6.0 1.5),$ ENDSTYLE END