1
私はラジオボタンリストを持っています。 ASPコード:rdlcレポートにNULL値を渡すブールパラメータ
Auditing: <asp:RadioButtonList ID="RBLAudit" runat="server" Font-Bold="true" RepeatDirection="Horizontal" RepeatLayout="Flow" TextAlign="Left">
<asp:ListItem Value="true" Text=" Audited" Selected="True"/>
<asp:ListItem Value="false" Text=" Not Audited "/>
<asp:ListItem Value="" Text="ALL"/>
</asp:RadioButtonList>
と私は怒鳴るようBooleanパラメータでRDLCレポートを持っている:
私は時に選択ラジオボタンリストのALLオプションをnull値を渡したいです。 ときRBLAudit.SelectedValue = ""
私は
If (RBLAudit.SelectedValue <> "") Then
p9 = New ReportParameter("State", RBLAudit.SelectedValue)
ElseIf (RBLAudit.SelectedValue = "") Then
p9 = New ReportParameter("State", DBNull.Value.ToString())
End If
Dim RepParams() As ReportParameter = {p1, p2, p3, p4, p5, p6, p7, p8, p9}
の後ろにこのコードを試してみたが、これは動作しません。エラーは"The value provided for the report parameter 'State' is not valid for its type."
どのようにこのブールパラメータにNULL値を渡すのですか?非常にしようと失敗した後、最終的にはそれが動作