HighTechTalks DotNet Forums  

Crystal Reports from Class Library

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss Crystal Reports from Class Library in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Crystal Reports from Class Library - 08-29-2005 , 03:41 PM






I have several modules that have Crystal Reports classes in them. When
the modules are compiled as a Windows Application, the reports can be
instantiated and displayed without any problems.

When a module is compiled as a Class Library, and then the parent frame
is instantiated from another assembly, all of the reports give this
error when they are instantiated:

An unhandled exception of type
'System.Runtime.InteropServices.MarshalDirectiveEx ception' occurred in
crystaldecisions.crystalreports.engine.dll

Additional information: Marshaler restriction: Excessively long string.

Is there any way to get a Crystal Reports object to instantiate
properly from a Class Library application?

-Kurt


Reply With Quote
  #2  
Old   
Metal2You
 
Posts: n/a

Default Re: Crystal Reports from Class Library - 08-30-2005 , 09:13 AM






Well it seems the fact that the report is in a Class Library isn't what
is causing the problem. I did a test with a simple report and was able
to instantiate it from a class library.

I still have no idea what the cause of the problem is though.


Reply With Quote
  #3  
Old   
Andre Rog
 
Posts: n/a

Default Re:Crystal Reports from Class Library - 09-28-2005 , 06:53 PM



I had exactly the same problem and firstly I didn't find any hint on the net.

After some hours of nightmare, I finally found the problem (the experts
would add: but not the cause to the problem):
My "parent"-windows-application - the one that contains the
crystalreport-derived user control - (NOT THE classlibrary itself!)
contained some illegal references. In my case, I referenced the microsoft
internet control classes (axshdocvw, etc.) in a wrong way. To check if that
is the same matter at your code, create a new winapp-project and add the
crystal-control from the classlibrary. It should work.

Hope that helped!
-Andre

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.