Major
Major

Reputation: 75

How to pass parameters in crystal report using SQL command database Expert

I want to generate report by selecting the date from ~ To and want to pass those value to variable x and y written at the end of the query

SELECT accounts.invoice, tempClient.name, tempClient.businessName,
tempClient.contactNumber,accounts.total, accounts.remaining
FROM accounts
INNER JOIN tempClient
ON accounts.clientCode = tempClient.id where accounts.[dateTime] between ?x and ?y

Like

Like This and try to save

But it gives me the error

saying

Please Help Thanks

Upvotes: 1

Views: 3783

Answers (1)

Ryan
Ryan

Reputation: 7287

See that "Parameter List" box that is empty to the right of your SQL Command? You want to create your parameters there. Also, when you reference them you want to use curly brackets to do it: {?x}

Upvotes: 2

Related Questions