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

MS Access Query with parameters problem

Status
Not open for further replies.

RWWAMS

Technical User
Jan 3, 2003
104
0
0
US
Is it possible to use a Crystal Report 8.5 against an Access 2000 query with multiple parameters?

When I run the query in Access it works fine. I have set the query as the report data source. When the report is run in Crystal, I enter the parameters, and then an error message is received:
Crystal Reports: Database Error
Too few parameters. Expected 2.

I have searched though old threads. I'm aware that there was, at one time, a problem with Crystal working with Access Queries with parameters. I'm hoping it's been resolved.

As an alternative, the parameters can be left on the crystal side. This is not desirable because I believe it will negatively impact report performance.

Any help will be greatly appreciated.

Regards,
Rich
 
Sounds like one of your parameters is expecting a beginning and ending range

Without more technical info (i.e. parameter details), it's hard to determine exactly what is causing the problem.
 
As the report is now, (in crystal) there are two date/time parameters. Both have 'discrete value' specified.

For the Access Query, here is the select statement:

PARAMETERS START DateTime, [END] DateTime;

SELECT
CALLS.IDX, CALLS.CALL_DATE, CALLS.CLIENT_NAME,
CALLS.SSN, CALLS.TASK_ASSIGNED_TO, CALLS.CALL_TAKEN_BY,
CALLS.SUBJECT, CALLS.STATUS, CALLS.NOTES,
PRIORITIES.PRIORITY,
CONTACTS.COMPANY_NAME
FROM
CONTACTS INNER JOIN (CALLS INNER JOIN PRIORITIES ON
CALLS.PRIORITY = PRIORITIES.PRIORITY_NUM) ON
CONTACTS.CLIENT_NAME = CALLS.CLIENT_NAME
WHERE
CALLS.CALL_DATE >= START AND CALLS.CALL_DATE <= END
;

Any ideas?
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top