My ultimate goal is to generate reports in Excel format basing on user selections. After reading documentation I understand that preparing nice looking Excel report is possible using Report
Designer Client Tool inside Excel and later the same template is used by SSRS when generating report with current data. However, I am not sure if manipulating generated Excel format is possible through published Application Programming Interface for Aspose.Cells.
User wants to do the following steps in my web application:
select specific subset of report (Excel) columns
select specific order of report (Excel) columns
After these selections user wants to have report in Excel (.xlsx) generated by SSRS according to selected columns and then saved on the server automatically.
Questions:
Is it possible to trigger programmatically Aspose.Cells report generation?
Is it possible to have control how Excel (.xlsx) is generated?
Is it possible to trigger programmatically Aspose.Cells report generation?
The Aspose.Cells for Reporting Services client is a report design tool. It can design, publish, view and so on. Now it does not support triggering operations programmatically.
Is it possible to have control how Excel (.xlsx) is generated?
You have two ways to do it to automatically export Excel reports:
Use Reporting Services Subscription and Delivery function. Please refer to Subscription and Delivery document.
Develop basic .Net program on report server web services interface. Please refer Reporting Services developer’s guide and report server web service.
For selecting specific subset of report (Excel) columns issues: If you use SQL Server Reporting Services 2008 or 2008R2, you may try follow operations:
Install Aspose.Cells for Reporting Services at server.
Designed report by visual studio 2008.
No exported report items should be set to NOOUTPUT for item data element output attribute(s).
Select Excel 2007 xlsx (data only) to export report.
Assuming that I have installed Aspose.Cells rendering extension on Microsoft Reporting Services 2008R2 server can I call:
ReportExecutionService.Render
method on ReportExecution2005 Web Service and specify some parameter as Format argument (if so, what value?) to generate report in.XLSX file using Aspose.Cells renderer?
I assume that your rendering extension allows to create richer Excel document than standard Microsoft SSRS Excel renderer. Or at least it allows me to prepare template in Excel and use full power of Excel. True?
You need to develop .Net program on basic of report server web services interface. Please refer Reporting Services developer’s guide and report server web service
The following code only is a function’s code segment.
e.g.
C#
string devInfo = @“False”;
string encoding;
string mimeType;
string extension;
string[] streamIDs = null;
ExecutionInfo execInfo = new ExecutionInfo();
ExecutionHeader execHeader = new ExecutionHeader();
Thank you for your response and code example. My question is what specific value I need to pass as a format argument in your example to render in format: "Excel2007Xlsx - Excel 2007 via Aspose.Cells"?
byte[] result = m_ReportSerivcesExec.Render(Convert (format), devInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs); What specific value should have above green format parameter to render in Aspose.Cells?
(Microsoft standard renderers have predefined values: XML, NULL, CSV, IMAGE, PDF, HTML4.0, HTML3.2, MHTML, EXCEL, and Word.)
Namespace: ReportExecution2005 Class: ReportExecutionService Method: public byte[] Render(string Format, string DeviceInfo, out string Extension, out string MimeType, out string Encoding, out Warning[] Warnings, out string[] StreamIds )
The red format parameters value will have a value of ACXLS, ACXLSX, ACXLSB, ACXLSM, ACTXT, ACXML, ACHTML, ACCSV, ACODS and so on.