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] Graphs in Excel

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Graphs in Excel
 Login/Join
 
Gold member
posted
Hi Everyone,

I'm having a tough time creating Graph & loading into EXL2K.

Can anybody give me a sample code for creating Graph & pulling graph into Excel.

Thanks

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


Prod: WF 7.6.10 windows. -- MRE/Dashboard/Self Service/ReportCaster - Windows XP
 
Posts: 82 | Location: Chicago | Registered: September 28, 2005Report This Post
Expert
posted Hide Post
  
-SET &ECHO=ALL;
-SET &R          = RDUNIF('D4.2') * 10000;
-SET &APPFOLDER  = 'baseapp/';
-SET &USERID     = GETUSER('A8');
-SET &LC_USER    = LOCASE(8, &USERID, 'A8');
-SET &GIF_FILE   = &LC_USER || &R || '.jpg' ;
-SET &PATH       = &APPFOLDER || &GIF_FILE;
APP FI GRAPH2 DISK &PATH
-RUN

GRAPH FILE CAR
HEADING CENTER
"TOTAL RETAIL COST BY COUNTRY"
" "
SUM RETAIL_COST AS ''
ACROSS COUNTRY
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET HAXIS 770
ON GRAPH SET VAXIS 405
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 = DATA,    FOCEXEC=app/CAR_DRILL(COUNTRY = A1), ACROSSCOLUMN=RETAIL_COST, TARGET=_blank, $
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(1);
setDisplay(getPieLabel(),true);
setLegendAutomatic(false);
setFontStyle(getLegendText(),2);
setFontStyle(getPieSliceLabel(),2);
setTextFormatPreset(getPieSliceLabel(),4);
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));
ENDSTYLE
END
-RUN
DEFINE FILE CAR
IMAGE/A200='<img src=http://localhost:8080/approot/baseapp/&GIF_FILE>';
END
TABLE FILE CAR
HEADING
" "
"<IMAGE>"
" "
BY COUNTRY NOPRINT
IF RECORDLIMIT EQ 1
ON COUNTRY SUBFOOT
" "
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='Letter',
     LEFTMARGIN=0.400000,
     RIGHTMARGIN=0.050000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
     ORIENTATION=LANDSCAPE,
     SQUEEZE=OFF,
     TITLETEXT='Excel Graph',
$
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
Member
posted Hide Post
I can think of a couple of options.

I don't know if you've tried using an Excel template. This would allow you to "tune" your graph with Excel's settings, as Excel is generating the graph.

Another quick option would be to save a graph in WebFOCUS in a graphical format (e.g. GIF), then embed the object in the spreadsheet.


WebFOCUS 53, 71, 76 - All Platforms
 
Posts: 15 | Location: Information Builders - Chicago | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
In case it helps anyone else, I had to add
SET GRAPHSERVURL=https://my-webfocus-server/ibi_apps/IBIGraphServlet


to the code above.


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 88 | Location: MI | Registered: July 23, 2009Report This Post
Gold member
posted Hide Post
The way that Tom describes it above is the way it works with the code. If you want to do it a way that I consider a little simpler, then I would create fex to handle your gif (Make sure to do on table save as gifname) and then reference it using the layout composer.

Just an FYI, I've only ever been able to put one image per sheet into excel from webFOCUS. I don't know if tom's way allows anymore.


Eric Woerle
WF 7.6.7 Reportting Server
ETL 7.6.10
Dev Studio 7.6.7
 
Posts: 95 | Registered: July 31, 2007Report This Post
Platinum Member
posted Hide Post
You can use excel template for graphs in excel.


Regards,
Cyril Joy.

WF Production 8008 on Linux.
 
Posts: 143 | Location: Rochester,NY. | Registered: August 20, 2004Report This Post
Expert
posted Hide Post
The above, as well as the link below, was a concept prior to the new layout composer.

Multiple Graphs in 1 worksheet

I don't mess with templates as most clients have converted to Microsoft 2007 suite of products; templates are only supported through 2003...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report 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] Graphs in Excel

Copyright © 1996-2020 Information Builders