on 05-14-2018 2:44 PM
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());
}
}
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:
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.