Ed,

 

Move the (CHAR(13)) to the definition of the print line.  What is happening is 
that even if your line is blank you’re getting a carriage return inserted.

 

  18  : TEXT   : PH : vprintline4 = (Ifexists(.name2,(CHAR(13))+.csz,'  '))



 

Emmitt Dove

Manager, Converting Applications Development

Evergreen Packaging, Inc.

[email protected]

(203) 214-5683 m

(203) 643-8022 o

(203) 643-8086 f

[email protected]

 

From: [email protected] [mailto:[email protected]] On Behalf Of Ed Rivkin
Sent: Wednesday, April 29, 2009 11:00 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Eliminating Print of Blank Lines in Reports

 

Razzak,
Thanks for the quick response last night. Here's what I did. Unfortunately
I still have the same spacing problem. 

My first print line always prints so I didn't include it in the IFEXISTS/IFNULL 
logic
or the vaddress variable.

Here are my variables.
  1  : TEXT   : PH : sal = salutation in salutation where salut = salut
  2  : TEXT   : PH : fname = fnamer in tenant where acct = acct
  3  : TEXT   : PH : lname = lnamer in tenant where acct = acct
  4  : TEXT   : PH : v1name = (sal & fname & lname)
  5  : TEXT   : PH : sal2 = salutation in salutation where salut2 = salut2
  6  : TEXT   : PH : fname2 = fnamer2 in tenant where acct = acct and salut ne 
'5'
  7  : TEXT   : PH : lname2 = lnamer2 in tenant where acct = acct and salut ne 
'5'
  8  : TEXT   : PH : name2 = (sal2 & fname2 & lname2)
  9  : INTEGER  : PH : addr = addr1r in tenant where acct = acct
  10  : TEXT   : PH : st = street in commaddr where stcode = stcode
  11  : TEXT   : PH : street = (ctxt(.addr) & st)
  12  : TEXT   : PH : city = city in commaddr where stcode = stcode
  13  : TEXT   : PH : state = state in commaddr where stcode = stcode
  14  : TEXT   : PH : zipcd = zipcd in commaddr where stcode = stcode
  15  : TEXT   : PH : csz = (.city + ',' & state & zipcd)
  16  : TEXT   : PH : vprintline2 = (IFEXISTS(.name2,.name2,.street))
  17  : TEXT   : PH : vprintline3 = (Ifexists(.name2,.street,.csz))
  18  : TEXT   : PH : vprintline4 = (Ifexists(.name2,.csz,'  '))
  19  : NOTE  : PH : vaddress = 
(.vPrintLine2+(CHAR(013))+.vPrintLine3+(CHAR(013))+.vPrintLine4+(CHAR(013)))

.vaddress is in the report as a Variable Memo with "stretch" clicked on.

When lines 2,3,4 print, everything lines up perfectly. When line 4 prints as 
blank,
I still have the extra line. This is printing in the break header which is 
where I want it.

Thanks again,
Ed

Apr 28, 2009 09:32:15 PM, [email protected] wrote:

At 10:05 PM 4/28/2009, Ed Rivkin wrote:

>how does one eliminate the now additional blank lines and
>get the spacing between addresses consistent regardless of
>the number of lines that printed.

Ed,

The best option is to use "Variable Memo" control based on
the expression that handles the blank data.

Once you place the Variable Memo and associate the control
with appropriate variable, you may adjust the height to a
minimum and make sure to allow "stretch".

Example:

vCityStateZip = (City + ','&State&ZipCode)
vPrintLine1 = (FirstName&LastName)
vPrintLine2 = (IFEXISTS(Company,Company,AddressLine1))
vPrintLine3 = (IFEXISTS(Company,AddressLine1,(IFNULL(Company, +
(IFEXISTS(AddressLine2,AddressLine2,.vCityStateZip)),.vCityStateZip))))
vPrintLine4 = 
(IFEXISTS(Company,(IFEXISTS(AddressLine2,AddressLine2,.vCityStateZip)), +
(IFNULL(Company,(IFNULL(AddressLine2,' ',.vCityStateZip)),' '))))
vPrintLine5 = (IFEXISTS(Company,(IFEXISTS(AddressLine2,.vCityStateZip,' ')), +
(IFNULL(Company,' ',' '))))

vAddress = 
(.vPrintLine1+(CHAR(013))+.vPrintLine2+(CHAR(013))+.vPrintLine3+(CHAR(013))+.vPrintLine14(CHAR(013))+.vPrintLine1+(CHAR(013)))

In this example, the vAddress is defined as "NOTE" and placed as 
"Variable Memo"
control with "Stretch" set to true (checked).

Hope that helps!

Very Best R:egards,

Razzak.

P.S. If you need a sample report or label based on this technique, let me know.



Reply via email to