Skip to Content
0

When I click to navigate to the next page i get "Please wait while the document is being processed"

May 14 at 01:44 PM

19

avatar image
Former Member

I am creating a report in a ASP.NET application. I have some bills created, and when I click on a next page, it shows me Please wait while the document is being processed" message. How can I fix this?

This is my code for creating the report:

protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                bool isValid = true;


                string repName = HttpContext.Current.Session["repName"].ToString();
                int zgradaID = (int)HttpContext.Current.Session["id_zgrade"];
                int mesec = (int)HttpContext.Current.Session["mesec"];
                int godina = (int)HttpContext.Current.Session["godina"];


                if (string.IsNullOrEmpty(repName))
                    isValid = false;


                if (isValid)
                {


                    ReportDocument rd = new ReportDocument();
                    string repPath = Server.MapPath("~/Izvestaji/") + repName;


                    rd.Load(repPath);


                    Izvestaji.IzvestajiRep irep = new Izvestaji.IzvestajiRep();
                   
                    rd.SetDataSource(irep.StampanjeRacunaDS(zgradaID,mesec,godina));


                   


                    this.CrystalReportViewer1.ReuseParameterValuesOnRefresh = true;
                    CrystalReportViewer1.ReportSource = rd;




                    Session["repName"] = "";
                    Session["id_zgrade"] = "";
                    Session["mesec"] = "";
                    Session["godina"] = "";
                   




                }
                else
                {
                    Response.Write("<h2>Izvestaj nije pronadjen!</h2>");
                }


            }
            catch (Exception ex)
            {


                Response.Write(ex.ToString());
            }
        }
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Don Williams
May 14 at 01:46 PM
0

Changes to the Standards require you to load CR pages in Page_Init section now.

And to keep the report in scope you must use Sessions and PostBack so the report stays in focus.

Use Google and search for this KBA:

1985571 - How to use sessions in web applications using the Crystal Reports viewer (the complete code)

Don

Share
10 |10000 characters needed characters left characters exceeded