Click here to Skip to main content
16,021,112 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to suppress a sub-report.I want to check a string value either it is null or not..If the string value is null then it will suppress.
I followed the following steps steps


1. then I wrote a formula like



if InStr ({EmployeeHist.SpouseName},'' ) = 0 then
'N/A'

But its showing a error **THE FORMULA RESULT MUST BE A BOOLEAN**..

Can anyone please help??
Posted

1 solution

Your formula should be like below. Because the suppress condition depends on true or false(boolean value).
C#
if InStr ({EmployeeHist.SpouseName},'' ) = 0 then
true
 
Share this answer
 
Comments
smrafat 31-Dec-13 4:10am    
Thanx for your answer.I have later tried this one.But its still going wrong.Both the subreport having Value or Not the sub-report is suppressing..
thatraja 31-Dec-13 4:26am    
/*But its still going wrong*/
Please mention with more details. I have changed the formula based on 'Suppress' logic which accepts only boolean value

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