or
Hello,
I've been trying to upgrade the Telerik libraries to the latest version
but I've been getting the following error during runtime:
{System.IO.FileLoadException: Could not load file or assembly
'Telerik.ReportViewer.Silverlight, Version=7.0.13.426, Culture=neutral,
PublicKeyToken=a9d7983dfcc261be' or one of its dependencies. The
requested assembly version conflicts with what is already bound in the
app domain or specified in the manifest. (Exception from HRESULT:
0x80131053)
File name: 'Telerik.ReportViewer.Silverlight, Version=7.0.13.426, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'
at VenumBV.Apps.Venum.Views.Views.UserControls.ReportViewerControl.ReportViewerControl..ctor()}
I'm not sure why I'm getting this error. I've looked on the forums and
someone said that it was because I didn't reference the DLL's in my
website project, but I am. I'm also referencing them in the project that
has the actual reports and I'm referencing the
Telerik.ReportViewer.Silverlight DLL in the silverlight project that
launches the reports.
So I'm not sure what I'm doing wrong here. I've checked and I'm
referencing all the correct versions in the 3 different projects and
I've installed the latest version of the Reporting controls (with the
service pack).
Any help would be appreciated.
Private Sub activityTable_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles activityTable.NeedDataSource Dim tbl As Telerik.Reporting.Processing.Table = TryCast(sender, Processing.Table) Dim sect As Processing.ReportSection = TryCast(Processing.ElementTreeHelper.FindChildByName(tbl.Report, "ReportHeaderSection1", True).FirstOrDefault, Processing.ReportSection) Dim data As Object = sect.DataObject Dim cutoffdate As Date, managedbypartnerid As Integer Dim totalduetextbox As Processing.ProcessingElement = Processing.ElementTreeHelper.GetChildByName(sect, "payStubAmountDueTextBox") Dim totaldueaftertextbox As Processing.ProcessingElement = Processing.ElementTreeHelper.GetChildByName(sect, "payStubAmountDueAfterTextBox") Dim autopaytextbox As Processing.ProcessingElement = Processing.ElementTreeHelper.GetChildByName(sect, "autopaytext") If data IsNot Nothing Then cutoffdate = data.Item("UsageCutOffDate") managedbypartnerid = data.Item("ManagedByPartnerId") End If<telerik:ReportViewer ID="ReportViewerFiche" runat="server" BorderStyle="Solid" BorderWidth="1" Report="Rapports.Fiches.FicheAA.MyReport, Rapports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Width="100%" Height="500px" ViewMode="PrintPreview"></telerik:ReportViewer>public string ConnectionString { get; set; }private void Rpt_CustomerAccountsReport_NeedDataSource(object sender, EventArgs e){ try { if (Report.ReportParameters["MarketListID"].Value == null && Report.ReportParameters["BranchID"].Value == null && Report.ReportParameters["CustomerGroupID"].Value == null && Report.ReportParameters["CustomerID"].Value == null) { ErrorMsg("Error! This report cannot be run without parameters. Please select a Branch, Marketing list or Customer group."); } else { SqlData data = new SqlData(ConnectionString); // Shared getdataset function dsMain = data.GetDataSet("spRpt_CustomerAccountsReport", CommandType.StoredProcedure, "@EmployeeUserID", Report.ReportParameters["EmployeeUserID"].Value, "@MarketListID", Report.ReportParameters["MarketListID"].Value, "@CustomerID", Report.ReportParameters["CustomerID"].Value, "@BranchID", Report.ReportParameters["BranchID"].Value, "@CustomerGroupID", Report.ReportParameters["CustomerGroupID"].Value, "@EmployeeID", Report.ReportParameters["EmployeeID"].Value); // ** Moving the max record limit to the stored procedure so we can change / make it user configurable without a re-compile if (dsMain.Tables[0].Rows.Count > 40000) { ErrorMsg("Over 40,000 results were returned. The report cannot render. Please select more specific criteria."); } else { Report.DataSource = dsMain.Tables[0]; } } // They provided parameters } catch (Exception ex) { ErrorMsg(ex.Message); }}private void GroupHeaderArea1_ItemDataBinding(object sender, EventArgs e){ try { // Get the section Telerik.Reporting.Processing.GroupSection section = (sender as Telerik.Reporting.Processing.GroupSection); if (section != null) { // Get the customer ID for this section object id = section.DataObject["CustomerID"]; if (id != null) { int CustID = (int)id; // Filter out sub-report data DataRow[] drContacts = dsMain.Tables[1].Select("CustomerID=" + CustID.ToString()); DataRow[] drCrossSell = dsMain.Tables[2].Select("CustomerID=" + CustID.ToString()); DataRow[] drAccounts = dsMain.Tables[3].Select("CustomerID=" + CustID.ToString()); Rpt_CustomerAccountsReportAccountSummary rptAcct = new Rpt_CustomerAccountsReportAccountSummary(); Rpt_CustomerAccountsReportContacts rptContact = new Rpt_CustomerAccountsReportContacts(); Rpt_CustomerAccountsReportCrossSell rptCrossSell = new Rpt_CustomerAccountsReportCrossSell(); rptAcct.DataSource = drAccounts; rptContact.DataSource = drContacts; rptCrossSell.DataSource = drCrossSell; srContacts.ReportSource = rptContact; srCrossSell.ReportSource = rptCrossSell; srAccountSummary.ReportSource = rptAcct; } } } catch (Exception ex) { ErrorMsg(ex.Message); }}