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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OCX & ODBC: setting the DSN for SubReports ??

Status
Not open for further replies.

stem

Programmer
Apr 14, 2000
15
GB
I have 2 (Progress) databases: Live and Test. I set different DSN's at runtime depending on the database the report is called from. This works perfectly for Main Reports.<br><br>I have tried to find a way to set the DSN for my Subreports at runtime, without success. Is it possible??<br><br>Thanx
 
I am using oracle 8.0 as a back end & visual basic as a front end. while giving<br>crystalreport1.connect = &quot;dsn;uid;pwd;dsq&quot;<br>it gives me an error saying that<br>unable to connect : incorrect logon parameter<br><br>i am using crystal report 4.6<br>please give the solution for both.<br>by odbc & by dsn;uid.....<br><br>pl. help me if possible<br><br>from<br>pankaj<br><A HREF="mailto:pankaj_cash@hotmail.com">pankaj_cash@hotmail.com</A><br><br><br><br>
 
The principle is that the ODBC source MUST exist. <br><br>Once you have set this source up and connected to it successfully, you can use the OCX &quot;connect&quot; property at runtime to connect to the correct ODBC source.<br><br>Now lets look at your error: If you have the ODBC source working and still get this error, I suggest looking closely at the syntax:<br><br>Usage<br>[form.]Report.Connect[= DataSourceName;UserID;Password;DatabaseQualifier$]<br><br>For example:<br>CrystalReport1.Connect = “DSN = Accounting;UID = 734;PWD = bigboard;DSQ = Administration”<br><br>Essentially you are passing a text string to the OCX control. Make sure that all the parameters are correct and your problems will be history :)<br><br>I do not know if it works in Crystal 4.6 , but I know it works in 6.x and up. If anyone knows the versions that has support for OCX please add your knowledge :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top