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!

Invalid Parameter

Status
Not open for further replies.

ZuperDuper

Programmer
Jun 4, 2004
39
US
Why would I get an Invalid Parameter exception when trying to open up a CR9 in vb.net on 2000 machine, but it works fine on XP?! I have no idea what the problem is

I have checked data types, so they would match, report can be viewed fine on XP through vb.net or through Crystal Reports software. I am using 7 different reports and they all act same way.

Iam using Access database. I wonder if anyone ran into simmillar problem here...
Can anyone help please?

You should never underestimate the predictability of stupidity.
 
Hmm, I am looking through the report for the 7th time and just noticed that one fields type comes up as a number type if i hover mouse over it. It does store values that could be numbers, but the field in the database is set to text.
Interesting thing is that if I try to delete the label from the report, and drag a new one from the FieldExplorer, it still ends up as a number. Weird.
Once again it works fine in XP and does not in 2000. Pardon my French - kraP.

You should never underestimate the predictability of stupidity.
 
Hmm, I actually figured out where the error is coming from, although I dont know why and dont know how to fix it yet...

form3 = New Form3
With form3.CRVIEWER9
.ReportSource = ("C:\Program Files\dc analysis reports\othcount.rpt")
.Show()
form3.Enabled = True
form3.Show()
form3.Text = "All Files in QC directory"
.Visible = True
End With
The erro occurs on the line Form3.show() which doesnt make much sence since error itself is reffering to the report viewer.: Error in ("C:\Program Files\dc analysis reports\othcount.rpt") : INvalid Parameter Name. Crystal Report Windows Forms Viewer.

Now, I know that I might need to talk to someone in vb.net forum about this, but still if anyone have any idea, please let me know.

You should never underestimate the predictability of stupidity.
 
Thanks for the link it is pretty nice. The thing though, is that one of the examples is previewing the report that way. They just assign the path to the report object. And it does work under XP, but not 2000. I will try various other methods that they provide examples for.

You should never underestimate the predictability of stupidity.
 
Dim repDoc As ReportDocument = New ReportDocument

Try
repDoc.Load(Path) <-------
Catch ex As Exception
MessageBox.Show(ex.Message, "xxx",MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.Cursor = Cursors.Arrow
Return
End Try
 
Am I supposed to set the CRViewer source to repDoc?

You should never underestimate the predictability of stupidity.
 
I tried
Try
repDoc.Load(path)
.ReportSource = repDoc
.RefreshReport()
Catch ex As Exception
MessageBox.Show(ex.Message, "xxx", MessageBoxButtons.OK, MessageBoxIcon.Error)
form3.Cursor = Cursors.Arrow
Return
End Try

Still same problem, it works fine on XP though. Maybe it is a problem with DLLs? How would find out what is missing, since I am getting same error, which does not refer to anything at all? Try-Catch does not help.

You should never underestimate the predictability of stupidity.
 
Thanks, to all. I've resolved the issue.

You should never underestimate the predictability of stupidity.
 
Hi ZuperDuper,

You close by saying you solved the problem. I am just finding the same problem between my 2000 PC and our XP PCs.

How did you solve the problem??

Blinder

"Process and procedure are the last hiding place of people without the wit or wisdom to do their job properly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top