Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems Deploying Crystal Reports

Status
Not open for further replies.

jodyjay

Programmer
Oct 14, 2005
13
US
Greetings. I recently created a small application that connects to a local Access database and produces a report using Crystal Reports 10. As always everything works fine on my development machine, but when I deploy it to my target machine the report fails.

Error Message: Load Report Failed.
Target Machine: Windows XP
VS.NET Version: 2003

From the Business Objects website I downloaded their "deploying_cr10_net.pdf" document which shows that I needed to add the CrystalReports10_NET_EmbeddedReporting.msm merge file.

As for the location of the error I was able to narrow it down to this statement:

Code:
With mobjReportDocument
   [COLOR=red].Load("C:\myreport.rpt")[/color]
   .SetDataSource(pdtMyDataTable)
End With

Has anyone had this problem before? Does anyone know what I'm doing wrong or missing? I'm really in a bind and need to have this fixed quickly.

Thanks,

-jodyjay
 
Code:
.Load("C:\myreport.rpt")

Does the report exist on the Target machine?. If so, put a Try-Catch loop around the load to get more details of the error.



Sweep
...if it works dont f*** with it
curse.gif
 
Okay, I've made some progress on this problem but I'm still stuck. Out of frustration I went ahead and installed Crystal Reports 10 on my development machine (just for kicks) and it was still getting this error message.

I opened up the report in the Crystal Reports environment, and it showed the exact location of the database when the report was first created (i.e. "C:\mytest\db1.mdb"). But when I installed the app it went under into the "C:\Program Files\.." directory.

Just to be clear, the application is correctly connecting to the database. It's when the report is launched that it can't find the database. After researching this I was able to set the data source location and set it to "Same as Report".

Good news: now I can open the report in the CR Environment and run the report. Bad news: I still get the same error when I run the report using my app.

Can anyone PLEASE help me???

-jodyjay
 
This issue is really upsetting me and my boss says he needs a solution immediately. Can anyone please help me?

-jodyjay
 
Hi,
Can you post some code? As Sweep asked, does the report exist on the local machine? Where is the database? Does it exist on the local machine, as well?

 
Worst case senerio, call Crystal. The initial phone bank and web support comes from India, but they are good enough to figure out simple issues. If they can't help you, they can elivate your case. Its only like $250 for a support call if your license included calls have expired.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Yes, the report exists on the local machine. The database is installed in the same directory as the report. As I stated earlier I had to go into Crystal and set the database location to "Same as Report" (which works fine in Crystal) but it doesn't load in my app.

Code:
  Try
    With mobjReportDocument
      .Load("C:\myreport.rpt")
      .SetDataSource(pdtDataTable) ' contains active data.
    End With
  Catch ex As Exception
    Call MsgBox("Area 2: " & Err.Number & vbCrLf & Err.Description)

  End Try

  Try
    With Me.crvViewer
      .ReportSource = mobjReportDocument
      .Zoom(80)
    End With
   Catch ex As Exception
     Call MsgBox("Area 3: " & Err.Number & vbCrLf & Err.Description)
   End Try
 
Did you create the report using Crystal 10 and are trying to open it with VB.Net? I usually create the reports in the .Net environment. The one time I tried to use a report created in Crystal, I was unable to access the formulas and other formatting within Visual Studio.

Can you try to recreate the report in the .net environment and use that report instead?

This is just a guess.
 
Okay, here's a few questions.

Did you include the CR 10 msm?
Did you set the key in the msm?
Did you build a setup package and deploy it?
Is your install file's name longer then 17 characters?
How are you connecting to the Access database?
Do you have the data drivers installed on the target machine?
If you are using ODBC, do you have the ODBC entry on the target machine?
Are you specifying the path to the database?

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
I went through similar issues just this week. Only I was having Keycode problems. I found the right doc on Business Objects to walk me through setting the keycode. I also had to include the correct version of merge files since I had CR 9 installed and VS 2003 .NET on the development machine.

I would recommend adding the .rpt file to your .net project and add it as a component on your form. Then include all of the .msm files required to your deployment project.
 
udo321:

Q. "Did you create the report using Crystal 10 and are trying to open it with VB.Net?"
A. Yes, I created it in the Crystal 10 environment.

Q. "Can you try to recreate the report in the .net environment and use that report instead?"
A. I can, but these reports have a chart embedded into it, which can not be done in the .Net environment (I think).


ThatRickGuy:

Q. "Did you include the CR 10 msm?". Yes. At first I didn't, so I had to repackage it.
Q. "Did you set the key in the msm?". Yes.
Q. "Did you build a setup package and deploy it?". Yes.
Q. "Is your install file's name longer then 17 characters?". No it isn't.
Q. "How are you connecting to the Access database?". The db is in the same path as the report, so I'm connecting to it try the standard ODBC connection string.
Q. "Do you have the data drivers installed on the target machine?". Yes it does.
Q. "If you are using ODBC, do you have the ODBC entry on the target machine?". Yes I have the ODBC entry.
Q. "Are you specifying the path to the database?". Yes.


LLBP:

Q. "I would recommend adding the .rpt file to your .net project and add it as a component on your form. Then include all of the .msm files required to your deployment project."

A. It looks like I might have to go this route. I went with the external .rpt route because my users need/want to have my data displayed with some type of graph. To my understanding the embedded reports can not before this function.


A co-worker of mine is looking into another 3rd party software called XtraReports & XtraCharts from Developer Express. Has anyone worked with this before? Does anyone have an opinons on their products?

Special thanks to udo321, ThatRickGuy, and LLBP for your questions and recommendations. Hopefully I can find an answer soon.

-jodyjay
 
One last thought - may not be applicable to you, but I'll throw it out there. We recently installed the beta version of Crystal 11 which, it turns out, made all sorts of changes to Studio. Among other things, it replaced the crystal viewer component and it would no longer work with older reports that were opened in Studio. Even though we answered no to the upgrade question, the viewer was replaced. We had to uninstall it and reinstall the Studio Crystal components in order to work with the existing projects that used Crystal.
 
CR XI can not open any reports made from CR 8.5 or earlier. CR 9 reports should be fine. We have used both CR 9 and CR XI reports and libraries to handle external reports, so this is definately possible.

Q. "If you are using ODBC, do you have the ODBC entry on the target machine?". Yes I have the ODBC entry.
Q. "Are you specifying the path to the database?". Yes.

Your report should refer to either the ODBC data source, or the file, not both. The ODBC entry should refer to the file.

I am somehwhat doubtful that this is a data issue though now that I think of it. The "Failed to load report" error is usually associated with the CR driver. I'm not sure if it its necesary for CR 10, but with external CR 9 reports you needed to include 4 extra msm files. license.msm, VC_CRT.msm, VC_STL.msm, and reportengine.msm (If I recall correctly, search the businessobjects knowledge base for VC_CRT, some articles should come up).

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
my users need/want to have my data displayed with some type of graph. To my understanding the embedded reports can not before this function

I have created reports with charts in the VS IDE using Crystal Reports several times. Just right-click on a section, select "Insert" in the pop-up menu, and then select "Chart...". The Chart Expert will open and you can define your chart.



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
udo321, thanks for your response. We are using CR10 and the viewer works fine on my development machine.


ThatRickGuy, I downloaded a whitepaper from Business Objects on how to deploy applications using CR10 and .Net. I followed the instructions perfectly, but I'm still having problems. According to them all I need to include is the CrystalReports10_NET_EmbeddedReporting.msm file. This is suppose to have everything I need.


jebenson, I was not aware of the Chart Expert feature that is available in the VS IDE. I will look into it right now!

-jodyjay
 
I followed the instructions perfectly, but I'm still having problems."

As my old comp sci teacher SSgt Craven used to say, "If yours is just like mine, and it doesn't work, then yours is not just like mine"

I ran into a lot of CR 10 documentation while trying to correct issues with CR 9 and CR XI deployments, and there are contradictory articles on their own knowledge base. I would still recommend looking into the VC_CRT msm and make absolutely positively sure that its not required.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Thanks for the recommendation Rick. I'll see what comes up.

-jodyjay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top