Click to See Complete Forum and Search --> : Getting Started


heavyg
June 10th, 2005, 12:57 PM
Having read through the 39 pages of the top post i am now a lot wiser than before.... but still i am stuck.

Using the code below modifed from a section in the stickied, i still get a logon error saying the password is incorrect. Having "watched" the variables it seem the password is not getting passed into the connection string.

I know this will be a "DOH!" when i see the soloution but could someone please point out my stupidity.

Thanks.


Dim crrpt As New CRAXDRT.report
Dim crapp As New CRAXDRT.Application

Set crrpt = crapp.OpenReport("d:\ContractDB\SQL\All Support Contracts.rpt")
crapp.LogOnServer "PDSODBC.DLL", "contracts", "contractsdb", "contract"


'crrpt.RecordSelectionFormula = "{quequotation.QuotationNo} = " & 58
crrpt.ExportOptions.ApplicationFileName = "C:\test.pdf"
crrpt.ExportOptions.DestinationType = crEDTApplication
crrpt.ExportOptions.DiskFileName = "C:\test.pdf"
crrpt.ExportOptions.PDFExportAllPages = True
crrpt.ExportOptions.FormatType = crEFTPortableDocFormat
crrpt.Export False

'Remarked Viewer Report Output
CRViewer1.ReportSource = crrpt
CRViewer1.ViewReport