Hi,

I am trying to build crystal reports into an access database using crystal reports control ocx.

I tried a DSN-Less connection method but it brought back an error (Cannot open SQL Server)

I have been searching this for days now and not getting anywhere please can someone help me.

This is my code

CrystalReport.ReportFileName = "ReportName"
CrystalReport.Connect = "DSN=DSNNAME;" (I want to use dsn-less to open access mdb file)

CrystalReport.DiscardSavedData = True
CrystalReport.SelectionFormula = "{Qry_StaffUserDefined.Client_ID} Like " & Chr(34) & Form_frm_Reports.Client_ID.Value & Chr(34) _
& " and {Qry_StaffUserDefined.Location} Like " & Chr(34) & Form_frm_Reports.Location.Value & Chr(34) _
& " and {Qry_StaffUserDefined.Location} Like " & Chr(34) & Form_frm_Reports.Roster_Name.Value & Chr(34)

CrystalReport.Action = 1