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 trying to output a report with graph in SVG format in PDF, but the graph is not appearing in PDF format whereas the graph appears under HTML and EXL2K format.
Hope you guys could enlighten me alittle, my code as follow :-
-INCLUDE gen_def_env_vars
-SET &FMT = IF (&WFFMT EQ 'HTML' OR &WFFMT EQ 'EXL2K') THEN 'JPEG' ELSE IF &WFFMT EQ 'PDF' THEN 'SVG';
-SET &IMGURL = IF &WFFMT EQ 'HTML' THEN &HTMLIMGURL ELSE &PDFIMGURL;
SET EMPTYREPORT = ON
FILEDEF DATEMAS DISK DATERNG.MAS
-RUN
-WRITE DATEMAS FILE=DATERNG,SUFFIX=XFOC
-WRITE DATEMAS SEGNAME=SEG1
-WRITE DATEMAS FIELD=DATE_KEY, ,I2L ,I2L , $
-RUN
-* Now create it
CREATE FILE DATERNG
MODIFY FILE DATERNG
FREEFORM DATE_KEY.I2L.
LOG FORMAT MSG OFF
LOG TRANS MSG OFF
LOG INVALID MSG OFF
DATA
-* This repeat loop will repeat 31 days
-SET &Year = &year;
-SET &Day = 1;
-REPEAT :Loop1 31 TIMES;
&Day
-SET &Day = &Day + 1;
-:Loop1
END
-RUN
TABLE FILE DATERNG
PRINT DATE_KEY
BY DATE_KEY
ON TABLE HOLD AS DATERANGE
END
-RUN
-*Card Application File
DEFINE FILE APPL
UPDTCENTURY/I7 = IF ARGLEN(7,EDIT(ANUPDT),UPDTCENTURY) = 6 THEN 0 ELSE IF SUBSTR(7, EDIT(ANUPDT), 0, 1, 1, 'A1') = '1' THEN 1 ELSE 0;
UPDT8/I8 = IF UPDTCENTURY = 0 THEN 19000000 + ANUPDT ELSE IF UPDTCENTURY = 1 THEN 20000000 + ANUPDT;
UPDT/YYMD = DATECVT(UPDT8, 'I8YYMD', 'I8YYMD');
DATE3/A8YYMD = UPDT;
DD/A2 = EDIT(DATE3,'$$$$$$99');
DD3/I2L = EDIT(DD);
MM3/A2 = EDIT(DATE3,'$$$$99$$');
YY3/A4 = EDIT(DATE3,'9999$$$$');
END
TABLE FILE APPL
PRINT
*
UPDT
DD3
BY DD3
BY UPDT
BY ANAVST
ON TABLE HOLD AS HOLD1
END
-*Join Date Range with Card Application File
JOIN LEFT_OUTER DATE_KEY IN DATERANGE
TO MULTIPLE DD3 IN HOLD1 AS J0
WHERE ANAVST EQ '3' OR ANAVST EQ '9' OR ANAVST EQ '2'
END
DEFINE FILE DATERANGE
PROCESSED_URL/A200 = '&PROCESSEDIMGURL';
DATE3/A8YYMD = UPDT;
DD4/A2 = EDIT(DATE3,'$$$$$$99');
MM4/A2 = EDIT(DATE3,'$$$$99$$');
YY4/A4 = EDIT(DATE3,'9999$$$$');
JANCNT_PRC/I7 = IF MM4 EQ '01' AND ANAVST EQ '3' THEN 1 ELSE 0;
FEBCNT_PRC/I7 = IF MM4 EQ '02' AND ANAVST EQ '3' THEN 1 ELSE 0;
MARCNT_PRC/I7 = IF MM4 EQ '03' AND ANAVST EQ '3' THEN 1 ELSE 0;
APRCNT_PRC/I7 = IF MM4 EQ '04' AND ANAVST EQ '3' THEN 1 ELSE 0;
MAYCNT_PRC/I7 = IF MM4 EQ '05' AND ANAVST EQ '3' THEN 1 ELSE 0;
JUNCNT_PRC/I7 = IF MM4 EQ '06' AND ANAVST EQ '3' THEN 1 ELSE 0;
JULCNT_PRC/I7 = IF MM4 EQ '07' AND ANAVST EQ '3' THEN 1 ELSE 0;
AUGCNT_PRC/I7 = IF MM4 EQ '08' AND ANAVST EQ '3' THEN 1 ELSE 0;
SEPCNT_PRC/I7 = IF MM4 EQ '09' AND ANAVST EQ '3' THEN 1 ELSE 0;
OCTCNT_PRC/I7 = IF MM4 EQ '10' AND ANAVST EQ '3' THEN 1 ELSE 0;
NOVCNT_PRC/I7 = IF MM4 EQ '11' AND ANAVST EQ '3' THEN 1 ELSE 0;
DECCNT_PRC/I7 = IF MM4 EQ '12' AND ANAVST EQ '3' THEN 1 ELSE 0;
END
-SET &APPLFOLDER = &APPFOLDER;
-SET &GIF_FILE1 = 'processed.jpg' ;
-SET &PATH1 = &APPLFOLDER || &GIF_FILE1;
APP FI 'PROCESSED' DISK &PATH1
-RUN
-*Generate Processed Graph
GRAPH FILE DATERANGE
SUM HOLD1.HOLD1.JANCNT_PRC AS 'JAN' HOLD1.HOLD1.FEBCNT_PRC AS 'FEB' HOLD1.HOLD1.MARCNT_PRC
AS 'MAR' HOLD1.HOLD1.APRCNT_PRC AS 'APR' HOLD1.HOLD1.MAYCNT_PRC AS 'MAY' HOLD1.HOLD1.JUNCNT_PRC
AS 'JUN' HOLD1.HOLD1.JULCNT_PRC AS 'JUL' HOLD1.HOLD1.AUGCNT_PRC AS 'AUG' HOLD1.HOLD1.SEPCNT_PRC
AS 'SEP' HOLD1.HOLD1.OCTCNT_PRC AS 'OCT' HOLD1.HOLD1.NOVCNT_PRC AS 'NOV' HOLD1.HOLD1.DECCNT_PRC
AS 'DEC'
BY DATERANGE.DATERANG.DATE_KEY AS 'Days'
ON GRAPH HOLD AS PROCESSED FORMAT &FMT
ON GRAPH SET LOOKGRAPH VLINSTK2
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO ON
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(true);
setConnectScatterMarkers(true);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(1);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,2);
setAxisAssignment(1,1);
setSeriesType(1,2);
setAxisAssignment(2,0);
setSeriesType(2,2);
setAxisAssignment(3,0);
setSeriesType(3,2);
setAxisAssignment(4,0);
setSeriesType(4,2);
setAxisAssignment(5,0);
setSeriesType(5,2);
setAxisAssignment(6,0);
setSeriesType(6,2);
setAxisAssignment(7,0);
setSeriesType(7,2);
setAxisAssignment(8,0);
setSeriesType(8,2);
setAxisAssignment(9,0);
setSeriesType(9,2);
setAxisAssignment(10,0);
setSeriesType(10,2);
setAxisAssignment(11,0);
setSeriesType(11,2);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(1);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setY2LabelDisplay(true);
setY2AxisSide(1);
setY2MajorGridDisplay(true);
setY2MajorGridStyle(0);
setY2MinorGridDisplay(false);
setTextFormatPreset(getY2Label(),-1);
setTextFormatPattern(getY2Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setTitleString("Daily Cards Processed Trend");
setFontSizeAbsolute(getTitle(),true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
TITLETEXT='Daily Cards Processed Trend',
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
-RUN
-* Generate Processed Report
TABLE FILE DATERANGE
SUM
'DATERANGE.DATERANG.DATE_KEY' AS 'Day'
'HOLD1.HOLD1.JANCNT_PRC' AS 'Jan'
'HOLD1.HOLD1.FEBCNT_PRC' AS 'Feb'
'HOLD1.HOLD1.MARCNT_PRC' AS 'Mar'
'HOLD1.HOLD1.APRCNT_PRC' AS 'Apr'
'HOLD1.HOLD1.MAYCNT_PRC' AS 'May'
'HOLD1.HOLD1.JUNCNT_PRC' AS 'Jun'
'HOLD1.HOLD1.JULCNT_PRC' AS 'Jul'
'HOLD1.HOLD1.AUGCNT_PRC' AS 'Aug'
'HOLD1.HOLD1.SEPCNT_PRC' AS 'Sep'
'HOLD1.HOLD1.OCTCNT_PRC' AS 'Oct'
'HOLD1.HOLD1.NOVCNT_PRC' AS 'Nov'
'HOLD1.HOLD1.DECCNT_PRC' AS 'Dec'
BY 'DATERANGE.DATERANG.DATE_KEY' NOPRINT
ON TABLE SUBHEAD
" "
HEADING
"DAILY CARD PROCESSED TREND FOR THE YEAR OF <+0>&year"
-IF &WFFMT EQ 'PDF' THEN GOTO PDF_FOOT ELSE GOTO OTHER_FOOT;
-PDF_FOOT
FOOTING BOTTOM
" "
" "
" "
"Private & Confidential"
"Report Generated On <+0>&DATEtrDMYY<+0> <+0> "
-GOTO END_FOOT;
-OTHER_FOOT
FOOTING BOTTOM
" "
"<PROCESSED_URL"
" "
"Private & Confidential"
"Report Generated On <+0>&DATEtrDMYY<+0> <+0> "
-END_FOOT
ON TABLE SET PAGE-NUM ON
ON TABLE COLUMN-TOTAL AS 'Total' 'HOLD1.HOLD1.JANCNT_PRC' 'HOLD1.HOLD1.FEBCNT_PRC' 'HOLD1.HOLD1.MARCNT_PRC' 'HOLD1.HOLD1.APRCNT_PRC' 'HOLD1.HOLD1.MAYCNT_PRC' 'HOLD1.HOLD1.JUNCNT_PRC' 'HOLD1.HOLD1.JULCNT_PRC' 'HOLD1.HOLD1.AUGCNT_PRC' 'HOLD1.HOLD1.SEPCNT_PRC' 'HOLD1.HOLD1.OCTCNT_PRC' 'HOLD1.HOLD1.NOVCNT_PRC' 'HOLD1.HOLD1.DECCNT_PRC'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
LEFTMARGIN=0.180556,
RIGHTMARGIN=0.180556,
TOPMARGIN=0.180556,
BOTTOMMARGIN=0.180556,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
PAGECOLOR=RGB(245 245 245),
$
TYPE=REPORT,
FONT='COURIER NEW',
SIZE=8,
COLOR='BLACK',
STYLE=NORMAL,
$
-IF &WFFMT EQ 'PDF' THEN GOTO PDF_RPT ELSE GOTO END_RPT;
-PDF_RPT
TYPE=REPORT,
IMAGE=PROCESSED.SVG,
POSITION=(0.083333 6.680556),
SIZE=(6.000000 3.000000),
$
-END_RPT
Regards, Kevin TongThis message has been edited. Last edited by: Kevin Tong,
WebFOCUS 7.6.9 Windows 2003, all output
Posts: 32 | Location: Malaysia | Registered: December 29, 2009