Fast Report with Asp.Net with direct export
Hi,
As a long time Delphi developer, I was excited when I realized that FR is now available for .Net, and I decided to give it a try.
However, before I start using your product, I have a question regarding the Asp.Net implementation.
Now, I am using Crystal Reports for Asp.Net reporting tool, without using any preview component.
Instead I'm exporting the report to .xls or .pdf stream, and send the file stream as a byte array to the user as a file.
Sample code:
Stream st = null;
st = rpt.ExportToStream(ExportFormatType.PortableDocFormat);
string friendlyName = "Some friendly name";
friendlyName = reportTitle + ".pdf";
response.ClearContent();
response.ClearHeaders();
response.ContentType = "Application/PDF";
response.AddHeader("Content-Disposition", "attachment;filename=" + friendlyName);
Byte[] buffer = new Byte[st.Length];
st.Read(buffer, 0, (int)st.Length);
response.BinaryWrite(buffer);
response.End();
For this feature, I need ExportToStream method / capability. Is it available for FR ? If not, will it be available in the near future ?
Thanks, Trebor
P.S. I know that .pdf and .xls exporting is still in development, but for testing purposes, it's O.K. for me to use other export filters ( html or .jpeg ).
Comments
You can use the Report component (instead of WebReport) and call its Export method. It's described in the Programmer's Manual:
- prepare a report using the Prepare method;
- create an instance of export filter and set up its properties;
- call the Export method of the Report object.
Will it behave well in Asp.Net environment (regarding the concurrent / multi user access ) ?
Thanks, Robert
The only thing you need to do is to set Config.WebMode property to true.
how can i print report manually. i wrote these codes but aa.xls file was empty
which exportfilter properties can i change it or set it
You should use XMLExport class instead of ExportBase.
Hi Alex
I want to export multiple pages to bmp and then later append that bmp pages to pdf file. Please help me to achieve this.
Export to Bmp