superlative
asked on
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?
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?
see http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx
ASKER
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....
See the section "Embedded or not?"
ASKER
hmmm. ive checked that an it says embedded already.
this is the load part i have,
' mrptDoc.Load(Application.S tartupPath & "\maintainance.rpt") '
Now if i copy the .rpt file to say c:\application\maintainanc e.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?
this is the load part i have,
' mrptDoc.Load(Application.S
Now if i copy the .rpt file to say c:\application\maintainanc
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?
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
dim x as new maintainance
ASKER
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.
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.
you don't have to load it. Creating an instance (dim) already loads it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
you are an legend Eric. Thank you sooooooo much. Saved me a huge headache here!