I have reports which use microsoft ReportViewer ( VS 2008). These work fine on my local machine...On the hosting server...none of the reports work. I dont get any error. The toolbar just shows up with 0 pages on it. Could it be because I am using ReportViewer of VS 2008 and Discountasp.net supports ReportViewer 2010. Any help or suggestions would be of great help Thanks
Hi, You can use either version but you can only specify one at a time. If you want help with your code post it and I'll see what I can do. All the best, Mark
I am not sure if its coding problem because its working fine on my local machine but here is my code...and thanks for your help and effort............... protected void Page_Init(object sender, EventArgs e) { if (Session["CompanyNickName"] != null) { if (!this.IsPostBack) { CompanyNickName = Session["CompanyNickName"].ToString(); arl = new AuditReportLogic(ConnStr); string choice = Request.QueryString["choice"].ToString(); string month = Request.QueryString["month"].ToString(); string year = Request.QueryString["year"].ToString(); try { DataSet dsPubInvoice = new DataSet(); DataSet dsAuditReport; dsAuditReport = new PublishedInvoiceTableDataSet(); if (choice.Equals("Month and Year")) { dsPubInvoice = arl.SelectPublishedInvoiceByMMYY(month + year, CompanyNickName); dsAuditReport.Tables["PublishedInvoice"].Merge(dsPubInvoice.Tables[0]); dsAuditReport.Tables["DeletedPublishedInvoice"].Merge(dsPubInvoice.Tables[1]); if (dsAuditReport.Tables[0].Rows.Count == 0 && dsAuditReport.Tables[1].Rows.Count == 0) flag = false; } else if (choice.Equals("Year")) { dsPubInvoice = arl.SelectPublishedInvoiceByYY(year, CompanyNickName); dsAuditReport.Tables["PublishedInvoice"].Merge(dsPubInvoice.Tables[0]); dsAuditReport.Tables["DeletedPublishedInvoice"].Merge(dsPubInvoice.Tables[1]); if (dsAuditReport.Tables[0].Rows.Count == 0 && dsAuditReport.Tables[1].Rows.Count == 0) flag = false; } if (flag == false)// if no data for report hide blank report and show warning { lblWarning.Text = "No record exists!"; ReportViewer1.Visible = false; } else { // string reportPath = Server.MapPath("~\\ReportTemplates\\AuditReport.rpt"); ReportDataSource rds = new ReportDataSource("AuditReport_PublishedInvoice", dsAuditReport.Tables[0]); ReportDataSource rds1 = new ReportDataSource("AuditReport_DeletedPublishedInvoice", dsAuditReport.Tables[1]); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.DataSources.Add(rds1); ReportViewer1.LocalReport.Refresh(); } // I have checked that dataset is getting the data dsAuditReport.Dispose(); }
Hi, How about the page register and assembly information? If the report is not showing it more than likely has to do with that or the web.config sections. All the best, Mark
I have been trying but in vain ..........this is my portion of assembly block from web config file: <system.web> <compilation debug="true"> <assemblies> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="Microsoft.ReportViewer.ProcessingObjectModel, Version =9.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> </assemblies> <buildProviders> <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </buildProviders> <httpHandlers> <remove path="*.asmx" verb="*" /> <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> <add path="atlasbatchcall.axd" verb="*" type="Microsoft.Web.Services.MultiRequestHandler" validate="false" /> <add path="atlasglob.axd" verb="*" type="Microsoft.Web.Globalization.GlobalizationHandler" validate="false" /> <add path="*.asbx" verb="*" type="Microsoft.Web.Services.ScriptHandlerFactory" validate="false" /> <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> <add path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /> <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" /> </httpHandlers> and in page registery it is <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %> I am not sure where I am failing........only toolbar is displayed ..no buttons and no. of pages appear 0 ...and its happening with all reports Thanks for your help and support
Hi, Lemme ask two questions as we dig deeper. (Keep in mind I'm eager to help you get this working.) 1) Is this on IIS7? 2) Do you need to continue with version 9 or can I help you with version 10? My next answers will rely on those answers. ;-) All the best, Mark
Problem solved!!! its an issue with IIS 7 CAUSE: There is a known issue with web applications using the Microsoft ReportViewer Control under IIS 7 not working properly due to a Handler Mapping issue because of a core architecture change. I got this from this link:http://support.discountasp.net/KB/a784/why-is-the-reportviewer-control-not-working-on-iis-7.aspx I followed its instructions and probelm is solved!!!! Thank you sir, for your great help and support..... Pranay