How do I call an excel report class from another class and name the report from the call class in cache?
This is the Report Class:
/// ProjekCin.Cinema.report.report
Class ProjekCin.Cinema.report.OLSQL16REP Extends %ZEN.Report.reportPage
{
/// Class name of application this report belongs to.
Parameter APPLICATION = "ProjekCin.report.Browse";
/// Specifies the default display mode used for this report if
/// the URL parameter, <var>$MODE</var>, is not present.
Parameter DEFAULTMODE As STRING [ Constraint = ",html,tohtml,toxslfo,pdf,xml,xslfo,excel,toexcel,ps,pdfprint,xlsx,tiff,displayxlsx,fo2pdf,foandpdf", Flags = ENUM ] = "xlsx";
/// Set om multiplesheets te kan save in excel
Parameter EXCELMULTISHEET = 1;
/// This is the optional XML namespace used for the report.
Parameter REPORTXMLNAMESPACE;
/// This is the logical name of this report.
/// If not provided, class name is used.
Parameter REPORTNAME As STRING = "Tutorial";
/// This XML defines the logical contents of this report.
XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition" ]
{
<report xmlns="http://www.intersystems.com/zen/report/definition"
name="report" sql="SELECT
FTR, ID, Amount, BusinessDate, COARno, Description, Expression, NominalAccountNo, OBJVersion
FROM ProjekCin.LSL" runonce="true">
<group name="SQL161" sql="SELECT
FTR, ID, Amount, BusinessDate, COARno, Description, Expression, NominalAccountNo, OBJVersion
FROM ProjekCin.LSL WHERE BusinessDate = '20150601'" excelSheetName="1">
<group name="g1">
<element name="No" field="FTR" />
<element name="COARno" field="COARno" />
<element name="NominalAccountNo" field="NominalAccountNo" />
<element name="Description" field="Description" />
<element name="Natureofaccount" field="Expression" />
<element name="TotalAmount" field="Amount" />
</group>
</group>
<group name="SQL161" sql="SELECT
FTR,ID, Amount, BusinessDate, COARno, Description, Expression, NominalAccountNo, OBJVersion
FROM ProjekCin.LSL WHERE BusinessDate = '20150602'" excelSheetName="2">
<group name="g1">
<element name="No" field="FTR" />
<element name="COARno" field="COARno" />
<element name="NominalAccountNo" field="NominalAccountNo" />
<element name="Description" field="Description" />
<element name="Natureofaccount" field="Expression" />
<element name="TotalAmount" field="Amount" />
</group>
</group>
<group name="SQL161" sql="SELECT
FTR,ID, Amount, BusinessDate, COARno, Description, Expression, NominalAccountNo, OBJVersion
FROM ProjekCin.LSL WHERE BusinessDate = '20150602'" excelSheetName="Selection">
<group name="Selec">
<element name="sql" field="sql" />
</group>
</group>
</report>
}
/// This XML defines the display for this report.
/// This is used to generate the XSLT stylesheets for both HTML and XSL-FO.
XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
name="report" title="Tutorial">
<!-- Optional Init element inserts custom XSLT instructions at the top level of the generated XSLT stylesheet.
<init ></init>-->
<!-- Optional Document element specifies page layout and style characteristics.-->
<document width="8.5in" height="11in" marginLeft="1.25in" marginRight="1.25in" marginTop="1.0in" marginBottom="1.0in" ></document>
<!-- Optional Pageheader element.
<pageheader ></pageheader>-->
<!-- Optional Pagefooter element. Does not apply in HTML output.
<pagefooter ></pagefooter>-->
<!-- Required Body element. -->
<!--<body>
add display definition of the report here. -->
<!-- <table group="ProjekCin/cin"
excelSheetName="Cinema" >
<item field="ID"/>
<item field="FilmShowing"/>
<item field="NrOfSeats" isExcelNumber="true"/>
</table>
</body>-->
</report>
}
}