Question
· Oct 31, 2016

Zen Excel Report

Hello Everyone.

Sorry if it is a dumb question, but I'm new.

First: I have to create a Excel MultipleSheet Report. That I'm fine with doing.. but they want me to give every Workbook that is created it's unique reportName, that is generated with the user input on the page. Is it possible to do so?

 

Second: I saw when creating the report.. Everything is placed in it's own column.. Is it possible to have some of the values next to each other and some Beneath each other.. Example.. BusinessProcess, TransactionType and NumberOfSteps must be next to each other and Step1, Step2 and Step3 should be beneath each other.. Is it possible to have it like this..

 

Thanks in advance

Christopher

Discussion (7)0
Log in or sign up to continue

Regarding your first question:

You can use a runtime expression as the value of excelSheetName.  This is described in following documentation:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GRPT_report_running#GRPT_excel_multisheet

For example you can define property, which takes value from URL request:

Property SheetName As %String(ZENURL = "sheetname") [ InitialExpression = "Person" ];
 

And in the report definition:

< group name="Persons" excelSheetName='!..SheetName'
    sql="SELECT top 2 name,Home_City as city,age,dob from Sample.Person order by Home_City"
    runtimeMode="1">

Then you call your report like:

/csp/samples/ZEN.ExcelReport.cls?sheetname=SalesPerson

Hi Tomas..

I see that the link and code you supplied are for the sheet name.. I'm fine with that, Thanks for the link though, But what I meant was, if the report Page opens, It gives you the save option right? They want me to Generate a name for the Entire Excel document.. I saw that you can say 

Parameter REPORTNAME = "ExcelReport";

But they want it to be generated with the userinput that is gathered in the zenPage that call's the ReportPage.. 

 

Thanks