Click here to Skip to main content
15,883,940 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,

I working in Rdlc reports fine successfully running.

when I binding data some of customers have no city and some of customers have value.

my intention is if value is there than no problem otherwise hide the row.

ex: no address
-- -------
1 address1 //
//hide this row
city
country

2 address1
address2
city
country

print like this 1 address1
city
country

2 address1
address2
city
country
Posted

1 solution

This Solution Will Help you to resolve your problem
VB
For i As Integer = dt.Rows.Count - 1 To 0 Step -1
    Dim row As DataRow = dt.Rows(i)
    If row.Item(0) Is Nothing Then
       dt.Rows.Remove(row)
    ElseIf row.Item(0).ToString = "" Then
       dt.Rows.Remove(row)
    End If
Next


for RDLC You Can Use The Belowing Method..


In the Classic client, on the Tools menu, click Object Designer.
In Object Designer, click Report, select the report that you want to modify, and then click Design.
On the View menu, click Layout.
In Visual Studio, in the Report.rdlc file, select the control or table row that you want to show conditionally.
On the View menu, click Properties Window.
In the Properties window, expand Visibility.
Under Visibility, in the Hidden field, select <Expression…> from the drop-down list.
In the Edit Expression window, enter the conditional statement for when the control or row is hidden, and then click OK.
The following illustration shows an example of a conditional visibility expression on report 2, General Journal - Test, in the standard application.


For more help you can check here http://msdn.microsoft.com/en-us/library/dd354976.aspx[^]
 
Share this answer
 
v4
Comments
U@007 28-Mar-13 9:18am    
Hi rakesh
this is rdlc reports so I need to write .rdlc reports textbox expression.
U@007 28-Mar-13 9:43am    
Hi rakesh
Invs2010=>rdlc=>textbox=>propeties=>select show or hidden choice=>writing expression

=IIF(Fields!EmpNo.Value="",False,True)

but not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900