简体   繁体   English

如何使用SQL命令数据库专家在Crystal报表中传递参数

[英]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 我想通过选择〜到的日期来生成报告,并将这些值传递给查询末尾写的变量x和y

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 喜欢

像这样并尝试保存

But it gives me the error 但这给了我错误

saying

请帮忙谢谢

See that "Parameter List" box that is empty to the right of your SQL Command? 看到您的SQL命令右边的“参数列表”框是空的吗? You want to create your parameters there. 您要在此处创建参数。 Also, when you reference them you want to use curly brackets to do it: {?x} 另外,引用它们时,您想使用大括号: {?x}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Database Expert中的SQL命令以编程方式在报表中更改Crystal Reports数据源位置? - How to change a Crystal Reports datasource location programmatically in a report using SQL command from Database Expert? 使用本地数据库的水晶报表 - Crystal Report using local database 使用可空字段从数据库专家(ASP.NET)到Crystal Report - Use nullable field to Crystal Report from database expert (ASP.NET) 如何将数据库绑定到水晶报表? - how to bind database to crystal report? 如何通过Crystal Report中“ Group Sort Expert”对话框中的表单从文本框中发送值 - How to send values from text box through form in “Group Sort Expert”dailogue in crystal report 如何使用数据集中的2个SQL请求和2个数据表在Crystal Report中显示数据? - How to display data in crystal report using 2 sql request and 2 datatables in dataset? 如何使用LINQ to SQL查看Crystal Report上的数据 - How to view data on crystal report using LINQ to SQL 如何将参数传递给Crystal Report for Visual Studio 2010? 看起来他们被忽略了 - How to pass parameters to Crystal Report for Visual Studio 2010? Looks like they are ignored 从C#将参数传递给Crystal Report的最简单方法? - Easiest way to pass parameters to Crystal Report from C#? 如何将多个数据传递给Crystal Report参数 - How to pass multiple data to crystal report parameter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM