Hello,
Iam trying to use crystal reports in vs.net 2003. Cr is of version 9.5. My problem with CR is iam not able to change the database type from sql to oracle and oracle to sql dynamically at run time.
the report can either be designed initially with sql or oracle , at run time i will know exactly wot db i need to connect to ...and change it accordingly.
This is my code....and this looks like working only if Crystal report is oracle designed initially...and it works ....but if report was done with sql initially ...iam not able to pass oracle params (usrname,passwd etc)....may be i need to change the db type first but donno how to do.
also i tried using CRAXDDRT20 as found in other documents , but could not find connectionproperties on this object...
Thanks for any help
[/SIZE]
Iam trying to use crystal reports in vs.net 2003. Cr is of version 9.5. My problem with CR is iam not able to change the database type from sql to oracle and oracle to sql dynamically at run time.
the report can either be designed initially with sql or oracle , at run time i will know exactly wot db i need to connect to ...and change it accordingly.
This is my code....and this looks like working only if Crystal report is oracle designed initially...and it works ....but if report was done with sql initially ...iam not able to pass oracle params (usrname,passwd etc)....may be i need to change the db type first but donno how to do.
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] tlicurrent [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] CrystalDecisions.Shared.TableLogOnInfo[/SIZE]
[SIZE=2][SIZE=2][COLOR=#0000ff]For[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Each[/COLOR][/SIZE][SIZE=2] tbCurrent [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] CrystalDecisions.CrystalReports.Engine.Table [/SIZE][SIZE=2][COLOR=#0000ff]In[/COLOR][/SIZE][SIZE=2] crDoc.Database.Tables
tlicurrent = tbCurrent.LogOnInfo
[/SIZE][SIZE=2][COLOR=#0000ff]With[/COLOR][/SIZE][SIZE=2] tlicurrent.ConnectionInfo
.ServerName = servername
.UserID = usrname
.Password = passwd
.DatabaseName = ""
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]With
[/COLOR][/SIZE][SIZE=2]tbCurrent.ApplyLogOnInfo(tlicurrent)
[/SIZE][SIZE=2][COLOR=#0000ff]Next[/COLOR][/SIZE][SIZE=2] tbCurrent[/SIZE]
Thanks for any help
[/SIZE]
Last edited by a moderator: