Make Report Skip Blank Fields

Moderators: Moderators, Tech Support

Post Reply
megs
Posts: 20
Joined: Thu May 25, 2006 4:06 pm
Location: Morden Manitoba
Contact:

Make Report Skip Blank Fields

Post by megs »

I've made a custom report to print envelopes for selected vendors. I've edited the report so that the fields I've included look like this:
Name
Address
Address 2
City, State
Mail Code

I have 2 questions about this report:

1. When I come accross a vendor that has no Address2 I get a blank line where it would go. How do I get rid of it?

2.How do I get the State to follow directly after the City? Since not all city's are the same length, I've made the city field large and it often leaves a big space between the city and state fields.

Thanks for any help you can provide.
~Megs

NeilZ
Posts: 10216
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Make Report Skip Blank Fields

Post by NeilZ »

megs wrote:I've made a custom report to print envelopes for selected vendors. I've edited the report so that the fields I've included look like this:
Name
Address
Address 2
City, State
Mail Code

I have 2 questions about this report:

1. When I come accross a vendor that has no Address2 I get a blank line where it would go. How do I get rid of it?

2.How do I get the State to follow directly after the City? Since not all city's are the same length, I've made the city field large and it often leaves a big space between the city and state fields.

Thanks for any help you can provide.
You should be able to right-click on the data item to get a menu with the Properties selection. Select that, then click on the Print When button that is there. On the next dialogue you'll see a checkbox where you can select to Remove Line If Blank.

Hope that helps
Neil Zampella

Using PC+ since 1999.

Zorak
Tech Support
Tech Support
Posts: 3015
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Make Report Skip Blank Fields

Post by Zorak »

NeilZ wrote:You should be able to right-click on the data item to get a menu with the Properties selection. Select that, then click on the Print When button that is there. On the next dialogue you'll see a checkbox where you can select to Remove Line If Blank.
Neil is correct, this will remove the empty field *if* there is nothing to the right of that field on the report layout.

Name----------------------Vendor ID
Address1------------------Phone
Address2------------------Fax
City, State, ZIP-----------Contact person

If Address2 is blank, but Fax is not, you will still get a blank line for Address2.

megs
Posts: 20
Joined: Thu May 25, 2006 4:06 pm
Location: Morden Manitoba
Contact:

Remove Line Box is Checked

Post by megs »

I have checked the Remove Line Box in the Print When dialog, but I'm still getting a blank line. I have no other fields or items on the same horizontal line as the field (thanks for the tip though). Here are my settings under properties (I have applied the same settings to all of the fields in my form):
ImageImage
I still get the following output that looks like this:

John Doe
Box 123

Anytown Anystate
Mailcode
~Megs

Jeff
Program Development
Program Development
Posts: 1225
Joined: Fri Sep 05, 2003 11:43 am
Location: PowerChurch Software
Contact:

Post by Jeff »

Make sure none of the text boxes overlap. If the address of city boxes overlap at all with the address2, the area will not be considered blank and not removed by the report writer.

megs
Posts: 20
Joined: Thu May 25, 2006 4:06 pm
Location: Morden Manitoba
Contact:

One problem fixed...

Post by megs »

I tried everything I could think of to skip the blank line with no luck, so I reset the form and started over and now it works! I must have had some crazy setting wrong somewhere!

I'd still like to know if it's possible to put my city and state fields next to each other without all that extra space in between. Any suggestions?
~Megs

megs
Posts: 20
Joined: Thu May 25, 2006 4:06 pm
Location: Morden Manitoba
Contact:

How to put two fields together.

Post by megs »

In case anyone else had this problem, this is how I got my city and state fields to appear next to each other:

Right click the field and click properties.
Click the ... next to expression
In the expression box enter the following: ALLTRIM(city)+", "+state

Now my output looks like this:
city, state
~Megs

Zorak
Tech Support
Tech Support
Posts: 3015
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Post by Zorak »

Yep, the ALLTRIM() thing is a life-saver. Most every text field you report on will be filled with spaces. Using that cuts the extra spaces off.

Post Reply