简体   繁体   English

Crystal Reports中的图像

[英]Images in Crystal Reports

I am working on Windows Forms Projects. 我正在Windows窗体项目上工作。

I am creating a report for customers. 我正在为客户创建报告。 The report data is pulled from a "CustomerDetails" table. 报告数据是从“ CustomerDetails”表中提取的。

A field in the table is called "CustPhotoName", this holds a string which relates to an image file. 表中的字段称为“ CustPhotoName”,其中包含与图像文件有关的字符串。

I Currently have a report set up which runs for a single customer by passing in a customer ID. 我目前已经建立了一个报告,该报告通过传递客户ID为单个客户运行。 Then using the passed in ID to populate a Dataset with an ImageRow and then a sub report with the image from the dataset. 然后使用传入的ID填充ImageRow的数据集,然后使用数据集中的图像填充子报表。

I am wanting to set up this report where I can pass in an array of customer IDs and produce the reports (1 page per customer with image (if CustPhotoName has value)) 我想设置此报告,以便在其中传递客户ID数组并生成报告(每个客户带图像的页面1个(如果CustPhotoName具有值))

Please can someone let me know how is the best way to do this for the multiple customers. 请有人让我知道对多个客户这样做的最佳方法是什么。

Add a CustomerID parameter to the report. 在报告中添加一个CustomerID参数。 Type Number. 类型编号。 Set it to allow multiple values. 设置它以允许多个值。 In the report's record-selection formula, add the following: 在报告的记录选择公式中,添加以下内容:

AND {table.customer_id} IN {?CustomerID} AND {table.customer_id} IN {?CustomerID}

You probably want to group the report by {CustomerID} as well. 您可能还希望按{CustomerID}对报告进行分组。 In the group's footer, select Section Expert and check New Page After. 在组的页脚中,选择“ Section Expert”,然后选中“ New Page After”。 This way each customer will start on a new page. 这样,每个客户都将在新页面上开始。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM