.NETGURU
System.ArgumentOutOfRangeException
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-crystal' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Manrique, Nerea
Hello,
I have this error when I tried to load a crystal report from the server...
I don't really understand what item(0) means??
IS there another way of making this conexion?
someone can help me??
***************************************************************************
Exception Details: System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:

Line 31: 'logOnInfo.ConnectionInfo.Password = "xxx" Line 32:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = "xx"    
Line 33:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName = "xx"    
Line 34:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName = "xx"

Line 35:     
****************************************************************************
******
My code is the following...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName =
"xxx"
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName =
"xxx"
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = "xx"
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password =
"xxx"
CrystalReportViewer1.DataBind()
End Sub
**************************************************************

Thanks

Reply to this message...
 
    
Eric Landes (VIP)
Item(0) should be the first connection information you need. So if you =
have
2 tables in your report, 0 should be the first table. I didn't see in =
your
code, did you already set a report source for the viewer before setting =
your
connection info?

*************************=20
Eric Landes=20
Senior Programmer/Analyst member of the ASPFriends.com Moderator team=20
For Articles on Crystal.Net, Datagrids and more check out
http://www.aspalliance.com/corporatecoder/
*************************=20
All statements expressed are my own, and do not reflect the opinion of =
my
employer, unless stated otherwise.=20

-----Original Message-----
From: Manrique, Nerea [mailto:Click here to reveal e-mail address]
Sent: Wednesday, July 17, 2002 10:24 AM
To: ngfx-crystal
Subject: [ngfx-crystal] System.ArgumentOutOfRangeException

Hello,
I have this error when I tried to load a crystal report from the =
server...
I don't really understand what item(0) means??
IS there another way of making this conexion?
someone can help me??
*************************************************************************=
**
Exception Details: System.ArgumentOutOfRangeException: Index was out of
range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:=20

Line 31: 'logOnInfo.ConnectionInfo.Password =3D "xxx" Line 32:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID =3D "xx"=09
Line 33:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName =3D =
"xx"=09
Line 34:
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName =3D =
"xx"

Line 35: =09
*************************************************************************=
***
******
My code is the following...

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName =
=3D
"xxx"
=
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName =3D
"xxx"
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID =3D =
"xx"
CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password =
=3D
"xxx"
CrystalReportViewer1.DataBind()
End Sub
**************************************************************

Thanks

Confidentiality Notice: This e-mail message, including any
attachments, is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized
review, use, disclosure or distribution is prohibited. If you are not
the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.

PARTNERS Health Plan Phone: 574-233-4899
100 E. Wayne St., Suite 502 Fax: 574-234-7484
South Bend, IN 46601 www.partnersindiana.com

Reply to this message...
 
 
System.ArgumentOutOfRangeException
System.EventArgs
System.Object




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification