Unable to cast object of type ‘System.Byte[]‘ to type ‘System.Drawing.Image’.

I had saved a logo in a varbinary field for report header. While using ActiveReports, I placed a picture object and on reportstart method tried to assign the DataRow image column to this object. Kept getting the Unable to cast of object type ‘System.Byte[]‘ to type ‘System.Drawing.Image‘ exception.

Finally resolved it using MemoryStream. Here is the code excerpt,

byte[] imgData = (byte[])dt.Rows[0]["MyLogo"];
MemoryStream ms = new MemoryStream(imgData);
reportLogo.Image = Image.FromStream(ms);

Have fun!

Handler Mappings for ActiveReports 3.0 on IIS7

If you are still facing that 404 – File Not Found exception when trying to open an ActiveReport in a ASP.NET 2.0 integrated website in a IIS7 hosting, then try the following mappings  – tried and verified -

<system.web>
…..
…..
<httpHandlers>
      <add verb=”*” path=”*.rpx” type=”DataDynamics.ActiveReports.Web.Handlers.RpxHandler, ActiveReports.Web, Version=5.3.1436.1, Culture=neutral, PublicKeyToken=cc4967777c49a3ff” />
      <add verb=”*” path=”*.ActiveReport” type=”DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler, ActiveReports.Web, Version=5.3.1436.1, Culture=neutral, PublicKeyToken=cc4967777c49a3ff” />
      <add verb=”*” path=”*.ArCacheItem” type=”DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler, ActiveReports.Web, Version=5.3.1436.1, Culture=neutral, PublicKeyToken=cc4967777c49a3ff” />
</httpHandlers>
…..
…..

<system.webServer>
…..
…..
<handlers accessPolicy=”Read, Execute, Script”>
      <add name=”ActiveReports RPX Handler” path=”*.rpx” verb=”*” type=”DataDynamics.ActiveReports.Web.Handlers.RpxHandler” resourceType=”Unspecified” requireAccess=”Script” />
      <add name=”ActiveReports WebCache Handler” path=”*.ArCacheItem” verb=”*” type=”DataDynamics.ActiveReports.Web.Handlers.WebCacheAccessHandler” resourceType=”Unspecified” requireAccess=”Script” />
      <add name=”ActiveReports Compiled Report Handler” path=”*.ActiveReport” verb=”*” type=”DataDynamics.ActiveReports.Web.Handlers.CompiledReportHandler” resourceType=”Unspecified” requireAccess=”Script” />
</handlers>

Thinking Full Throttle with ActiveReports for VS 2010

Back to the thinking board…

ActiveReports for .NET 3.0 does not support VS 2010. Not a good option.

GrapeCity staff says,

I apologize for the inconvenience. However, I must re-iterate that we will not be adding support for VS2010 to ActiveReports for .NET 3.0 (ARN3). ARN3 is not in active development and has had its last service pack (SP3) released in October, 2009. Any bugs or feature request associated with ARN3 will only be considered in ActiveReports 6.

Our current and ongoing focus is to continue bug fixes and new feature additions in
ActiveReports 6 and dedicate time and resources on new product development.

And further mentions: -

ActiveReports (version 3.0 and 6) installer detects the presence of Visual Studio before it proceeds with the installation.  ActiveReports for .NET 3.0 is available for VS 2003, VS 2005 and VS 2008.  ActiveReports 6 is available for VS 2005, VS 2008 and VS 2010.

Hoping to get hold of ActiveReports 6 release soon. As I don’t feel others accomplish the complex scenarios I have to go through. This time going to use it full-throttle just like the game I played in child-hood days… Full Throttle!!! J

 


arview2.cab – Windows has blocked this software because it can’t verify the publisher

My old website projects had hit a snag. The ones that were using arview2.cab
file for ActiveX Viewer, i.e. ActiveReport viewer, now returned certificate
expiry warnings. The most prominent message at the end was,

Windows has blocked this software because it can’t verify the publisher.

The resolution to this problem was simple.
I downloaded the latest arview2.cab file from here,

http://downloads.datadynamics.com/arview2.cab

Follow

Get every new post delivered to your Inbox.