Saturday, February 25, 2012

Need help, crystal 8.5 trying to open diferent DSN...

Hi...

I have an application in VB6 and CR8.5 with MSSQL, this app is multi-company, means that have to open 1 or more MSSQL databases, opening the first DSN (ODBC) is ok (opening directly is another headache), but when I try to open a diferent DSN to open another DB by code I get the message "Server has not yet been opened".

Note that I am using Crystal Designer and Viewer control, it seems that the crystal is only opening the DSN that is set by default in designer window... I dont know what am I doing wrong...

Thanks in advance

PD1: sorry my english is not good at all...

PD2: This is the code to open report:
--- CODE ----
Dim m_Report As New tax_rpt_anulados 'set original report to variable

m_Report.Database.LogOnServer "pdsodbc.dll", "DSNname","DBname", "username", "password"
m_Report.RecordSelectionFormula = "{tax_anulados.tipoComprobante}=1"
m_Report.ReportTitle = "Title of report"
CRViewer1.ReportSource = m_Report
CRViewer1.ViewReportHi again guys, dont worry about this question I already solved...

Thanks anyway...

No comments:

Post a Comment