How to get the html string of a report?
-
- Posts: 3
- Joined: Mon Oct 08, 2012 8:59 am
How to get the html string of a report?
I need to put a Html format report into the content part of a http respond, but I do not know how to get the Html string, does anyone know how to do this? thanks in advance.
Re: How to get the html string of a report?
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your task in more details?
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your task in more details?
Thank you.
-
- Posts: 3
- Joined: Mon Oct 08, 2012 8:59 am
Re: How to get the html string of a report?
Hi,
Sorry, I did not explain it clearly, my task is to create a report at runtime, and display it on a exist page, the steps may be like this:
1. On the client side, make a Ajax request with some parameters;
2. Server process the request, get the parameters, create a report by using the parameters;
3. Respond the html representation of the report. The code might like this:
String htmlString = report.getHtml();
respond.setContent(htmlString);
4. In the callback function of the Ajax request, process the respond and put the html into somewhere of this page.
I stucked in step 3 because I did not find the report.getHtml()-like fuction.
Or may be I can request a aspx page directly?
Thank you.
Sorry, I did not explain it clearly, my task is to create a report at runtime, and display it on a exist page, the steps may be like this:
1. On the client side, make a Ajax request with some parameters;
2. Server process the request, get the parameters, create a report by using the parameters;
3. Respond the html representation of the report. The code might like this:
String htmlString = report.getHtml();
respond.setContent(htmlString);
4. In the callback function of the Ajax request, process the respond and put the html into somewhere of this page.
I stucked in step 3 because I did not find the report.getHtml()-like fuction.
Or may be I can request a aspx page directly?
Thank you.
Re: How to get the html string of a report?
Hello.
You could use next code to get report in HTML format:
But why not to use our StiWebViewer on your page?
Thank you.
You could use next code to get report in HTML format:
Code: Select all
MemoryStream ms = new MemoryStream();
report.ExportDocument(StiExportFormat.Html, ms);
Thank you.
-
- Posts: 3
- Joined: Mon Oct 08, 2012 8:59 am
Re: How to get the html string of a report?
Hello,
It works, Thank you.
I need to create report dynamically, so I'm not sure StiWebViewer works for this situation.
Thanks again!
It works, Thank you.
I need to create report dynamically, so I'm not sure StiWebViewer works for this situation.
Thanks again!
Re: How to get the html string of a report?
Hello.
StiWebViewer just show report. And it will should any report either report loaded from file or report created dynamically.
You could find the RuntimeBuildReport sample project in the Stimulsoft Reports.Net installation. In this sample you could find code to create report.
Thank you.
StiWebViewer just show report. And it will should any report either report loaded from file or report created dynamically.
You could find the RuntimeBuildReport sample project in the Stimulsoft Reports.Net installation. In this sample you could find code to create report.
Thank you.