Dynamically adding a subreport to a page

Stimulsoft Reports.NET discussion
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamically adding a subreport to a page

Post by HighAley »

Hello.

Please, try to change last line of your code to the next one:

Code: Select all

StiReportResponse.ResponseAsPdf(this.Page, report, false);
Thank you.
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Dynamically adding a subreport to a page

Post by prajan »

Hi,
I tried it, but its not working.
Please let me know if there is something else that I might be missing.

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamically adding a subreport to a page

Post by HighAley »

Hello.
prajan wrote:I tried it, but its not working.
Please let me know if there is something else that I might be missing.
Could you describe more detailed?
What did you do?
What was wrong?
Please, send us a sample project which reproduces the issue.

Thank you.
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Dynamically adding a subreport to a page

Post by prajan »

Hi,
PFA a sample of the project and the data for the same.

On clicking the 'Button' in the 'About.aspx' page, a pop-up opens which shows the report.
But I want to see the report in PDF format. For that if I uncomment the following lines of code

Code: Select all

//report.IsRendered = false;
//StiReportResponse.ResponseAsPdf(this.Page, report, true);
the pop-up opens, but report is not seen.

I want the pop-up to show the report in PDF format. Please let me know what I need to do to achieve the same.

Thanks
Attachments
Data for rep.rar
Data for report
(4.89 KiB) Downloaded 143 times
BSReport.rar
Project
(188.28 KiB) Downloaded 149 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamically adding a subreport to a page

Post by HighAley »

Hello.

Prajan, please, read next message carefully.

To return the pdf file, your code should be next:

Code: Select all

StiReport report = CreateReport2();   
report.Render(false);
StiReportResponse.ResponseAsPdf(this.Page, report, false);
In the last line the third parameter is false.

Thank you.
prajan
Posts: 49
Joined: Tue Apr 23, 2013 1:28 pm

Re: Dynamically adding a subreport to a page

Post by prajan »

Hi,
As previously mentioned in my reply on Sep 23rd, setting the last parameter of 'ResponseAsPdf' to false did not change the scenario.
Please find the project attached.

We are still not able to see the report as PDF in the pop-up window. Please let us know what we are missing.

Thanks
Attachments
BSReport.rar
Report project
(185.31 KiB) Downloaded 156 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Dynamically adding a subreport to a page

Post by HighAley »

Hello.

The ResponseAsPdf() methods works right in all browsers.
The problem is in your JavaScript scripts.

Thank you.
Post Reply