[已解决]缺少参数字段当前值... [英] [RESOLVED] Missing Parameter Field Current Value...

查看:363
本文介绍了[已解决]缺少参数字段当前值...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在为子报告中的参数提供一个值,但仍显示以下错误信息:

     I am supplying a value to a parameter inside a subreport and still shows this error message below:

描述: 执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息: CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException:缺少参数字段当前值。

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: CrystalDecisions.CrystalReports.Engine.ParameterFieldCurrentValueException: Missing parameter field current value.

我有写了我用来用参数填充参数的代码。 TestReport是主要水晶报告。谢谢。

I have written the codes I used to fill the parameter with value. TestReport is Main Crystal Report. Thanks.

[code]

私人 reportDoc As TestReport()

Dim 子报告 As ReportDocument = reportDoc.OpenSubreport("Sample")

Dim subreport As ReportDocument = reportDoc.OpenSubreport("Sample")

Dim stDate As String = 字符串 .Format("{0} / {1} / {2}", Me .dddFrom.Month, Me .dddFrom.Day, Me .dddFrom.Year)

Dim stDate As String = String.Format("{0}/{1}/{2}", Me.dddFrom.Month, Me.dddFrom.Day, Me.dddFrom.Year)

Dim parField As ParameterFieldDefinition = subreport.DataDefinition.ParameterFields.Item("StartDate")

Dim parField As ParameterFieldDefinition = subreport.DataDefinition.ParameterFields.Item("StartDate")

Dim parValues As ParameterValues = parField.CurrentValues

Dim parValues As ParameterValues = parField.CurrentValues

Dim disValue As New ParameterDiscreteValue()

Dim disValue As New ParameterDiscreteValue()

disValue.Value = stDate

disValue.Value = stDate

parValues.Add(disValue)

parValues.Add(disValue)

parField。 ApplyCurrentValues(parValues)

parField.ApplyCurrentValues(parValues)

Me .crvReport.ReportSource = report

Me.crvReport.ReportSource = report

[\代码]

den2005

推荐答案

此问题已得到解决。

This problem has been resolved.

den2005


这篇关于[已解决]缺少参数字段当前值...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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