on 10-05-2011 2:42 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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"
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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.