问题描述
本周早些时候,我问了一个有关将参数传递到Crystal报表中的问题.我在跟进以下问题.
我有2个字段,例如以VB形式分配到销售总额.
我有一份水晶报告,根据2个字段的标准将打印某些信息.
我已经输入
分配给:艾伦·史密斯
成交总额:500
在我的Crystal报表上,有2个参数字段?Allocated
和?SalesTotal
.
我想要的是,使用2个字段的值自动填充Crystal Report参数字段.
如果我只是做一个参数,它将是这样,并且此代码有效
Hi,
Earlier this week I asked a question about passing parameters into a Crystal report. I am following up the question with the following.
I have 2 field e.g. Allocated To and Sales Total in a VB form.
I have a crystal report that depending on the criteria of the 2 fields prints certain information.
I have entered
Allocated To : Alan Smith
Sales Total : 500
On my crystal report has 2 parameters fields ?Allocated
and ?SalesTotal
.
What I want is that the crystal report parameter fields be automatically populated with the values of the 2 fields.
If I was just doing one parameter it would be like this and this code works
parParameterField.ParameterFieldName = "AllocatedTo"
parParameterValue.Value = "Alan Smith"
parParameterField.CurrentValues.Add(parParameterValue)
parParamFields.Add(parParameterField)
''Assign parameters
MycrRpt.SetParameterValue(parParameterField.ParameterFieldName, parParameterValue.Value)
问题,如何添加另一个参数,例如salestotal
Question, how do I add another parameter e.g. salestotal
推荐答案
这篇关于将多个参数传递给Crystal Reports的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!