Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Hi All,
 
I am using rdlc report in my asp.net website. It runs fine when i run it locally. The rdlc report can be seen locally, but when i upload it at main domain then the reports are not displayed. Please help me out of this that where is the problem.
 
Here is the sample code which runs fine :
 
if(orderstatus.Equals("Order Deliverd"))
{
lblMessage.Visible = false;
dt = Calendar1.SelectedDate;
string dt1 = dt.ToShortDateString();
System.Data.DataSet ds = rpt.DaywiseCompletedOrdersReports(dt1, orderstatus);
 
ReportViewer1.Visible = Visible;
ReportViewer1.Reset();
ReportViewer1.LocalReport.DataSources.Clear();
 
ReportDataSource rds = new ReportDataSource("AllOrderDeliveredReports", ds.Tables[0]);
ReportViewer1.LocalReport.DataSources.Add(rds);
 
if (ds.Tables[0].Rows.Count == 0 || ds.Tables[0].Columns.Contains("Result"))
{
lblMessage.Visible = Visible;
lblMessage.Text = "Sorry, no report is available for day wise completed orders!";
mail.Visible = false;
}
 
ReportViewer1.LocalReport.ReportPath = HttpContext.Current.Server.MapPath("~/AllOrderDeliveredReports.rdlc");
 
string textBoxString = "Day Wise Completed Orders Report"; //a function for create a string
 
Microsoft.Reporting.WebForms.ReportParameter[] p = { new ReportParameter("AllOrderDeliveredReports", textBoxString) };
this.ReportViewer1.LocalReport.SetParameters(p);
 
Microsoft.Reporting.WebForms.ReportParameter[] p1 = { new ReportParameter("AllOrderDeliveredReports1", dt1) };
this.ReportViewer1.LocalReport.SetParameters(p1);
 
ReportViewer1.Visible = Visible;
ReportViewer1.LocalReport.Refresh();
mail.Visible = Visible;
}
 
The problem is of local report use or path. Please guide me. So that i can correct myself.
 
I get the error as :
 

 
An error occurred during local report processing.
    The report definition for report 'C:\inetpub\vhosts\merafoodchoice.com\subdomains\admintest\httpdocs\AllOrderDeliveredReports.rdlc' has not been specified
        Could not find file 'C:\inetpub\vhosts\merafoodchoice.com\subdomains\admintest\httpdocs\AllOrderDeliveredReports.rdlc'.
 

 

Thanks in advance.....
Posted 16-Dec-12 23:29pm
rp786415
Edited 16-Dec-12 23:36pm
v2

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

  Print Answers RSS
0 OriginalGriff 490
1 Gihan Liyanage 338
2 ChauhanAjay 180
3 Vinay Mistry 160
4 Sergey Alexandrovich Kryukov 153
0 Sergey Alexandrovich Kryukov 9,011
1 OriginalGriff 7,941
2 CPallini 2,603
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 17 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100