or
'Create an XML reader object from the updated stringUsing xmlReader As System.Xml.XmlReader = System.Xml.XmlReader.Create(New System.IO.StringReader(xmlString)) 'Create the report object and assing it the deserialised report definition Dim xmlSerializer As New System.Xml.Serialization.XmlSerializer(GetType(Telerik.Reporting.Report)) Dim report1 As New Telerik.Reporting.Report report1 = xmlSerializer.Deserialize(xmlReader) report1.Report.ReportParameters(0).Value = imagePath report1.Report.ReportParameters(1).Value = Session("User_GUID").ToString 'Assing the report object to the report viewer ReportViewer.Report = report1End UsingI know its not the latest good practice but changing the serialiser to this
Dim xmlSerializer As New Telerik.Reporting.XmlSerialization.ReportXmlSerializer()
Dim report As Telerik.Reporting.Report = DirectCast(xmlSerializer.Deserialize(xmlReader), Telerik.Reporting.Report)
Gives the new error: - An error has occurred during xml serialization. The xml serializer cannot resolve type with name:
Searching the forum doesn't return any results, so guessing this is a new problem.
Andy
public class EmailReport { public string EmailAddress { get; set; } public string EmailAttachmentExtension { get; set; } public string EmailAttachName { get; set; } public string EmailSubject { get; set; } public string EmailBody { get; set; } public String[] EmailReportParameters { get; set; } }InnerException {"Invalid value of report parameter 'LineOfBusiness1'."} at Telerik.Reporting.Processing.Report.ResolveData() at Telerik.Reporting.Processing.Report.ProcessItem() at Telerik.Reporting.Processing.ReportItemBase.Process(DataMember data) at Telerik.Reporting.Processing.Report.Process(DataMember data, DataItemState state, Boolean processItemActions, Boolean documentMapEnabled) at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(IReportDocument reportDocument, IDictionary processingContext) at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo) at compucom.TrackIT.Reports.Controllers.EmailReportController.SendEmailReport(EmailReport email) in C:\Users\tk83673\Documents\Projects\ITOProdSolutions\TrackIT\USBank\compucom.TrackIT.Reports\Controllers\EmailReportController.cs:line 76 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)