问题描述
我正在尝试学习如何使用Crystal Reports,并且已经在报表中设置了一个参数以允许多个值.效果很好,除了它在我运行报表时提示用户输入一个或多个值.我真正想要的是默认操作是所有值都在没有用户提示的情况下显示.如果他想过滤到一个子集,那么他可以.我进行了搜索,但似乎找不到任何地方的方法.
预先感谢您的任何建议,
普雷斯顿
Hi,
I am trying to learn how to use Crystal Reports and I have set up a parameter in my report to allow multiple values. This works well except that it prompts the user to enter a value or values when I run the report. What I would really like is for the default action to be all values are displayed with no user prompt. If he wants to filter to a subset then he can. I have searched but can not seem to find how to do this anywhere.
Thanks in advance for any advice,
Preston
Surely there is a way to programatically set the value of the multi-parameter to all?
推荐答案
if HasValue({?parm}) Then
if {?parm} = "*" Then
True
else
{?parm} = {Table.FieldEquatedToParm}
else
True
这将允许报表出现并显示所有值,而不会提示用户输入值.然后,如果用户决定要过滤报告,则可以使用参数面板选择过滤值.如果增加可过滤列的数量,该公式就会令人讨厌.
This will allow the report to come and display all the values without prompting the user to enter a value. Then if the user decides they want to filter the report they can use the parameter panel to choose a filter value. The formula get kind of nasty if increase the number of filterable columns though.
这篇关于如何设置VS2010 Crystal Reports多重值以编程方式显示所有值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!