Prateek Gangopadhyay Prateek Gangopadhyay - 1 month ago 16
ASP.NET (C#) Question

RDLC export to excel functionality in the UI

Initially I was having the requirement to display a report in the aspx page taking a RDLC as reference in .NET.

This is what I did: I made the entire flow such that, after performing the database operations, the Process layer in my application simply returns the byte[] to the aspx page instead of the LocalReport/ReportViewer object. And in the aspx page, I am rendering the data as Response.BinaryWrite().

But there is a new requirement. There should be an export to excel functionality for the report that is rendered in the UI. As I am returning a byte [] to the UI the page in the IE opens as a pdf page. So I am unable to understand how shall I implement the export-to-excel button.

I further tried to implement it by introducing an user-control and the things got more complicated.

What should I do in this case?

Answer
Comments