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

Print Crystal Report via Accpac Report - Not Responding

Status
Not open for further replies.

Boris10

IS-IT--Management
Jan 26, 2012
97
KE
Hi everyone, I am wondering if anyone has experienced this issue before. I am using the following code print a custom Crystal Report. The problem is from time to time, running the report ends up in a Not Responding State:
Code:
On Error GoTo ACCPACErrorHandler

Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)

Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)

Dim rpt As AccpacCOMAPI.AccpacReport
Set rpt = ReportSelect(reportPath, "      ", "      ")
Dim rptPrintSetup As AccpacCOMAPI.AccpacPrintSetup
Set rptPrintSetup = GetPrintSetup("      ", "      ")
If rptPrintSetup.Destination = PD_PRINTER Then
    rptPrintSetup.query (0)
End If

rpt.PrinterSetup rptPrintSetup

rpt.SetParam "@SELECTION_CRITERIA", val
rpt.NumOfCopies = 1

rpt.PrintDir = ""
rpt.PrintReport

Set mDBLinkCmpRW = Nothing
Set mDBLinkSysRW = Nothing
Set rpt = Nothing
Set rptPrintSetup = Nothing

So basically most of the time the report is printed but sometimes it freezes in a Non Responding State.

Would anyone have an idea?
 
Also I have just noticed that sometimes the report opens but its completely blank with nothing visible except for the "Cancel" Button
 
Is it a complex report? Something that requires a lot of data processing? Check the server task manager utilisation.
 
BTW you don't need a link to the system database, so you can drop:

Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)

Set mDBLinkSysRW = Nothing
 
Hi Ettienne, hi Tuba. Its a simple report that pulls data from 25 Column Table with about 5000 Rows. The report simply pulls all the data and filters it based on an ID number to display A Single Record.

There are no sub-reports, no complex formulas no diagrams or any other objects.

I checked the Task Manager on the server (I am not a Guru on CPU performance and networking) but it looks consistent.
The CPU is between 0 to 10% constantly and RAM at a constant 6GB (out of 15GB).

I am wondering if it can be the actual workstation having a problem to load the report and not the server?

Will try to remove the DBlinks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top