ResponseAsPdf Auto Show

Stimulsoft Reports.NET discussion
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

ResponseAsPdf Auto Show

Post by fkmfkm »

I am trying this response as word, but how come there is only for Word2007n ?

How if i have an older version ?
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

ResponseAsPdf Auto Show

Post by Vital »

In this case you need use export to RTF. Word open rtf files without any problems.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

ResponseAsPdf Auto Show

Post by fkmfkm »

I've tried but it does not open it directly.

Isn't is suppose to open directy after setting the content type (thats what I experience) ?
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

ResponseAsPdf Auto Show

Post by Guest »

Could you reproduce a sequence of your operations(step by step)?

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

ResponseAsPdf Auto Show

Post by fkmfkm »

I am doing this on my page:

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, report)

I am prompted with the File Download dialog. Do you want to Open or Save this file ? with 3 buttons Open, Save and Cancel.

I expect it to open it directly cause the ContentType is supplied as PDF.

This is from my own experiece on my download page. Example of my code.

Response.AddHeader("Content-Length", file.Length.ToString())
Response.ContentType = "Application/msword"
Response.WriteFile(file.FullName)

It will automatically opens up the word document.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

ResponseAsPdf Auto Show

Post by Vital »

Please in this case use following code:

Code: Select all

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, report, false)
Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

ResponseAsPdf Auto Show

Post by fkmfkm »

Vital

Thanks for replying, but I think you dont get my point.

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, report, false) will open using my original page. I want it to pop up a new page.

I need it cause all my StiWebReport is on my actual page(i have done 30 over reports this way). If I use the above command my actual page will be gone.

Sorry for the trouble but hope you can help.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

ResponseAsPdf Auto Show

Post by Edward »

Sorry, but this cannot be achieved with help of the Stimulsoft Reports.Net engine. In that case you should do the following steps manually:

1. Create another asp page
2. Redirect the report in this page.
3. Call StiReportResponse command.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

ResponseAsPdf Auto Show

Post by fkmfkm »

Sorry,

was away for a week...

2. Redirect the report in this page. --> what do you mean by this ? can show some sample code ?


Thank you very much..
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

ResponseAsPdf Auto Show

Post by Vital »

So you need have two aspx pages. At first page you have link, something like this:
On second aspx page you need use method ResponseAsPdf in page load event.

Thank you.

Post Reply