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!

Logon Failed, Details:Cannot find DSN in connection strings

Status
Not open for further replies.

hahsia

Programmer
May 15, 2003
88
SG
Hi,

I got the above error message when i attempt to run my report from accpac desktop.
In fact, when i try running it from macro, i got the "report error occured" message.

In my report i'm calling from a view, do you think thats the problem which i doubt so coz i can run the report in CR9 with no errors.
I'm using Accpac 5.3a.
Could somebody help.
Thanks

 
You can't use views in Accpac desktop reports.

Jay Converse
IT Director
Systemlink, Inc.
 
Hi,

Is there anyway in accpac that could allow me to use sql views in my report?

In fact, i have a similar report in AAS 5.2a that uses view but i cant seem to do the same in AAS 5.3a?

Please Advice.
Thanks.
 
With a VB program or VBA macro, you can use native Crystal report objects, like this:

Dim CrystalReport As New CRPEAuto.report
Dim rptView As CRPEAuto.View
Dim Params As CRPEAuto.ParameterFieldDefinitions

Set report = CreateObject("Crystal.CRPE.Application")
Set CrystalReport = report.OpenReport("t:\custom\myreport.rpt")


Jay Converse
IT Director
Systemlink, Inc.
 
Hi Jay,

Thanks for the advice but do you have some sample codes to do this.
Thanks In Advance.
 
Hi,

I'm still stuck here but with some progress.
I have added the follwing code in my Macro to run my sql view report.

Sub RunCR_REport()

Const RPT = "C:\ACCPAC\OE53A\ENG\OEQUOTE-10.RPT"
Dim crwApplication As CRPEAuto.Application
Dim crwReport As CRPEAuto.Report
Dim CrRepWindow As CRPEAuto.Window
Dim coname As String
Dim FRQ As String
Dim TOQ As String

coname = "XXXXXXXXXX"
FRQ = "A001-210705-HAH"
TOQ = "A001-210705-HAH"

If crwApplication Is Nothing Then
Set crwApplication = CreateObject("Crystal.CRPE.Application", "ACCPAC-53")
End If

If coname <> "" Then
Set crwReport = crwApplication.OpenReport(RPT)
crwReport.ParameterFields(1).SetCurrentValue (coname)
crwReport.ParameterFields(2).SetCurrentValue (FRQUOTE)
crwReport.ParameterFields(3).SetCurrentValue (TOQUOTE)
crwReport.Preview "Print Quotation", 0, 0, 450, 450, 0, 0
'Set CrRepWindow = crwReport.Parent

End If
Set crwReport = Nothing


But the problem is when i debuf the code, i could actually see the crystal report appearing on my screen & soon after it close as the next line is executed.

Any idea?
Thanks

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top