Skip to Content
author's profile photo Former Member
Former Member

Crystal Reports as linked files in Visual Studio 2010


We have a problem and I'm not sure if our approach in the first place is correct or best practice.

Here's the scenario:

- 2 X VB.Net Winforms projects (VS 2010 - latest CR) e.g. Proj1 & Proj2

- Proj1 has a Crystal Report set up in it

- Proj2 has exactly the same Crystal Report in it i.e. it is a 'linked' file in the Visual Studio Proj1 solution

The problem is that when you build Proj1 the Crystal Report auto generated file has a function 'FullResourceName' which returns the resource name of the CR as a string, but with the program that built it inserted at the beginning (i.e. Return "Proj1.crystalReport1.rpt")

If you build Proj2 without running the 'Custom Tool' on the linked CR and try using the CR whilst running the program, the program crashes saying 'Unable to find the report in the manifest resources.' (because FullResourceName is returning "Proj1.crystalReport1.rpt" instead of "Proj2.crystalReport1.rpt".

We use a Crystal Report Viewer on a VB.Net Form and the following is an extract of how we set up both form and crystal report:


Using frmRpt As New frmgCryRepViewer

Using crySys As New cryWrkPTRActiveWorkflows

frmRpt.cryViewer.ReportSource = crySys ' The Crystal Viewer sits on the form and is called cryViewer



you get the idea

If anyone has come across this and found a way round, or if we're doing anything wrong, can you let me know

Many thanks

Julian Tucker

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.