将多个参数传递给Crystal Reports [英] Passing more than parameter into Crystal Reports

查看:54
本文介绍了将多个参数传递给Crystal Reports的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过VB.Net将多个参数传递给Crystal Report的最佳方法是什么.

目前,我可以传递1个参数,例如

What is the best way of passing more than 1 parameter via VB.Net to a Crystal Report.

At the moment I can pass 1 parameter e.g.

ParameterField.ParameterFieldName = "Country"
ParameterValue.Value = "England"
ParameterField.CurrentValues.Add(ParameterValue)
ParamFields.Add(ParameterField)



我想要的是上面加上说的资本,例如"London"

因此,进入Crystal Report的参数将为England & London

怎么做?


[Edited]代码包装在"pre"标签中[/Edited]



What I want is the above plus say Capital e.g. "London"

So the parameters going into the Crystal Report would be England & London

How is this done?


Code is wrapped in "pre" tags[/Edited]

推荐答案

Crystal Report可以这样做没有理由" t有多个参数.只需将另一个参数字段添加到报表中,然后将其放在所需的报表上,然后复制问题中包含的代码,并使用新参数的字段名称和值对其进行编辑以进行设置.如果那不是您遇到的麻烦,请更详细地说明引起问题的原因.
There is no reason why a Crystal Report can''t have more than one parameter. Just add another parameter field to the report and place it on the report where you want it, then copy the code you have in your question and edit it with the new parameter''s field name and value in order to set it. If that''s not what you are having trouble with, please be more specific about what is causing problems.


与Kschuler达成协议.

为什么不将值"England & London"发送到参数字段Country?

否则,请遵循他的想法.创建两个参数字段Country& City&发送值England& London到那些参数字段.在报表中,创建一个公式字段以连接这两个值&显示.

另一个想法是,您将基于这两个值(England & London)选择数据,因为您可以动态地构建selectionformula&您可以将其发送给报告.
Agree with Kschuler.

Why don''t you send the value "England & London" to the parameterfield Country?

Or otherwise go with his idea. Create two parameter fields Country & City & send the values England & London to those parameter fields. In report create a formula field to concatenate these two values & display.

And another thought is, you are going to select data based on these two values(England & London), for that you may build selectionformula dynamically & you can send it to report.
CrystalReportViewer.selectionFormula = "{Table.Country} = 'England'  Or {Table.City} = 'London'" 



如果仍然不清楚,请告知我们.



If still not clear, please let us know.


您好
请参阅此链接:

将多个参数传递给Crystal Reports [ ^ ]
Hi
refer this link :

Passing more than 1 parameter into Crystal Reports[^]


这篇关于将多个参数传递给Crystal Reports的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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