CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: XtraReports

  1. #1
    Join Date
    Jan 2010

    Question XtraReports

    Haii. I have a lot of Y & N (yes & no) fields in an Mysql database. They are basically boolean but are stored as varchar 'Y' or 'N'. I want to display checkboxes which are checked while the database value is 'Y' and to unchecked while database field value is 'N'Whats the best way to bind a XRCheckBox to do these?How i can do it?please help me...

  2. #2
    Join Date
    Sep 2008

    Re: XtraReports

    If it is possible, I would change de DB column to BIT instead of VARCHAR.

    If not, you could create a property that returns a boolean instead of a string. Something like
    private string _MyField; //store the DB value in this field
    public bool MyField{
        return _MyField == "Y";
        _MyField = (value ? "Y" : "N");
    Bind this property to the checkbox

  3. #3
    Join Date
    Mar 2004
    Prague, Czech Republic, EU

    Re: XtraReports

    Or, if you have binded the check box to a table in dataset, add fake counted (expression property, I think) column to the table based on rule mentioned by dannystommen and bind the check-box to it.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!

HTML5 Development Center