"Thomas Wenning" <no************ *******@gmx.de> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
"Mythran" <ki********@hot mail.comREMOVET RAIL> schrieb im Newsbeitrag
news:Oh******** ******@TK2MSFTN GP09.phx.gbl... In .Net, how can I go about and set a Crystal Reports namespace? Right
now they use the Root Namespace (VB) from the project. How can I extend the
namespace for a single report (which will be set on all reports)?
Thanks for any and all help, in advance :)
Mythran
Hi Mythran,
Crystal Reports provides the following namespaces:
http://blogs.aspadvice.com/crystal/a...03/31/884.aspx
Greeting
Thomas
Sorry, don't think I was clear enough. I have a strongly typed crystal
report (created in the .Net IDE so it's CR.Net). Right now I have to use
the project's namespace to access the report (Ex:
MyCompany.MyPro jectType.MyCrys talReport). I want to set it to have
MyCompany.MyPro jectType.MyRepo rts.MyCrystalRe port but it won't let me.
After viewing the manifest of the assembly when I set the Custom Tool
Namespace property, I see that the code file for the report (*.vb) is under
the correct namespace that I want but the report file itself is under the
project root namespace. Therefore, I believe this to be a bug in either the
..Net compiler or the CR.Net framework...
The Crystal Report file (*.rpt) should go under the correct namespace in the
assembly manifest that I define using the Custom Tool Namespace, or there
should be some way of setting the namespace that the report should go under.
To reproduce what I'm trying to do and the exception I'm getting:
Create new Web Project.
Add a Crystal Report.
Select the Crystal Report under the Solution Explorer and right-click it.
Click Properties
Change the "Custom Tool Namespace" to "Reports".
In code, create the report and export it (report.ExportT oDisk(pdfenumty pe,
"C:\sample.pdf" )).
Build and then test it.
Intellisense works fine and shows the report as being under <project root
namespace>.Repo rts.<report name> but an exception is thrown that states the
report is not in the assembly manifest. The report IS there, but not with
the same name (or namespace). To test how I came to this conclusion:
Dim asm As Reflection.Asse mbly = Reflection.Asse mbly.GetAssembl y( _
GetType(<nameof thisclass>) _
)
Dim names As String() = asm.GetManifest ResourceNames()
For Each name As String In names
Console.WriteLi ne(name)
Next
Change <nameofthisclas s> to the class name of the class which contains the
above sample code :)
Anywho, hope this helps explain a bit more :)
Mythran