Free Support Forum - aspose.com

ASPOSE.CELLS web reporting

Hello, theres

I’m using Aspose.Cells for reporting on web, so many user can run the same report with different parameters. Is any code sample available to deal with it ? All I think is saving to html and redirect to that html.( maybe needs to do house keeping for those temp html files…) any better solutions?

Regards,
agichen

Hi,

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();


RW.Utility.SSRS.Services.ReportExecutionService.Warning[] warnings = null;


m_ReportSerivcesExec.ExecutionHeaderValue = execHeader;


execInfo = m_ReportSerivcesExec.LoadReport(reportname, historyID);


String SessionId = m_ReportSerivcesExec.ExecutionHeaderValue.ExecutionID;


if (parameters != null)
{
m_ReportSerivcesExec.SetExecutionParameters(parameters, “en-us”);
}


byte[] result = m_ReportSerivcesExec.Render(Convert (format),

devInfo,

out extension,

out encoding,

out mimeType,

out warnings,

out streamIDs);


execInfo = m_ReportSerivcesExec.GetExecutionInfo();


return result;

Thanks a lot! But I don’t use SSRS.


Because I’m using Aspose.Cells (.net ) from excel reporting.
User just want to preview the excel report before download the report.
I think the workbook.save () can help to write the excel to html file format, then redirect to the html.

Regards,
agichen

Hi,

Thanks for your feedback.

You can save your workbook into html format. Let me know if it fits your needs.

Please see the code below.

C#


string filePath = “c:\source.xlsx”;


//Create a workbook object from existing file

Workbook workbook = new Workbook(filePath);


//Save it in html format

workbook.Save(filePath + “.out.html”, SaveFormat.Html);



OK, Thanks!

I think that I can handle it. by save to something like outputFolder\yyyyMMdd\Guid\Report.html
then redirect to the html page. Then clean old output files by date.

Regards,
agichen
.

Hi,

Thanks for your posting and using Aspose.

I think, the suggested solution should work fine without any issue.

Let us know if you face any issue, we will be glad to look into your issue and help you asap.