• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1233
  • Last Modified:

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?
0
superlative
Asked:
superlative
  • 5
  • 4
1 Solution
 
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
 
Éric MoreauSenior .Net ConsultantCommented:
See the section "Embedded or not?"
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
Éric MoreauSenior .Net ConsultantCommented:
Dim mrptDoc As New maintainance
0
 
superlativeAuthor Commented:
you are an legend Eric. Thank you sooooooo much. Saved me a huge headache here!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now