View Full Version : مشکل در چاپ گزارش
baran_bataravat
دوشنبه 16 دی 1392, 09:43 صبح
در برنامه چاپ گزارش دارم که گزارش ساز stimul هست موقع چاپ خطای
Access to the path 'StimulsoftReportsResources' is denied.
داده میشه، برنامه روی local درسته ولی روی iis این خطا آورده میشه iis 7 هست . تمام دسترسی ها رو هم به فولدر دادم ولی مشکل حل نشد. خواهش میکنم راهنمایی کنید.
fakhravari
دوشنبه 16 دی 1392, 16:18 عصر
تیکه کداتو بزار
baran_bataravat
سه شنبه 17 دی 1392, 08:10 صبح
private void Print(string code)
{
BLL.BO bo = new BLL.BO();
Shakhs b = bo.getShakhs(code);
StiReport report = new StiReport();
report.RegBusinessObject("Shakhs", "Shakhs", b);
report.Load(Server.MapPath("Content\\Reports\\Estelam.mrt"));
report.Render();
StiPdfExportService pdfExport = new StiPdfExportService();
string MapPath = "~/Content/TempFiles/" +code + ".pdf";
pdfExport.ExportPdf(report, Server.MapPath(MapPath));
Response.Redirect(MapPath);
}
fakhravari
سه شنبه 17 دی 1392, 09:55 صبح
using (StiReport report = new StiReport())
{
report.Load(HttpContext.Current.Server.MapPath(@"StiWebReport1.mrt"));
report.Render(false);
StiOptions.Web.AllowUseResponseFlush = false;
StiReportResponse.ResponseAsPdf(this.Page, report, true);
}
baran_bataravat
سه شنبه 17 دی 1392, 11:24 صبح
Namespace مربوط به دستور StiReportResponse چی هست؟ من این تکه کد رو گذاشتم این قسمت رو خطا میده.
baran_bataravat
سه شنبه 17 دی 1392, 14:15 عصر
using (StiReport report = new StiReport())
{
report.Load(HttpContext.Current.Server.MapPath(@"StiWebReport1.mrt"));
report.Render(false);
StiOptions.Web.AllowUseResponseFlush = false;
StiReportResponse.ResponseAsPdf(this.Page, report, true);
}
تشکر از راهنمایتان. مشکلم با این کد حل شده است.
fakhravari
سه شنبه 17 دی 1392, 14:16 عصر
Namespace مربوط به دستور StiReportResponse چی هست؟ من این تکه کد رو گذاشتم این قسمت رو خطا میده.
using Stimulsoft.Report;
using Stimulsoft.Report.Web;
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.