[CLOSED] Graphs and tabular reports in Excel format
Hi, I have requirement to export the reports in excel using report caster In the 1st sheet need to show the Chart and tabular report and the same in another sheet or ist sheet contains two graphs and the next contains two tabular reports in the same workbook.
Below is my sample code (WF 7703)
1st component contains two graph images and the 2nd component contains two tabular report; in the 2nd component it took the first report data only, it won't get the 2nd report data.
Please guide!
APP HOLD <domain name>
FILEDEF GRAPH1 DISK <domain name>/graph1.gif
FILEDEF GRAPH2 DISK <domain name>/graph2.gif
GRAPH FILE CAR
SUM SUM.CAR.BODY.RETAIL_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH PIEMULTI
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 HOLD AS GRAPH1 FORMAT GIF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 450
ON GRAPH SET VAXIS 400
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
END
-RUN
GRAPH FILE CAR
SUM SUM.CAR.BODY.DEALER_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH PIEMULTI
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 TABLE PCHOLD FORMAT PNG
ON GRAPH HOLD AS GRAPH2 FORMAT GIF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 450
ON GRAPH SET VAXIS 400
END
-RUN
COMPOUND LAYOUT PCHOLD FORMAT EXL2K
SECTION=section1,LAYOUT=ON,ORIENTATION=PORTRAIT,PAGESIZE=Letter, $
PAGELAYOUT=1, $
COMPONENT = 'REPORT1',$
COMPONENT = 'REPORT2',$
END
SET COMPONENT='REPORT1'
DEFINE FILE SYSCOLUM
GRAPH1/A100 = '<img src=<path>/approot/<domain name>/graph1.gif>';
GRAPH2/A100 = '<img src=<path>/approot/<domain name>/graph2.gif>';
END
TABLE FILE SYSCOLUM
" "
HEADING
"<GRAPH1"
"</25"
"<GRAPH2"
SUM TBNAME NOPRINT
ON TABLE SET PAGE-NUM NOLEAD
IF READLIMIT EQ 1
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT,PAGE-LOCATION=OFF,$
TYPE=REPORT,FONT='ARIAL',TITLETEXT='Graph Report1',$
TYPE=HEADING,LINE=1,$
ENDSTYLE
END
SET COMPONENT='REPORT2'
TABLE FILE CAR
"1ST REPORT"
PRINT CAR RETAIL_COST
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
TABLE FILE CAR
PRINT CAR CAR CAR
HEADING
"2ND REPORT"
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END
COMPOUND END
This message has been edited. Last edited by: <Kathryn Henning>,
8202, 8105M, 7.7.03
March 06, 2014, 02:03 PM
<Kathryn Henning>
Hi Dev,
I added code tags to your code so that it would display correctly. For future reference, you can use the code tags button which is the last one on the tool bar.
Cheers!
Kathryn
March 07, 2014, 02:55 AM
Dev
Hi Kathryn,
Thanks for your reply, still the second sheet not displaying the second report
8202, 8105M, 7.7.03
March 13, 2014, 03:49 PM
susannah
quote:
TABLE FILE SYSCOLUM " " HEADING ""25" "
well, take out that line of double quotes. You've got your HEADING command one too far down. and lets not confuse with word domain with the word app. now... interesting...i could EITHER get the grafs to come out in excel on the first sheet, OR i could get 3 sheets with no grafs. Seems the COMPOUND kills the grafs. i even tried NOBREAK with all 3 on the same tab, no cigar on the graphs. i'm in 7.6 as well here, i simplified your pathing and your compounding, btw. maybe someone else can take a crack.
APP PATH IBISAMP
-SET &ECHO = ALL ;
FILEDEF GRAPH1 DISK c:\ibi\apps\xsusantest\GRAPH1.gif
FILEDEF GRAPH2 DISK c:\ibi\apps\xsusantest\GRAPH2.gif
GRAPH FILE CAR
SUM SUM.CAR.BODY.RETAIL_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH PIEMULTI
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 HOLD AS GRAPH1 FORMAT GIF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 450
ON GRAPH SET VAXIS 400
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH VLINE
END
-RUN
GRAPH FILE CAR
SUM SUM.CAR.BODY.DEALER_COST
ACROSS CAR.ORIGIN.COUNTRY
ON GRAPH SET LOOKGRAPH PIEMULTI
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 TABLE PCHOLD FORMAT PNG
ON GRAPH HOLD AS GRAPH2 FORMAT GIF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET HAXIS 450
ON GRAPH SET VAXIS 400
END
-RUN
DEFINE FILE CAR
GRAPH1/A100 WITH CAR =
'<IMG TITLE="GRAF1" SRC="/approot/xsusantest/GRAPH1.gif" style="border: 1px solid #FFFFFF;"> ' ;
GRAPH2/A100 WITH CAR =
'<IMG TITLE="GRAF2" SRC="/approot/xsusantest/GRAPH2.gif" style="border: 1px solid #FFFFFF;">' ;
END
-RUN
TABLE FILE CAR
HEADING
"<GRAPH1 "
"</25"
"<GRAPH2 "
SUM CAR
ON TABLE SET PAGE-NUM NOLEAD
IF RECORDLIMIT EQ 1
-*ON TABLE SET COMPOUND OPEN NOBREAK
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT,PAGE-LOCATION=OFF,$
TYPE=REPORT,FONT='ARIAL',TITLETEXT='Graph Report1',$
TYPE=HEADING,LINE=1,$
ENDSTYLE
END
-RUN
-EXIT
TABLE FILE CAR
"1ST REPORT"
PRINT CAR RETAIL_COST
ON TABLE SET COMPOUND OPEN
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
TABLE FILE CAR
PRINT CAR CAR CAR
HEADING
"2ND REPORT"
ON TABLE SET COMPOUND CLOSE
ON TABLE PCHOLD FORMAT EXL2K
END
CMD ERASE c:\ibi\apps\xsusantest\GRAPH*.gif
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
April 26, 2017, 12:20 PM
Jagriti Kumari
Hi Dev/Susannah,
Any success in this issue?
please provide a working example for reference.
Regards,
Jagriti
WebFocus 7.7, Developer Studio 7707, Windows 8,Report Caster Output Format - Excel, PDF, HTML