
Jack Helfrich
Top achievements
Rank 1
Jack Helfrich
asked on 13 Feb 2015, 12:05 AM
I have a report with several check boxes. Many have a Yes and a No box, so one must be populated. I am using a SQL Server database and all of the fields that are related to the check boxes are data type bit. There is only one field in the database for each pair of check boxes, and the fields are all set to required, so there can never be a null value.
The desired behavior is, If the value is True, the Yes check box should be checked, and the No check box should be blank. If the value = False, the Yes check box should be blank and the No check box should be checked.
The current behavior is, if the value is False, both check boxes are blank. If the value is True, the Yes check box is checked, and the No check box has a dot in the middle.
It would be acceptable for both check boxes to be blank if the value is False. But it is not acceptable for the No checkbox to have a dot in the middle.
Here are the properties for the Yes check box:
All properties are the default values except:
Location and Size
Multiline - False
Text - Yes
Value - = Fields.TenPrint
Here are the properties for the No check box:
All properties are the default values except:
Location and Size
Multiline - False
Text - No
TrueValue - False
Value - = Fields.TenPrint
Is there a way to set the properties so I can get the desired behavior?
Thank you,
Jack
The desired behavior is, If the value is True, the Yes check box should be checked, and the No check box should be blank. If the value = False, the Yes check box should be blank and the No check box should be checked.
The current behavior is, if the value is False, both check boxes are blank. If the value is True, the Yes check box is checked, and the No check box has a dot in the middle.
It would be acceptable for both check boxes to be blank if the value is False. But it is not acceptable for the No checkbox to have a dot in the middle.
Here are the properties for the Yes check box:
All properties are the default values except:
Location and Size
Multiline - False
Text - Yes
Value - = Fields.TenPrint
Here are the properties for the No check box:
All properties are the default values except:
Location and Size
Multiline - False
Text - No
TrueValue - False
Value - = Fields.TenPrint
Is there a way to set the properties so I can get the desired behavior?
Thank you,
Jack
6 Answers, 1 is accepted
0
Hello Jack,
The Checkbox report item has three states: True, False and Indeterminate. Depending on the Checkbox.Value the Checkbox item will become in one of the above states and display a checked box, a blank box, or a dot in the middle.
In your case where you need to display two Checkbox items with the same Value, but in opposite states, it is required set the TrueValue/FalseValue/IndeterminateValue properties of the items:
YesCheckBox:
Value: = Fields.TenPrint
TrueValue: True
FalseValue: False
NoCheckBox:
Value: = Fields.TenPrint
TrueValue: False
FalseValue: True
For more information on the topic, please refer to the Checkbox help article.
Regards,
Nasko
Telerik
The Checkbox report item has three states: True, False and Indeterminate. Depending on the Checkbox.Value the Checkbox item will become in one of the above states and display a checked box, a blank box, or a dot in the middle.
In your case where you need to display two Checkbox items with the same Value, but in opposite states, it is required set the TrueValue/FalseValue/IndeterminateValue properties of the items:
YesCheckBox:
Value: = Fields.TenPrint
TrueValue: True
FalseValue: False
NoCheckBox:
Value: = Fields.TenPrint
TrueValue: False
FalseValue: True
For more information on the topic, please refer to the Checkbox help article.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Jack Helfrich
Top achievements
Rank 1
answered on 17 Feb 2015, 12:28 PM
Setting the values as you stated in your reply did not solve the problem. I still get a dot in the NO checkbox when the YES checkbox value is True. Is this a bug in Q3 2013?
Thank you,
Jack Helfrich
Thank you,
Jack Helfrich
0
Hello Jack,
This is not a bug in the specific version of Telerik Reporting.
When writing an expression in Telerik Reporting you need to start with an equal sign (=). In case you omit the equal sign at the start, the content of the Value property will be considered a string. Thus, you need to change the configuration as follows:
YesCheckBox:
Value: = Fields.TenPrint
TrueValue: = True
FalseValue: = False
NoCheckBox:
Value: = Fields.TenPrint
TrueValue: = False
FalseValue: = True
Attached you can find a sample report demonstrating the scenario. Note that the sample report contains a CsvDataSource which was introduced after Q3 2013, so you will need the latest version of Telerik Reporting in order to run the report.
Regards,
Nasko
Telerik
This is not a bug in the specific version of Telerik Reporting.
When writing an expression in Telerik Reporting you need to start with an equal sign (=). In case you omit the equal sign at the start, the content of the Value property will be considered a string. Thus, you need to change the configuration as follows:
YesCheckBox:
Value: = Fields.TenPrint
TrueValue: = True
FalseValue: = False
NoCheckBox:
Value: = Fields.TenPrint
TrueValue: = False
FalseValue: = True
Attached you can find a sample report demonstrating the scenario. Note that the sample report contains a CsvDataSource which was introduced after Q3 2013, so you will need the latest version of Telerik Reporting in order to run the report.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Jack Helfrich
Top achievements
Rank 1
answered on 17 Feb 2015, 01:06 PM
Setting the properties as you have defined in your reply did not work. The NO checkbox still has a dot in the middle when the YES checkbox value is true. Is this a bug in the Q3 2013 version?
Thank you,
Jack Helfrich
Thank you,
Jack Helfrich
0
Hello Jack,
We will need additional information in order to investigate why the behavior of the report is different on your end. It might be due to the fields data type or the configuration of the specific report. Thus, we kindly ask you to provide us with a runnable sample report exhibiting the problematic behavior. You can open a new support ticket, where you can zip and attach the requested sample.
Regards,
Nasko
Telerik
We will need additional information in order to investigate why the behavior of the report is different on your end. It might be due to the fields data type or the configuration of the specific report. Thus, we kindly ask you to provide us with a runnable sample report exhibiting the problematic behavior. You can open a new support ticket, where you can zip and attach the requested sample.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

Jack Helfrich
Top achievements
Rank 1
answered on 17 Feb 2015, 09:31 PM
I was finally able to get it to work. What I didn't realize was when you change the default value, you must precede the non-default value with =. For example, if the default value is True and you want change it to False, you must change it to "= False". A little confusing, but now that I know the rules, I can make it work.
Thank you,
Jack
Thank you,
Jack