I have a report with an image databound to a byte[] with the following code:
<Image MimeType="image/gif" BorderThickness="1px" BorderColor="Transparent" Background="White" Left="1.5pt" Top="0.419999999999789pt" Width="300px" Height="35px"> <Image.Bindings> <Binding Source="=Fields.MainInspectorSignature" Target="ImageBytes" /> </Image.Bindings> </Image>
And the property for MainInspectorSignature returns a byte[] from the database representing an image. When I run the report on my local machine everything works fine. But when I deploy my solution to one of our servers I get the following exception during creation of the report:
2015-05-13 22:26:32,693 [21] ERROR N2.Norccis.Reporting.Coastguard.Reports.VisitationReport.VisitationReportCreator - [GenerateVisitationReportAndReturnPath] Error when generating reportInfragistics.Reports.Server.ReportProcessorException: An error occurred while processing the Report. ---> Infragistics.Reports.Engine.InternalProcessorException: An error has occurred while processing an Image report item. ---> System.ArgumentException: Object of type 'System.String' cannot be converted to type 'System.Byte[]'. at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast) at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig) at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, Object[] index) at Infragistics.Reports.Engine.BindingManager.ResolveBindings(IBindable item, Boolean onlyPostProcessingBindings) at Infragistics.Reports.Engine.ReportItemProcessorHost.ResolveBindings(IBindable bindable) at Infragistics.Reports.Engine.Controls.ImageProcessor.ProcessItem(Rectangle boundaries) --- End of inner exception stack trace --- at Infragistics.Reports.Engine.Controls.ImageProcessor.ProcessItem(Rectangle boundaries) at Infragistics.Reports.Engine.Controls.SectionProcessor.MoveToNextControlToProcess() at Infragistics.Reports.Engine.Controls.SectionProcessor.ProcessItem(Rectangle boundaries) at Infragistics.Reports.Engine.Processing.ReportInstanceModelBuilder.BuildHeaderAndFooter(PageSection pageSection) at Infragistics.Reports.Engine.Processing.ReportInstanceModelBuilder.BuildReport() at Infragistics.Reports.Engine.ReportProcessor.ProcessReportInternal() at Infragistics.Reports.Server.ServerExporter.Export(Stream output, String exportFormat) --- End of inner exception stack trace --- at Infragistics.Reports.Server.ServerExporter.Export(Stream output, String exportFormat) at N2.Norccis.Reporting.Common.Utilities.InfragisticsReportCreator.CreatePdfReportToFile(IEnumerable`1 dataSourceValues, String fileName, String reportName) in c:\tfs2013\src\N2.Norccis.Reporting\N2.Norccis.Reporting.Common\Utilities\InfragisticsReportCreator.cs:line 25 at N2.Norccis.Reporting.Coastguard.Reports.VisitationReport.VisitationReportCreator.GenerateVisitationReportAndReturnPath() in c:\tfs2013\src\N2.Norccis.Reporting\N2.Norccis.Reporting.Coastguard\Reports\VisitationReport\VisitationReportCreator.cs:line 63
I have been debugging this issue for days now but I cannot figure out why we get this exception on the server. Can anyone please help me? We are using version 12.1 of Infragistics reporting and our server is Windows Server 2012. My client where thing work is a Windows 7 machine.
Thanx a lot!
Hi Tom,
Thank you for your post. I have been looking into your issue and your version is old and even if the issue is in our code, we do not provide fixes for vol. 12.1. For more information:
http://es.infragistics.com/support/product-lifecycle
Please note that the Infragistics Reporting product is already retired:
http://es.infragistics.com/community/blogs/jason_beres/archive/2015/04/13/product-status-change-notification-infragistics-reporting.aspx
It is very strange that everything goes right on your machine and the error occurs only when run the application on other environment. You can try to double-check whether all necessary assembly files are added in your application.
Also you could attach a sample application where this issue is reproducible in order to test it on my side.
Looking forward to hearing from you.
Thanx a lot for your reply! I finally figured out why I got this error :P The problem was a DLL (Microsoft.Ink.dll) which I used from the byte[] property the image was bound to which was only supported x86 but the server is x64. Pretty strange error message indeed, nothing there which indicated that this was the problem. But i rewrote my code and now evertthing works perfectly.
Again, thanx for your help!