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     [CLOSED] Definitive code to produce a Compound Excel Report with Graph

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Definitive code to produce a Compound Excel Report with Graph
 Login/Join
 
Expert
posted
I would like to generate an Excel spreadsheet containing a report and an embedded graph in the same tab.

I've tried some of the examples in FocalPoint (including my own) and cannot get them to work in v7.6.5. I've tried a couple from the WebFOCUS documentation and cannot get them to work either. They either result in no graph showing up or the graph showing up in a separate tab.

I've tried the new-fangled Document Composer code (example below) and that results in three tabs - one tab with a graph image, one tab with a report and one blank tab.

Creating Reports With WebFOCUS Language > Linking a Report to Other Resources > Creating a Compound Report does not show an example of what I'm looking for.

I would appreciate somebody posting definitive code that works in v7.6 and results in an Excel spreadsheet containing a report and an embedded graph in the same tab, using old or new fangled COMPOUND code.

-* File graph_excel3
-* Default Mode: ResourceLayout
SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT EXL2K
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter,  $
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='graph1', TEXT='graph1', TOC-LEVEL=2, POSITION=(0.498 0.498), DIMENSION=(3.554 2.804), 
METADATA='Z-INDEX: 100; LEFT: 0.498in; WIDTH: 3.554in; POSITION: absolute; TOP: 0.498in; HEIGHT: 2.804in', $
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(4.038 0.496), DIMENSION=(3.961 2.800), 
METADATA='Z-INDEX: 100; LEFT: 4.038in; OVERFLOW: auto; WIDTH: 3.961in; POSITION: absolute; TOP: 0.496in; HEIGHT: 2.8in', $
PAGELAYOUT=1, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5,
METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $
COMPONENT='DfltCmpt2', POSITION=(0 0), DIMENSION=(0 0), $
END
SET COMPONENT='graph1'
-*component_type graph
GRAPH FILE CAR
SUM SALES
ACROSS COUNTRY
ON GRAPH SET LOOKGRAPH 3D_BAR
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 VAXIS 2.804
ON GRAPH SET HAXIS 3.554
ON GRAPH SET UNITS INCHES
ON GRAPH HOLD AS HOLD FORMAT SVG
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(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,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
ENDSTYLE
END
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
ON TABLE SET PAGE-NUM NOLEAD
IF READLIMIT EQ 1
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
type=HEADING, IMAGE=HOLD.svg, position=(0 0), $
TYPE=REPORT,PAGE-LOCATION=OFF,$
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
SUM
SALES
BY COUNTRY
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=TABFOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=HEADING,
SIZE=12,
STYLE=BOLD,
$
TYPE=FOOTING,
SIZE=12,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
SIZE=9,
$
TYPE=ACROSSTITLE,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
STYLE=BOLD,
$
ENDSTYLE
END
SET COMPONENT='DfltCmpt2'
TABLE FILE SYSCOLUM
" "
SUM TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE SET PREVIEW ON
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
object=line, position=(-1 -1), endpoint=(-2 -2), $
END
COMPOUND END

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


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
I played around with that very thing a couple of weeks ago and couldn't get anything to work. I searched the Forum as well and didn't find anything helpful. I determined that it wasn't doable unless you used a template which I didn't want to do.

The PDF Composer puts the graph on a separate tab as I'm sure you have already discovered.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
Yes, the graph is on a separate tab, despite the "PAGELAYOUT=1" for both components.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
  
-SET &ECHO=ALL;
-SET &APPFOLDER  = 'baseapp/';
-SET &USERID     = GETUSER('A8');
-SET &LC_USER    = LOCASE(8, &USERID, 'A8');
-SET &GIF_FILE1  = &LC_USER || 'graph1' || '.jpg' ;
-SET &PATH       = &APPFOLDER || &GIF_FILE1;
APP FI GRAPH2 DISK &PATH
-RUN
GRAPH FILE CAR
SUM
     RETAIL_COST AS ''
ACROSS COUNTRY
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 520
ON GRAPH SET VAXIS 205
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH HOLD AS GRAPH2 FORMAT JPEG
ON GRAPH SET STYLE *
TYPE = REPORT,  FONT=VERDANA, SIZE=9, $
TYPE = HEADING, FONT=VERDANA, SIZE=10, STYLE=BOLD, $
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setFontName(getDataText(),"Verdana");
setDepthAngle(65);
setPieDepth(45);
restoreAllSlices();
setPieFeelerTextDisplay(2);
setPieTilt(25);
setPieLabelDisplay(0);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),5);
setFontSizeInPoints(getTitle(),12);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),9);
setTextFormatPattern(getDataText(),"$#,###,###,###.##");
setFontSizeInPoints(getO1Label(),9);
setFontSizeInPoints(getY1Label(),9);
setFontSize(getDataText(),10);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),12);
setLegendMarkerPosition(0);
setTransparentBorderColor(getChartBackground(),true);
setRect(getPieFrame(), new Rectangle(-15500,-13500,27000,27000));
setRect(getFrame(), new Rectangle(-10400,-10000,25000,30000));
setTextString(getTitle(),"TOTAL RETAIL COST BY COUNTRY");
ENDSTYLE
END
-RUN
-SET &GIF_FILE2  = &LC_USER || 'graph2' || '.jpg' ;
-SET &PATH       = &APPFOLDER || &GIF_FILE2;
APP FI GRAPH2 DISK &PATH
-RUN
GRAPH FILE CAR
SUM
   COMPUTE PROFIT/P13.2M = RETAIL_COST-DEALER_COST; AS ' '
ACROSS COUNTRY
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 520
ON GRAPH SET VAXIS 205
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH HOLD AS GRAPH2 FORMAT JPEG
ON GRAPH SET STYLE *
TYPE = REPORT,  FONT=VERDANA, SIZE=9, $
TYPE = HEADING, FONT=VERDANA, SIZE=10, STYLE=BOLD, $
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setFontName(getDataText(),"Verdana");
setDepthAngle(65);
setPieDepth(45);
restoreAllSlices();
setPieFeelerTextDisplay(2);
setPieTilt(25);
setPieLabelDisplay(0);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),5);
setFontSizeInPoints(getTitle(),12);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),9);
setTextFormatPattern(getDataText(),"$#,###,###,###.##");
setFontSizeInPoints(getO1Label(),9);
setFontSizeInPoints(getY1Label(),9);
setFontSize(getDataText(),10);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),12);
setLegendMarkerPosition(0);
setTransparentBorderColor(getChartBackground(),true);
setRect(getPieFrame(), new Rectangle(-15500,-13500,27000,27000));
setRect(getFrame(), new Rectangle(-10400,-10000,25000,30000));
setTextString(getTitle(),"TOTAL PROFIT BY COUNTRY");
ENDSTYLE
END
-RUN
DEFINE FILE CAR
 IMAGE1/A200='<img src=http://localhost:8080/approot/baseapp/&GIF_FILE1>';
 IMAGE2/A200='<img src=http://localhost:8080/approot/baseapp/&GIF_FILE2>';
 X1A/A15         = '<TABLE>';
 X1B/A15         = '<TR>';
 X1C/A20         = '</TR>';
 X1D/A10         = '</TABLE>';
 X1E/A30         = '<TD COLSPAN=5 align="left">';
 X_END/A5        = '</TD>';
 X2A/A30         = '<TD COLSPAN=5 align="right">';
END
TABLE FILE CAR
HEADING
"<X1A<X1B<X1E<IMAGE1<X_END<X2A<IMAGE2<X_END<X1C<X1D"
"</12 "
SUM
  DEALER_COST/P13.2M AS 'Dealer Cost'
  RETAIL_COST/P13.2M AS 'Retail Cost'
    COMPUTE PROFIT/P13.2M = RETAIL_COST-DEALER_COST; AS 'Profit'
  SALES/P13.2M AS 'Sales'
  SEATS AS 'Seats'
BY COUNTRY AS 'Country'
BY CAR AS 'Car'
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Style'
ON COUNTRY SUBFOOT
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     LEFTMARGIN=0.400000,
     RIGHTMARGIN=0.050000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
     ORIENTATION=LANDSCAPE,
     SQUEEZE=ON,
$
TYPE=TITLE,
  STYLE=BOLD, SIZE=10, FONT=VERDANA,
$
TYPE=REPORT, TITLETEXT='Report 1',$
ENDSTYLE
END
-RUN
-SET &ECHO=ALL;
-SET &APPFOLDER  = 'baseapp/';
-SET &USERID     = GETUSER('A8');
-SET &LC_USER    = LOCASE(8, &USERID, 'A8');
-SET &GIF_FILE1  = &LC_USER || 'graph1' || '.jpg' ;
-SET &PATH       = &APPFOLDER || &GIF_FILE1;
APP FI GRAPH2 DISK &PATH
-RUN
GRAPH FILE CAR
SUM
     RETAIL_COST AS ''
ACROSS COUNTRY
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 520
ON GRAPH SET VAXIS 205
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH HOLD AS GRAPH2 FORMAT JPEG
ON GRAPH SET STYLE *
TYPE = REPORT,  FONT=VERDANA, SIZE=9, $
TYPE = HEADING, FONT=VERDANA, SIZE=10, STYLE=BOLD, $
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setFontName(getDataText(),"Verdana");
setDepthAngle(65);
setPieDepth(45);
restoreAllSlices();
setPieFeelerTextDisplay(2);
setPieTilt(25);
setPieLabelDisplay(0);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),5);
setFontSizeInPoints(getTitle(),12);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),9);
setTextFormatPattern(getDataText(),"$#,###,###,###.##");
setFontSizeInPoints(getO1Label(),9);
setFontSizeInPoints(getY1Label(),9);
setFontSize(getDataText(),10);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),12);
setLegendMarkerPosition(0);
setTransparentBorderColor(getChartBackground(),true);
setRect(getPieFrame(), new Rectangle(-15500,-13500,27000,27000));
setRect(getFrame(), new Rectangle(-10400,-10000,25000,30000));
setTextString(getTitle(),"TOTAL RETAIL COST BY COUNTRY");
ENDSTYLE
END
-RUN
-SET &GIF_FILE2  = &LC_USER || 'graph2' || '.jpg' ;
-SET &PATH       = &APPFOLDER || &GIF_FILE2;
APP FI GRAPH2 DISK &PATH
-RUN
GRAPH FILE CAR
SUM
   COMPUTE PROFIT/P13.2M = RETAIL_COST-DEALER_COST; AS ' '
ACROSS COUNTRY
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 520
ON GRAPH SET VAXIS 205
ON GRAPH SET UNITS PIXELS
ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 2
ON GRAPH HOLD AS GRAPH2 FORMAT JPEG
ON GRAPH SET STYLE *
TYPE = REPORT,  FONT=VERDANA, SIZE=9, $
TYPE = HEADING, FONT=VERDANA, SIZE=10, STYLE=BOLD, $
ENDSTYLE
ON GRAPH SET GRAPHSTYLE *
setTemplateFile("/images/tdg/template/IBISouthWestern.txt");
setFontName(getDataText(),"Verdana");
setDepthAngle(65);
setPieDepth(45);
restoreAllSlices();
setPieFeelerTextDisplay(2);
setPieTilt(25);
setPieLabelDisplay(0);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),5);
setFontSizeInPoints(getTitle(),12);
setFontSizeAbsolute(getPieSliceLabel(),true);
setFontSizeInPoints(getPieSliceLabel(),8);
setFontSizeAbsolute(getLegendText(),true);
setFontSizeInPoints(getLegendText(),9);
setTextFormatPattern(getDataText(),"$#,###,###,###.##");
setFontSizeInPoints(getO1Label(),9);
setFontSizeInPoints(getY1Label(),9);
setFontSize(getDataText(),10);
setFontSizeAbsolute(getTitle(),true);
setFontSizeInPoints(getTitle(),12);
setLegendMarkerPosition(0);
setTransparentBorderColor(getChartBackground(),true);
setRect(getPieFrame(), new Rectangle(-15500,-13500,27000,27000));
setRect(getFrame(), new Rectangle(-10400,-10000,25000,30000));
setTextString(getTitle(),"TOTAL PROFIT BY COUNTRY");
ENDSTYLE
END
-RUN
DEFINE FILE CAR
 IMAGE2/A200='<img src=http://localhost:8080/approot/baseapp/&GIF_FILE1>';
 IMAGE1/A200='<img src=http://localhost:8080/approot/baseapp/&GIF_FILE2>';
 X1A/A15         = '<TABLE>';
 X1B/A15         = '<TR>';
 X1C/A20         = '</TR>';
 X1D/A10         = '</TABLE>';
 X1E/A30         = '<TD COLSPAN=5 align="left">';
 X_END/A5        = '</TD>';
 X2A/A30         = '<TD COLSPAN=5 align="right">';
END
TABLE FILE CAR
HEADING
"<X1A<X1B<X1E<IMAGE1<X_END<X2A<IMAGE2<X_END<X1C<X1D"
"</12 "
SUM
  DEALER_COST/P13.2M AS 'Dealer Cost'
  RETAIL_COST/P13.2M AS 'Retail Cost'
    COMPUTE PROFIT/P13.2M = RETAIL_COST-DEALER_COST; AS 'Profit'
  SALES/P13.2M AS 'Sales'
  SEATS AS 'Seats'
BY COUNTRY AS 'Country'
BY CAR AS 'Car'
BY MODEL AS 'Model'
BY BODYTYPE AS 'Body Style'
ON COUNTRY SUBFOOT
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT EXL2K CLOSE
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     LEFTMARGIN=0.400000,
     RIGHTMARGIN=0.050000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
     ORIENTATION=LANDSCAPE,
     SQUEEZE=ON,
$
TYPE=TITLE,
  STYLE=BOLD, SIZE=10, FONT=VERDANA,
$
TYPE=REPORT, TITLETEXT='Report 2',$
ENDSTYLE
END
-RUN





Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
Unfortunately, this approach does not work on a three-tier environment: WebFOCUS generates the image file on the WebFOCUS server, the image URL must refer to the Web server - two different machines.

Thanks,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Store the images in FOCCACHE? Just a thought..


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Expert
posted Hide Post
It seems the files in FOCCACHE are only accessible by a WebFOCUS command like TABLE or MATCH, you can't store just any type of file in there. Thanks though.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Would this be something that the "WebFOCUS / Excel" Addon (to the Excel toolbar) should handle? As in Creating that which you desire in Excel and Access WebFOCUS from within Excel? I don't have access to that. But, from my understanding thats' what it should do, right?

I'm all ears on this one. Confused BTW: I got the same results with WF764 / Windows.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
No, thanks - I'd rather not be going down that route.

It shouldn't be complicated to get WebFOCUS to generate an Excel report with an embedded image of a graph in the same tab. But it seems to be complicated to create a fool-proof example that can run on any kind of WebFOCUS environment - single or multi-tier. I dontgetit.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
If I need graphs in Excel then I use the best tool for the job and that is the Excel graphing engine (I believe it is a ThreeD engine as well). Knocking up a bit of VBA to achieve the graph for a prepared data grid from WebFOCUS is not hard. I actually have a standard template that accepts a data grid and the VBA then produces as many pivot tables and pivot graphs as you specify in the header.

Demo at Summit if you want. Look me up.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Try this sample code. If it works implement the same ur code

-SET &ECHO = ALL;

SET HTMLARCHIVE=ON
COMPOUND LAYOUT PCHOLD FORMAT EXL2K
UNITS=IN, $
SECTION=section1,
LAYOUT=ON,
ORIENTATION=PORTRAIT,
PAGESIZE=Letter, $
PAGELAYOUT=1, $
COMPONENT='REPORT1', $
COMPONENT='HOLD1', $
END

SET TEMPERASE = OFF

SET COMPONENT='REPORT1'
TABLE FILE CAR
SUM
SALES
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K NOBREAK
END

SET COMPONENT='HOLD1'
GRAPH FILE CAR
SUM
SALES
BY COUNTRY
ON GRAPH HOLD AS GIF1 FORMAT GIF
ON GRAPH SET STYLE *
SQUEEZE=ON, ORIENTATION=PORTRAIT, $
TYPE=REPORT, GRID=OFF, FONT='TIMES NEW ROMAN', SIZE=10, $
ENDSTYLE
END

TABLE FILE CAR
SUM
SALES NOPRINT
ON TABLE SET PAGE-NUM OFF
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, IMAGE=GIF1.GIF,$
ENDSTYLE
END

COMPOUND END


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
 
Posts: 63 | Registered: January 12, 2011Report This Post
Gold member
posted Hide Post
Arabind,
Your code produces below error
Would you Please advice
(FOC3295) NOBREAK FOUND OUTSIDE OF A COMPOUND REPORT
(FOC009) INCOMPLETE REQUEST STATEMENT
(FOC3296) Error found in Coordinated Compound Report: At Component REPORT1
Compound Report is TERMINATING.....
BYPASSING TO END OF COMMAND

Thanks,
DD


WebFocus 7.7.01
Desktop: Windows and Server: Unix
Excel, HTML, PDF
 
Posts: 69 | Registered: September 12, 2009Report This Post
Member
posted Hide Post
Hi,
did anyone managed to make this work?
I'm trying this:

 -* File car1.fex
GRAPH FILE CAR
SUM CAR.BODY.SEATS
ACROSS CAR.CARREC.MODEL
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 PCHOLD FORMAT EXL2K OPEN
ON GRAPH PCHOLD FORMAT EXL2K NOBREAK
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
$
ENDSTYLE
END


GRAPH FILE CAR
SUM CAR.BODY.SEATS
ACROSS CAR.CARREC.MODEL
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 PCHOLD FORMAT EXL2K NOBREAK
ON GRAPH PCHOLD FORMAT EXL2K CLOSE
ON GRAPH SET GRAPHSTYLE *
setMarkerDisplay(true);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setAxisAssignment(0,0);
setSeriesType(0,0);
setY1LabelDisplay(true);
setY1AxisSide(0);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setTextFormatPreset(getY1Label(),-1);
setTextFormatPattern(getY1Label(),"#.##");
setPieFeelerTextDisplay(1);
setPieLabelDisplay(0);
setTextFormatPreset(getPieSliceLabel(),1);
setRiserBorderMode(1);
setSeriesDefaultTransparentBorderColor(true);
setUseSeriesBorderDefaults(true);
setLegendDisplay(true);
setFontSizeAbsolute(getY1Title(),true);
setFontSizeAbsolute(getY1Label(),true);
setFontSizeAbsolute(getY2Title(),true);
setFontSizeAbsolute(getY2Label(),true);
setFontSizeAbsolute(getO1Title(),true);
setPlace(true);
ENDSTYLE
ON GRAPH SET STYLE *
$
ENDSTYLE
END
 


But it keeps giving me this error:
quote:
(FOC3295) NOBREAK FOUND OUTSIDE OF A COMPOUND REPORT(FOC009) INCOMPLETE REQUEST STATEMENTBYPASSING TO END OF COMMAND


Does anyone have a working example?
tks


Release : 8.0.02
OS : Linux
App Server : Tomcat
all output
 
Posts: 23 | Registered: June 26, 2012Report 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     [CLOSED] Definitive code to produce a Compound Excel Report with Graph

Copyright © 1996-2020 Information Builders