ChubbyArse
Programmer
Hi all,
I'm having trouble setting a boolean parameter in a crystal report which I'm calling from a VB.net windows Form application.
The parameter is called ShowScrappedOnly and is set to a boolean.
This is the code that I try to set the value with:
chkScrappedOnly.Checked is a checkbox on a form and evaluates to True or False.
When the report is run the parameter dialog box comes up asking for the parameter I've just set. However, if I spell the parameter name wrongly it gives an error of "Invalid Field Name"
I include this line to check the value of the parameter:
and it gives me 1.
It's obvious that the report is not getting the value that I set, as the dialog is popping up, but on the flip-side if I set the parameter with the wrong name it complains???
Any ideas on this anyone?
I'm having trouble setting a boolean parameter in a crystal report which I'm calling from a VB.net windows Form application.
The parameter is called ShowScrappedOnly and is set to a boolean.
This is the code that I try to set the value with:
Code:
rptReport.ReportDocument.SetParameterValue("ShowScrappedOnly", chkScrappedOnly.Checked)
chkScrappedOnly.Checked is a checkbox on a form and evaluates to True or False.
When the report is run the parameter dialog box comes up asking for the parameter I've just set. However, if I spell the parameter name wrongly it gives an error of "Invalid Field Name"
I include this line to check the value of the parameter:
Code:
rptReport.ReportDocument.DataDefinition.ParameterFields("ShowScrappedOnly").CurrentValues.Count
It's obvious that the report is not getting the value that I set, as the dialog is popping up, but on the flip-side if I set the parameter with the wrong name it complains???
Any ideas on this anyone?