Showing posts with label filtered. Show all posts
Showing posts with label filtered. Show all posts

Friday, February 24, 2012

List Filtering NOT Working

I have a Report where i want to show in a DataList only those values Filtered by one of the fields of my dataset. I want to show a Date value ONLY if another column value in that row in my dataset = "IN".

But nothing seems to happen here. No records are shown. It's like the condition is never true.

Steps:

1. I drag a DataList

2. I drag a DatasetField inside the DataList (automatically creates a textbox)

3. Right Click on the Datalist, Properties, then Filter Tab

I use the following statement on the Filter tab

=Cstr(Fields!TransactionType.Value) Like "IN"

or

=Cstr(Fields!TransactionType.Value) = "IN"

it doesnt work at all.

Does anyone knows what's going on?

Thanks

Jose

I've noticed that in filtering sometimes, in fact in most cases, I have to explicitly cast each side to the correct data type. So in your case

Expression: Operator: Value:

=Cstr(Fields!TransactionType.Value) = = Cstr("IN")

Hope this helps.

|||

PERFECTLY FINE

THANK YOU

list box is not displaying

I have a list box getting a filtered recordset from a stored procedure using ADO calling in VB6.
The recordset returns the two records with correct values. The problem is it is not displaying in the list box. Why? I tried using .additem property but it is not available in Access 2000. Can anyone help me with this?

Function ..
Dim rs_get_defect_desc As New ADODB.Recordset, lot_n as integer
Set lot_n = 4051

Rs_get_defect_desc.Open "EXEC spGet_desc_defect @.lot_n=" & lot_n, CurrentProject.Connection
Do While Not rs_get_defect_desc.EOF

lstbox.RowSource = rs_get_defect_desc(0) & " " & rs_get_defect_desc(1)
rs_get_defect_desc.MoveNext

LoopI am confused, - is it VB6 or Access?