How to treat a bit field as a boolean ?
15 August, 2012
Hi,
I have a report for which I would like to display a simple radio button (Y/N) for an input field.
My understanding from examples I have seen on the forum is that this is easily done for boolean data types by changing the entry style on the relevant filter.
Problem I have is that MS SQL Server doesn't have a boolean data type and uses a bit field instead. YF is recognizing the bit field as a numeric on the view level and doesn't seem to be a way to change that.
So is there a way to get the boolean functionality for the bit field ?
Maybe a custom java function ?
Using YF 6.1 20120726.
Thanks
Robin
I have a report for which I would like to display a simple radio button (Y/N) for an input field.
My understanding from examples I have seen on the forum is that this is easily done for boolean data types by changing the entry style on the relevant filter.
Problem I have is that MS SQL Server doesn't have a boolean data type and uses a bit field instead. YF is recognizing the bit field as a numeric on the view level and doesn't seem to be a way to change that.
So is there a way to get the boolean functionality for the bit field ?
Maybe a custom java function ?
Using YF 6.1 20120726.
Thanks
Robin
Hi Robin,
we've tested that YF build with the SQL Server Bit type and it worked fine, i.e. was recognised as a boolean type at the view level, so this seems to be a bit of a mystery to us at the moment.
Did you perhaps at some stage change that field, for example, did you remove it and then put it back?
Regards,
David
we've tested that YF build with the SQL Server Bit type and it worked fine, i.e. was recognised as a boolean type at the view level, so this seems to be a bit of a mystery to us at the moment.
Did you perhaps at some stage change that field, for example, did you remove it and then put it back?
Regards,
David
Hi David,
Yes I probably did - and changed the data type a few times on the database trying different things.
Is there a way to "reset" ? Or should I just recreate the view ?
cheers
Robin
Yes I probably did - and changed the data type a few times on the database trying different things.
Is there a way to "reset" ? Or should I just recreate the view ?
cheers
Robin
Hi Robin,
The way to reset it would be to remove that field from the view, save the view, then add the field back to the view and save it again. However, if that field is used in reports (which I imagine it would be) then of course you'd also have to temporarily remove it from the reports as well, and then add it back again later.
Please let me know how this goes, and if there are any further questions on this please don't hesitate to contact us.
Regards,
David
The way to reset it would be to remove that field from the view, save the view, then add the field back to the view and save it again. However, if that field is used in reports (which I imagine it would be) then of course you'd also have to temporarily remove it from the reports as well, and then add it back again later.
Please let me know how this goes, and if there are any further questions on this please don't hesitate to contact us.
Regards,
David