Ruwaished,
Crystal reports rpt files cache the user connection
you are using in your development environment. If you
Are using the Crystal Reports viewer you need to loop
thru the database objects with your connection
information. Code is below.
Shannon
'CR variables
Dim crReportDocument As Object
Dim crDatabase As Database
Dim crTables As Tables
Dim crTable As Table
Dim crTableLogOnInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo
'Put some coode here for telling which rpt file to
load
'Do something
'Next create the variables for looping thru the
database objects
crConnectionInfo = New ConnectionInfo
With crConnectionInfo
.ServerName =
System.Configuration.ConfigurationSettings.AppSettings("rptDBServer")
.DatabaseName =
System.Configuration.ConfigurationSettings.AppSettings("rptDBName")
.UserID =
System.Configuration.ConfigurationSettings.AppSettings("rptDBUId")
.Password =
System.Configuration.ConfigurationSettings.AppSettings("rptDBPwd")
End With
'Get the tables collection from the report
object
crDatabase = crReportDocument.Database
crTables = crDatabase.Tables
'Apply the logon information to each table
in the collection
For Each crTable In crTables
crTableLogOnInfo = crTable.LogOnInfo
crTableLogOnInfo.ConnectionInfo =
crConnectionInfo
crTable.ApplyLogOnInfo(crTableLogOnInfo)
Next
--- smaruwaished ahmed <[EMAIL PROTECTED]> wrote:
> Dear Friends,
>
> I deployed one project , in that reports are showing
> from server, when i install it in client machine the
> reports are not coming,
> it says logon failed.
>
> pl. kindly send suggestions and sample codings if
> possible.
> Thanking yu
>
> Ruwaished Ahmed
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been
> removed]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/