By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 900 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

Set Crystal Report Namespace

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Mythran" <ki********@hotmail.comREMOVETRAIL> schrieb im Newsbeitrag
news:Oh**************@TK2MSFTNGP09.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
Nov 16 '05 #2

P: n/a

"Thomas Wenning" <no*******************@gmx.de> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...

"Mythran" <ki********@hotmail.comREMOVETRAIL> schrieb im Newsbeitrag
news:Oh**************@TK2MSFTNGP09.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.MyProjectType.MyCrystalReport). I want to set it to have
MyCompany.MyProjectType.MyReports.MyCrystalReport 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.ExportToDisk(pdfenumtype,
"C:\sample.pdf")).
Build and then test it.

Intellisense works fine and shows the report as being under <project root
namespace>.Reports.<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.Assembly = Reflection.Assembly.GetAssembly( _
GetType(<nameofthisclass>) _
)
Dim names As String() = asm.GetManifestResourceNames()

For Each name As String In names
Console.WriteLine(name)
Next

Change <nameofthisclass> to the class name of the class which contains the
above sample code :)

Anywho, hope this helps explain a bit more :)

Mythran
Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.