Visual Studio 2005 Crystal Report .rpt file publishing

Hi, I am using Visual Studio 2005 and coding in vb.net.

I have created a few crystal reports.  They all end in .rpt inside the solution.  Anyhow when I publish the application, it creates a setup.exe etc like normal. Only thing is it doesn't seem to 'publish' the .rpt files.  How do I get the publishing in vs2005 to include the .rpt files so that I don't have to manually copy them to each clients comptuer that we install the software on?
superlativeAsked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
Dim mrptDoc As New maintainance
0
 
superlativeAuthor Commented:
i see how to create the report etc, and refcerence it. but what im stating is that the .rpt file isn't published with the actual application....
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Éric MoreauSenior .Net ConsultantCommented:
See the section "Embedded or not?"
0
 
superlativeAuthor Commented:
hmmm. ive checked that an it says embedded already.

this is the load part i have,

'  mrptDoc.Load(Application.StartupPath & "\maintainance.rpt") '

Now if i copy the .rpt file to say c:\application\maintainance.rpt, and then hardcode the load path to this, it loads fine.

I can't understand why my load can't just work like above as its embedded. I have also tried using the .load with just "maintainance.rpt" with no luck either.

any ideas?
0
 
Éric MoreauSenior .Net ConsultantCommented:
If your reports are embedded, they are embedded into your DLL/EXE and you cannot load them using the Load method. You need to create new instance of them:
dim x as new maintainance

0
 
superlativeAuthor Commented:
Sorry eric for not understanding the last reply you have.
I see your very knowledgeable, sorry I can't fully understand.

I tried adding this below inplace of my load with maintainance.rpt.

        Dim x As New maintainance
        mrptDoc.Load(x)

However it displays an error that x cannot be converted. Again sorry for the lack of knowledge on how to call on a report that is included in the dll/exe file.


0
 
Éric MoreauSenior .Net ConsultantCommented:
you don't have to load it. Creating an instance (dim) already loads it
0
 
superlativeAuthor Commented:
you are an legend Eric. Thank you sooooooo much. Saved me a huge headache here!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.