将数据库字段绑定到报表中的字段 [英] Bind Database Fields to fields in report

查看:87
本文介绍了将数据库字段绑定到报表中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个WindowsApplication用户输入客户信息。当用户单击按钮SAVE时,信息存储在Sql Server 2000上的一个名为Customers的表中。

I got a WindowsApplication where users enter Customer Information. When the user Clicks the button SAVE, the information is stored in a Table Called Customers on a Sql Server 2000.

存储记录后,将自动打印报告。

After the record is stored, automatically a report is printed.

我的问题是:

如何将客户名称放在标准报告上。

How can I put the name of the customer on the standard report.

例如,如果客户名是"JAN",然后报告必须在报告上打印名称JAN,如果名称是"PETE",则报告名称为"PETE"。那么它必须打印名称PETE。因此,输入和存储的名称必须在打印的报告上。

For Example, if the customername is "JAN" then the report must print the name JAN on the report and if the name is "PETE" then it must print the name PETE. So the name that is entered and stored must be on the printed Report.

我该怎么做?

Greetz Miles

Greetz Miles

推荐答案

首先,您将创建一个与SQL服务器连接的报告。

First you would create the report with a connection to your SQL server.

其次,您将在报告中添加所需的数据库字段。

Second you would add the database fields you want on the report.

第三,您将创建一个参数,该参数将接收您刚刚添加到数据库的客户名称。

Third you would create a Parameter that would take in the customer name that you just added to the database.

第四,你会调出记录选择公式,让它只带回你创建的客户名称=参数的记录。

Fourth you would bring up the record selection formula and have it only bring back records where the Customer Name = Parameter you created.


这篇关于将数据库字段绑定到报表中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆