Normal Topic suppressing blank fields on reports (Read 618 times)
berkhills
Member
*
Offline



Posts: 3
Joined: Apr 2nd, 2007
suppressing blank fields on reports
Apr 2nd, 2007 at 11:51pm
Print Post Print Post  
Unable to find any way to suppress (stop from taking space) blank fields on a report, in particular, 2nd line addresses that are usually blank, except when really needed.

Thanks, Ed
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: suppressing blank fields on reports
Reply #1 - Apr 2nd, 2007 at 11:53pm
Print Post Print Post  
Is this a columnar (table) report or a freeform report?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
berkhills
Member
*
Offline



Posts: 3
Joined: Apr 2nd, 2007
Re: suppressing blank fields on reports
Reply #2 - Apr 2nd, 2007 at 11:57pm
Print Post Print Post  
SmileyThis is a freeform report.  Thanks for the reply
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: suppressing blank fields on reports
Reply #3 - Apr 3rd, 2007 at 12:06am
Print Post Print Post  
I'm assuming you have a value box on the report bound to a field called something like Address1 and one bound to something like Address2.

Make them both invisible.
Add an Unbound Value Box to the report.
Program its OnPrint event to something like this:

If the new Value Box is named LE1...
Code
Select All
var vAddress as String

	vAddress = ""
	If @Len(Address1) > 0
	{
		vAddress = Address1
		If @Len(Address2) > 0
		{
			vAddress = vAddress + "<BR>" + Address2
		}
	}
	Else
	{
		If @Len(Address2) > 0
		{
			vAddress = Address2
		}
	}
	LE1 = vAddress
 



This code sets the Unbound element differently depending on which of the Address fields have a value.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
berkhills
Member
*
Offline



Posts: 3
Joined: Apr 2nd, 2007
Re: suppressing blank fields on reports
Reply #4 - Apr 3rd, 2007 at 4:01pm
Print Post Print Post  
Thank you, will give that a try.
Ed
  
Back to top
 
IP Logged