Click here to Skip to main content
11,483,586 members (70,972 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CrystalReports
Hi Friend,,


I have created a label report having fields cname,oname,addr1,addr2,addr3,city,state.

It's like

Praveen
Hardware Shop

#34/1,Near Ram Mandir
3rd block
Rajaji Nagar
manipal
Karnataka

My question is if addr2 filed('3rd block') is blank, then the addr3 has to come up automatically..
Like

Praveen
Hardware Shop

#34/1,Near Ram Mandir
Rajaji Nagar
manipal
Karnataka


Please give me a solution as soon as possible.

I am using Crystal report 8.5
Posted 9-Jan-13 21:55pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I am not much familiar with crystal report. But I can give you some sort of solution for your problem.
Instead of adding several address fields (addr1,addr2,addr3,city,state) you can add a one address field and then bind the combined address to that filed.

for ex: what I mean is you need only 3 labels.
cname
oname
address

then using the SQL or from the code behind, combine "non empty fields" and bind to the address field.

and also you can use the formula editor to suppress the label if the value is empty
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

i found a solution for this by making use of IsNull()... itz worked for me
  Permalink  

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



Advertise | Privacy | Mobile
Web02 | 2.8.150520.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100