Ejemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {


            _Report = new RdlReport();

            ReportSession ses = (ReportSession)context.Session["CurrentPdfReport"];


            string Name = ses.Name;
            bool FirstRun = ses.FirstRun;

            if (Security.HasPermissions(ses.url) == false)
            {
                return;
            }

            if (FirstRun)
            {
                _Report.NoShow = true;
            }
            else
            {
                _Report.NoShow = false;
            }


            _Report.RenderType = "pdf";

            _Report.PassPhrase = "northwind";       // user should provide in some fashion (from web.config??)
            // ReportFile must be the last item set since it triggers the building of the report

            string arg = ses.url;
            if (arg != null)
            {
                _Report.ReportFile = arg;
            }

            if (_Report.Object == null)
            {
                error = true;
            }
            else
            {
                //context.Response.ContentType = "application/pdf";
     
                context.Response.AddHeader("content-disposition", "inline; filename=myFyiReportingReport.pdf");
                context.Response.BinaryWrite(_Report.Object);
            }
        }
Ejemplo n.º 2
0
 public ShowReport()
 {
     _Report = new RdlReport();
 }