Vb.net 2008 Crystal Reports - Boolean parameter field issue

R

Rob W

Greetings,

Apologies posting this here but thought someone might use crystal reports as
the Microsoft public forum is
virtually empty.

Within my vb.net application I have viewed a crystal report and
programmatically added a sort selection based on the selection of ONE radio
button.

This selected all the database records (member details), then using a
checkbox I wanted a flag to determine if the member was deceased or not.

I created a parameter field as type Boolean and then added the following to
the record selection -> formula -> {Members.cDeceased} = {?paramDeceased}

When testing within the vb.net crystal report layout manager and using the
preview it ONLY retrieves rows when the parameter value is FALSE.

If I remove the selection formula i.e. the where clause ALL rows are
retrieved where deceased is TRUE and FALSE.

Note: I did notice when showing SQL query the Boolean values are 0 and 1
whereas if I displayed the integer value of the checkbox in my vb.net
application it is 0 and -1.

Why can't I retrieve records when the value of deceased is TRUE as 100%
positive records exists (as per test above and viewing the data)?

Thanks

Rob
 
R

Rob W

What I find odd is if I change the selection formula to {Members.cDeceased}
= FALSE it retrieves rows, if I set it to {Members.cDeceased} <> FALSE it
retrieves rows but not if I set it to {Members.cDeceased} = TRUE ....
hmmm... confused.com
 
R

Rob W

So confused, tried everything.

The access database I connect to has a yes/no field for the deceased column.
Upon querying in Access where deceased = true it retrieves the row.

I can see in Crystal reports the values printed i.e. true or false when
there is no selection criteria, and ONLY the false ones when changing the
criteria to {Members.deceased} = false when I do {Members.cDeceased} = True
... NOTHING, no rows ...

Arghhh they exist I can see them on the report, with the value true.

Even tried creating a new report, again same issue.

I've even on trial and error had it display just true results but when I
refresh or run again its goes blank again, no rows found.

All of this is through the crystal report layout manager and NOT through
vb.net code.

Slowly going insane ...............
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top