I'm attempting to change the page size (Letter or Legal) at runtime.
I believe I have downloaded the latest version (2008.1.225.0).
I'm running VS2005 C# and ASP.Net 2.0.
The code looks like this:
Code: Select all
Stimulsoft.Report.StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiPostgreSQLAdapterService());
Stimulsoft.Report.StiConfig.Services.Add(new Stimulsoft.Report.Dictionary.StiPostgreSQLDatabase());
Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
string RptPath = ConfigurationManager.AppSettings["RptPath"] + Request.QueryString["RptName"].ToString();
report.Load(RptPath);
//set the page size to the appropriate value.
if (Request.QueryString["PgSize"] == "Legal")
report.Pages[0].PaperSize = PaperKind.Legal;
else
report.Pages[0].PaperSize = PaperKind.Letter;
report.Compile();
////set the page size to the appropriate value.
//if (Request.QueryString["PgSize"] == "Legal")
// report.CompiledReport.Pages[0].PaperSize = PaperKind.Legal;
//else
// report.CompiledReport.Pages[0].PaperSize = PaperKind.Letter;
report["QuoteHdrId"] = Request.QueryString["QuoteHdrId"].ToString();
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(this, report);
When I run this on my local computer, running VS2005 in debug mode, it work perfectly. When I move the code to my VPS running IIS everything prints as expected, but I'm unable to change the page size.
I suspect this has to do with IIS, but I thought I'd check with you and see if you have any suggestions on how to make this work.
Thank you again for a wonderful product!
Phil Mickelson
CSITOL, LLC