i'm creating a report in an ASP.NET webform but every time i load the report nothing is displayed .. crystalreportviewer is not even giving back any errors ..
just nothing in there .. like i didn't put anything in there ...
i'm using VS 2012 with .NET 4.5 on Win 8 x64 Pro.
i already had installed
CrystalReports Basic Runtime For VS 2008 v10.5.2.0
CrystalReports For VS 2010 v13.0.2.469
& when i installed the VS 2012 i installed CrystalReports For VS 2012 v13.0.5.891
this is my page html
<tr> <td> <div> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" /> </div> </td> </tr>
& here's the event where i populate it
protected void btnLoadReport_Click(object sender, EventArgs e) { try { rpt_FinancialStatements.rpt_AccountLedger AccountLedger = new rpt_FinancialStatements.rpt_AccountLedger(); if (!string.IsNullOrEmpty(txtAccountID.Text) && !string.IsNullOrEmpty(txtAccountName.Text)) { LogicLayerEngine.AccountID = Convert.ToInt64(txtAccountID.Text); LogicLayerEngine.StartingPeriod = Convert.ToDateTime(txtStartingPeriod.Text); LogicLayerEngine.EndingPeriod = Convert.ToDateTime(txtEndingPeriod.Text); StringBuilder ReportTitle = new StringBuilder(); ReportTitle.Append(txtAccountName.Text + "Account Ledger"); ReportTitle.Append("\r\nFrom :" + txtStartingPeriod.Text + " - To :" + txtEndingPeriod.Text); ReportDocument rptDoc = new ReportDocument(); rptDoc.Load(Server.MapPath("rpt_FinancialStatements/rpt_AccountLedger.rpt")); rptDoc.SetDataSource(LogicLayerEngine.SelectOperation_DT(4)); rptDoc.SetParameterValue(0, ReportTitle.ToString()); CrystalReportViewer1.ReportSource = rptDoc; CrystalReportViewer1.DataBind(); } else tdErrorMessage.InnerHtml = GenerateErrorMessage("Select Account You Want To Generate Ledger Sheet For"); } catch (Exception ex) { tdErrorMessage.InnerHtml = GenerateErrorMessage(ex.Message); } }
upon further investigation i checked my web.config file i found out that VS 2012 is hocked on the CR v 13.0.5.469
<assemblies> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" /> <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /> <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" /> <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> </assemblies>
so now my question is .. is that the problem ? .. & if it is .. how can i make the VS 2012 integrate with the newer version 13.0.5.891 ?
& if it's not .. what am i doing wrong ? .. though i was working on a desktop app last week & reports was working fine !!!