By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 884 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

How can we display Yes/No or True/False instead of -1 / 0 in datareport in vb?

dnb
P: 34
In VB When we store boolean value(True/False) in database then in datareport it displays -1 / 0 in report. How can we display Yes/No or True/False instead of -1 / 0. Please help me....Thanx In Advance...
Jan 4 '08 #1
Share this Question
Share on Google+
2 Replies


QVeen72
Expert 100+
P: 1,445
In VB When we store boolean value(True/False) in database then in datareport it displays -1 / 0 in report. How can we display Yes/No or True/False instead of -1 / 0. Please help me....Thanx In Advance...
Hi,

Change the Query (CommandText) of the Command Object on which the dataReport is Based. Something like this:

Expand|Select|Wrap|Line Numbers
  1. Select Field1,Field2,  IIF(MyBlField = 0, 'No', 'Yes') AS MyFlag From MyTable
  2.  
Regards
Veena
Jan 4 '08 #2

dnb
P: 34
dnb
Thanx to QVeen72.....It Works......

Hi,

Change the Query (CommandText) of the Command Object on which the dataReport is Based. Something like this:

Expand|Select|Wrap|Line Numbers
  1. Select Field1,Field2,  IIF(MyBlField = 0, 'No', 'Yes') AS MyFlag From MyTable
  2.  
Regards
Veena
Jan 4 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.