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!

ACCPAC not sending Crystal Parameters?

Status
Not open for further replies.

ringbearer

Programmer
Dec 29, 2004
3
US
I am opening a Crystal Report (v10) from Advantage series (5.3) using an ACCPAC Macro. When I try to set a parameter, it doesn't seem to work (I am still prompted for the parameter value). My code is listed below:-

Code:
Dim rpt As AccpacCOMAPI.AccpacReport
Set rpt = ReportSelect(REPPATH & "\WORKORDER.rpt", "", "")
rpt.SetParam "WONUMBER", "ORDERNUM001"
rpt.NumOfCopies = 1
rpt.Destination = PD_PREVIEW
rpt.PrintReport
[/color blue]

If I enter a value for the parameter, it opens & runs just fine.

Can anyone help me???
 
Put the parameters into xxRPT.INI, and rename your report to comply with the xx naming convention, i.e., PORPT.INT, POMYRPT.RPT.

Jay Converse
IT Director
Systemlink, Inc.
 
I have renamed the report to OEWORKORDER and added the following entry to the OERPT.INI


[OEWORKORDER]
crystal=OEWORKORDER
optparams=1
2=WONUMBER STRING
[/color blue]

I am still being prompted for the parameter value. Could it be because I am using AccpacReport in my code instead of an xAPIreport? I tried using an xAPIReport but I couldn't connect to the session.
 
Everything you're showing looks correct. Inside the Crystal report, is the parameter "WONUMBER" capitalized, and a string? Also, you should add the parameter CMPNAME, which Accpac automatically sends to every report. I suspect your problem is that you only have one parameter in the report.

Jay Converse
IT Director
Systemlink, Inc.
 
I checked all my parameters & settings etc and it now works great. Thanks a lot for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top