Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Why I am having load report failed issue in IIS 7.5? Cleared the temp file and also temporary asp.net files. Also folder permission given. Crystal Report Version is 10.2.3600.0
Binded as follows:ublic void ViewReport()
{

if (ddlCorporate.Items.Count == 1)
{
Common.showMessage("There is No Company", this.Page);
return;

}

bool validateDates = ValidationDate();
if (!validateDates)
{
Common.showMessage("From Date should be less than or equal to To Date", this);
return;
}
int startMonth = Convert.ToInt32(ddlFromMonth.SelectedValue);
int startYear = Convert.ToInt32(ddlFromYear.SelectedValue);
int endMonth = Convert.ToInt32(ddlToMonth.SelectedValue);
int endYear = Convert.ToInt32(ddlToYear.SelectedValue);


DateTime startDate;
DateTime endDate;
startDate = Convert.ToDateTime(startMonth.ToString() + "/01/" + startYear.ToString());
endDate = Convert.ToDateTime(endMonth.ToString() + "/01/" + endYear.ToString());

string reportPath = Server.MapPath("~//Reports//ActiveCardsMonthwiseSummary.rpt");
C3Report objC3Report = new C3Report();
string corporateId = ddlCorporate.SelectedItem.Value.Trim();

DataSet ds = objC3Report.GetMonthwiseActiveCardsSummary(corporateId, startDate, endDate, Session["ROLE"].ToString());
DataTable dt = ds.Tables[0];
if (dt.Rows.Count == 0)
{
Common.showMessage("No Record Found", this.Page);
return;
}
reportDocument = new ReportDocument();
reportDocument.Load(reportPath);
reportDocument.SetDataSource(dt);
CrystalReportCtrlSettings(CRVAllactiveCards);
CRVAllactiveCards.ReportSource = reportDocument;

//Set Parameter from "From"(month-year)
reportDocument.SetParameterValue(0, ddlFromMonth.SelectedItem.Text.ToUpper() + " " + startYear.ToString());
//Set Parameter from "To"(month-year)
reportDocument.SetParameterValue(1, ddlToMonth.SelectedItem.Text.ToUpper() + " " + endYear.ToString());

//Set Parameters based on Corporate dropdownlist Selection
if (ddlCorporate.SelectedIndex == 0)
{
reportDocument.SetParameterValue(2, "ALL CORPORATES");
}
else
{
reportDocument.SetParameterValue(2, ddlCorporate.SelectedItem.Text.ToUpper());
}


CRVAllactiveCards.DataBind();
Common.UserPageAudit(Session["User"].ToString(), "All Active Cards Monthwise Summary", Session["ROLE"].ToString(), "All Active Cards Monthwise Report Viewed");
}
Above method was called in page load with post back.
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900