cancel
Showing results for 
Search instead for 
Did you mean: 

invalid report file path

Former Member
0 Kudos

hello, I need help in solving an error on crystal reports, when I run my report it runs okay but when I hit a key to produce outcome of report I get an error "crystal report windows form viewer - load report failed" Invalid report file path. Can some one help me? thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1 when you run the report from Crystal report designer ( what version)

2 "crystal report windows form viewer " what is this it looks like the report url is wrong can you post the url you are using

Former Member
0 Kudos

hello, well i am using visual studio 10 with crystal reports for visual studio 2008. Is that a conflict?

0 Kudos

Moved to .NET SDK forum.

Correct, CR for VS 2010 is the only runtime supported in VS 2010. Look though this forum, lots of links to download it update your project.

Don

Former Member
0 Kudos

so what update do I need to download for visual studio 10?

0 Kudos

Go to this page: http://www.sdn.sap.com/irj/boc/crystalreports-dotnet

All the install to VS 2010 plus the redist packages as well as other info.

Searching you have found multiple links also...

Don

Former Member
0 Kudos

hello again, I went and download the files for visual basic 10 but still get the erro 'invalid report file path'. What can I do to correct this error?

0 Kudos

Well considering there is nothing in your replies to even suggest something to try, all we know is you are using VB and you have an invalid report path error, I suggest you download one of the samples from this WIKI page and see if it still fails:

http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications

Then when there is a specific error and you can debug it in a specific function someone may have a suggestion.

All I can suggest at this time from the subject line is to verify the report path is correct and your app does have access to it where ever it may be...

Good luck

Don

Former Member
0 Kudos

hello, here is a copy of my program that I am using, maybe this might help you out if I am missing or have something wrong. Thank you.

Dim param1Fields As New ParameterFields

Dim param1Field As ParameterField

Dim param1Range As New ParameterDiscreteValue

param1Field.ParameterFieldname = "record"

param1Range.Value = TextBox1.Text

param1Field.CurrentValues.Add(param1Range)

param1Fields.Add(param1Field)

CrystalReportViewer1.ParameterFieldInfo = param1Fields

CrystalReportView1.ReportSource = "S:\etdc\James\CrystalReport1.rpt"

CrystalReportView1.Visible = True

The error I am getting in the follow code for invalid report file path is "CrystalReportView1.ReportSource = "S:\edtc\James\CrystalReport1.rpt"

0 Kudos

Hello,

Try this, and there are various ways to declare the Report object:

Dim boReportDocument As New ReportDocument

FileName = "S:\etdc\James\CrystalReport1.rpt"

boReportDocument.Load(.FileName, CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy)

then your code....

then set the viewer to to boReportDocument:

CrystalReportView1.ReportSource = boReportDocument

Thank you

Don

Former Member
0 Kudos

okay thanks I tried your code but got error "FileName is not declared". It may be inaccessible due to its protection level. How can I fix this error. Sorry I kind new at this reports. Thank you for your help and response.

0 Kudos

Here's about as basic as you can get:

Imports CrystalDecisions.ReportAppServer.ClientDoc

Imports CrystalDecisions.CrystalReports.Engine

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument

Dim rptClientDoc As New CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument

rpt.Load("c:\reports\world sales report.rpt")

CrystalReportViewer1.RefreshReport()

CrystalReportViewer1.ReportSource = rptClientDoc

End Sub

End Class

Former Member
0 Kudos

hello again, well thank you for your suggestions, So if I need to put my application on another user pc do I need to install crystal reports or what do I need to do?

0 Kudos

Go to: http://www.sdn.sap.com/irj/boc/crystalreports-dotnet

Bottom of the page has the distribution packages for CR for VS 2010. Simply create a Distribution Project and add 32 or 64 bit package.

If you search in this forum and in kbase you'll find lots of documentation and posts on how to...

Don

Answers (1)

Answers (1)

0 Kudos

This error sounds like you have either developed and application or you are using a third party application.

If you wrote the app then debug the error, if a third party wrote the app then you need to give them a call to help you debug the problem.

On a side note, try deleting all of your temp files in your \temp folder. Close EVERYTHING you can before deleting the temp files and ignore the files you can't delete.

Don

Former Member
0 Kudos

well I tried to delete my temp files but still getting invalid report file path. I am using visual studio 10, application is running good but when i try to run report it gives me this error.