Crystal Report:如何将参数项列表作为组使用? [英] Crystal Report: How can I use a list of parameter items as a group?

查看:77
本文介绍了Crystal Report:如何将参数项列表作为组使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Crystal Report。

I have a Crystal Report.

对于在参数中输入的多个项目(我相信它会成为字符串数组),我希望它按这些值进行分组,然后运行多个子报表

For multiple items entered into a parameter (which I believe becomes a string array), I would like it to group by those values and then run a number of sub-reports for each group item.

对于作为参数一部分输入的项目(允许多个项目) ,将这些项目作为一个组使用,这样我就可以看到这些项目的多个子报告(包括是否无法找到给定项目的数据)。

For items entered as part of a parameter (which allows multiple items), use those items as a group so that I can see multiple sub-reports for those items (including if no data can be found for a given item).

,所需的过程是:


  • 用户运行报告

  • 提示用户输入一个或更多项目编号进入ItemNumbers参数

  • ItemNumbers参数用于创建分组

  • 分组为每个组运行多个子报告(大概在分组页脚)

  • 用户会看到每个项目组下每个子报表的结果(或非结果)。

  • User runs the report
  • User is prompted to enter one or more item numbers into the ItemNumbers parameter
  • The ItemNumbers parameter is used to create groupings
  • The groupings run several sub-reports for each group (presumably in the group footer)
  • The users see the results (or non-results) for each of the subreports under each item group.

  • 试图将参数用作分组。这是不可能的,因为它没有显示在我可以选择的分组列表中。

  • 试图使用公式来保存参数的值。这是不可能的,因为公式不能生成数组。

  • 试图创建一个StringArray变量来保存参数条目,但是由于它也必须在选择公式中引用,因此公式可以

推荐答案

您无法对参数字段进行分组。您将需要使用它来过滤记录集,然后对它的(记​​录集)字段之一进行分组。

You can't group on a parameter field. You will need to use it to filter your recordset, then group on one of its (recordset's) fields.

**编辑**

我将创建多个查询,将各个交易表与主表(LEFT OUTER JOIN)进行比较,然后对这些查询进行UNION。使用此查询作为Command对象的源来创建报告。

I would create a number of queries that compare the individual transaction tables to the 'main' table (LEFT OUTER JOIN), then UNION these queries. Create a report, using this query as the source of a Command object.

这篇关于Crystal Report:如何将参数项列表作为组使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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