Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED][CODE] Multiple report on the first tab of excel and reports on further tabs
Go
New
Search
Notify
Tools
Reply
  
[SOLVED][CODE] Multiple report on the first tab of excel and reports on further tabs
 Login/Join
 
Member
posted
Greetings All,

I have a requirement to output a multi-tab excel with several reports in the first tab of the excel (different columns from different tables in same tab), and graphs on consecutive tabs. I have found a sample code to output several reports in the same excel as follows:

APP PREPENDPATH IBISAMP
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
HEADING
"Summary at Country Level"
FOOTING
""
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
 BY CAR
HEADING
"Summary at Country and Car Level"
FOOTING
""
ON TABLE PCHOLD FORMAT EXL2K NOBREAK
END
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
 BY CAR
 BY MODEL
HEADING
"Detail at Model Level"
FOOTING
""
ON TABLE PCHOLD FORMAT EXL2K CLOSE
END  


I am using compound excel logic to bring data in first tab and graph in the other tab. Is it possible to have the first tab contains several reports in it and consecutive other tabs also present? A sample code will be helpful.
Thanks in advance.
Regards,
Jagriti

This message has been edited. Last edited by: Jagriti Kumari,


WebFocus 7.7, Developer Studio 7707, Windows 8,Report Caster
Output Format - Excel, PDF, HTML
 
Posts: 18 | Registered: December 28, 2016Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi,

When you use NOBREAK the next report will be on the same tab of the excel, if you do not specify NOBREAK the next report will be on the next tab.

regards, Martin.


WebFocus 8203M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
 
Posts: 152 | Registered: March 29, 2013Reply With QuoteReport This Post
Member
posted Hide Post
quote:
Originally posted by Martin vK:
Hi,

When you use NOBREAK the next report will be on the same tab of the excel, if you do not specify NOBREAK the next report will be on the next tab.

regards, Martin.


Hi Martin,

Thank you for your response on this. I actually use the compound excel logic, for I am required to bring graphs on excel and i am successful in that using the below code :

 
SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT EXL2K
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
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='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.708 0.625), DIMENSION=(6.563 3.542), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.708in; top: 0.625in; width: 6.563in; height: 3.542in; position: absolute; z-index: 1;', $
COMPONENT='chart1', TEXT='chart1', TOC-LEVEL=2, POSITION=(0.708 4.896), DIMENSION=(6.667 3.438), COMPONENT-TYPE=GRAPH, ARREPORTSIZE=DIMENSION, METADATA='left: 0.708in; top: 4.896in; width: 6.667in; height: 3.438in; position: absolute; z-index: 2;', $
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST
CAR.SPECS.FUEL_CAP
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET XLSXPAGESETS ON
ON TABLE SET HTMLCSS ON
-*ON TABLE SET STYLE *
-*INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
-*$
-*ENDSTYLE
END
SET COMPONENT='chart1'
-*component_type chart
-*IA_GRAPH_BEGIN
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.SPECS.BHP
CAR.SPECS.RPM
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
 
-*IA_GRAPH_FINISH
COMPOUND END
 

---------------------------------------

Now the requirement is to bring several reports in the component 'report1', i.e. tab1. For example addition to what being displayed from table CAR, another report from table STOCK needs to be displayed in tab1.

Regards,
Jagriti


WebFocus 7.7, Developer Studio 7707, Windows 8,Report Caster
Output Format - Excel, PDF, HTML
 
Posts: 18 | Registered: December 28, 2016Reply With QuoteReport This Post
Member
posted Hide Post
Hello,

This issue has now been resolved using the code below:

 
-* File car_graph_test_jags.fex
APP PREPENDPATH IBISAMP
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
HEADING
"Summary at Country Level"
FOOTING
""
ON TABLE PCHOLD FORMAT EXL2K OPEN NOBREAK
END
TABLE FILE CAR
SUM RCOST
    DCOST
 BY COUNTRY
 BY CAR
HEADING
"Summary at Country and Car Level"
FOOTING
""
ON TABLE PCHOLD FORMAT EXL2K NOBREAK
END

SET HTMLARCHIVE=ON
*-HOLD_SOURCE
COMPOUND LAYOUT PCHOLD FORMAT EXL2K
UNITS=IN, $
SECTION=section1, LAYOUT=ON, METADATA='prop_with_names^Margins_Left=0.5^Margins_Top=0.5^Margins_Right=0.5^Margins_Bottom=0.5^thumbnailscale=4', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, SHOW_GLOBALFILTER=OFF, $
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='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.708 0.625), DIMENSION=(6.563 3.542), BYTOC=0, ARREPORTSIZE=DIMENSION, METADATA='left: 0.708in; top: 0.625in; width: 6.563in; height: 3.542in; position: absolute; z-index: 1;', $
COMPONENT='chart1', TEXT='chart1', TOC-LEVEL=2, POSITION=(0.708 4.896), DIMENSION=(6.667 3.438), COMPONENT-TYPE=GRAPH, ARREPORTSIZE=DIMENSION, METADATA='left: 0.708in; top: 4.896in; width: 6.667in; height: 3.438in; position: absolute; z-index: 2;', $
END
SET COMPONENT='report1'
-*component_type report
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST
CAR.SPECS.FUEL_CAP
BY CAR.CARREC.MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET XLSXPAGESETS ON
ON TABLE SET HTMLCSS ON
-*ON TABLE SET STYLE *
-*INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
-*$
-*ENDSTYLE
END
SET COMPONENT='chart1'
-*component_type chart
-*IA_GRAPH_BEGIN
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE car
-* Created by Info Assist for Graph
SUM CAR.SPECS.BHP
CAR.SPECS.RPM
BY CAR.COMP.CAR
ON GRAPH PCHOLD FORMAT HTML
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 0
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
*END
-*INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
*END
ENDSTYLE
END
-RUN
 
-*IA_GRAPH_FINISH
COMPOUND END
 


Regards,
Jagriti


WebFocus 7.7, Developer Studio 7707, Windows 8,Report Caster
Output Format - Excel, PDF, HTML
 
Posts: 18 | Registered: December 28, 2016Reply With QuoteReport This Post
Guru
posted Hide Post
quote:
*-HOLD_SOURCE


Does anyone know what the "*-HOLD_SOURCE statement does? I've searched through documentation and I'm not getting a hit on it but I see it in the code when creating a compound document.

Thank you,


Senior Business Intelligence Analyst (BIA) @ Enclara Pharmacia
Production: WF 8.09, App Studio, BIP, RC, MSSQL / Test: WF 8204, App Studio, BIP, Reportcaster, Resource Manager, MSSQL
 
Posts: 290 | Location: Greater Cincinnati  | Registered: May 11, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Don

I found this case and it appears to be a known problem in 8.0.08.

https://techsupport.informatio...ttrack/12183001.html


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1566 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED][CODE] Multiple report on the first tab of excel and reports on further tabs

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.