Export Report to Excel

ZEN, Caché

Hello, I created a Zen Report and I want to export to Excel. I read I can use $MODE=xlsx but my output in Excel is not correct. All 3 elements are condensed into one cell. Class AETMON.Report Extends %ZEN.Report.reportPage { /// Class name of application this report belongs to. Parameter APPLICATION; /// Specifies the default display mode used for this report if /// the URL parameter, $MODE, 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 ] = "html"; /// This is the optional XML namespace used for the report. Parameter REPORTXMLNAMESPACE; Property Availability As %ZEN.Datatype.list(DELIMITER = ","); Property AvaiDateTime As %ZEN.Datatype.list(DELIMITER = ","); Property CreatedDate As %ZEN.Datatype.string(ZENURL = "CreatedDate"); /// This XML defines the logical contents of this report. XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition" ] { } I expected to get three columns for Created Date, Created Time, and Status but I see only one cell "record" repeated across row 1... What do I do wrong?

  • 0
  • 0
  • 91
  • 0
  • 1

Answers

I removed the outer group and it worked correctly:

name="Report"
sql="SELECT ID, CreatedDate, CreatedTime, availabilityStatus FROM AETMON.AvailabilityLog WHERE CREATEDDATE=? ORDER BY CreatedDate, CreatedTime">