Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Exception when creating report with databound image
posted

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 report
Infragistics.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!

Parents Reply Children
No Data