First, thanks to everyone for your assistance. It is appreciated. Unfortunately I am still on the horns of a dilemna.
Here's my variable list again. I have been trying various combinations of (CHAR(10) + CHAR(13)) or just CHAR(13) and the result never change.
1 : TEXT : RH : vCRLF = (CHAR(10) + CHAR(13)) 2 : TEXT : PH : sal = salutation in salutation where salut = salut 3 : TEXT : PH : fname = fnamer in tenant where acct = acct 4 : TEXT : PH : lname = lnamer in tenant where acct = acct 5 : TEXT : PH : v1name = (sal & fname & lname) 6 : TEXT : PH : sal2 = salutation in salutation where salut2 = salut2 7 : TEXT : PH : fname2 = fnamer2 in tenant where acct = acct and salut ne '5' 8 : TEXT : PH : lname2 = lnamer2 in tenant where acct = acct and salut ne '5' 9 : TEXT : PH : name2 = (sal2 & fname2 & lname2) 10 : INTEGER : PH : addr = addr1r in tenant where acct = acct 11 : TEXT : PH : st = street in commaddr where stcode = stcode 12 : TEXT : PH : street = (ctxt(.addr) & st) 13 : TEXT : PH : city = city in commaddr where stcode = stcode 14 : TEXT : PH : state = state in commaddr where stcode = stcode 15 : TEXT : PH : zipcd = zipcd in commaddr where stcode = stcode 16 : TEXT : PH : csz = (.city + ',' & state & zipcd) 17 : TEXT : PH : csz2 = (.csz+.vCRLF) 18 : TEXT : PH : vprintline2 = (IFEXISTS(.name2,.name2,.street)) 19 : TEXT : PH : vprintline3 = (Ifexists(.name2,.street,.csz)) 20 : TEXT : PH : vprintline4 = (Ifexists(.name2,.csz+(CHAR(10) + CHAR(13)),' ')) 21 : NOTE : PH : vaddress = (.vPrintLine2+(CHAR(013))+.vPrintLine3+(CHAR(013))+.vPrintLine4)
I am printing V1NAME and VADDRESS in my report. VADDRESS is a Variable memo as Razzak suggested.
If fname2 exists, the line spacing is correct. If fname2 is null, I have an extra line in the report. I just tried Alistairs suggestion of reversing IFEXISTS and IFNULL and still get the same result.
From what everyone has offered, this should work. The missing link has to be around here somewhere. Again my thanks to all for the help and any additional thoughts are welcome.
Ed
Apr 29, 2009 01:11:35 PM, [email protected] wrote:
http://www.w3.org/TR/REC-html40"" class="parsedLink" target="_blank">http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"" class="parsedLink" target="_blank">http://schemas.microsoft.com/office/2004/12/omml">
Ed,
Maybe I've got the wrong end of the stick but if
you have blank spaces that you don't want then do you not need to eliminate a
CR/LF?
If so, try setting up your last
variable in this way:
vaddress = (.vPrintLine2 + (IFNULL(.vPrintLine2, ' ', (CHAR(013)) )) +
.vPrintLine3 ... )
Regards,
Alastair.
----- Original Message -----
Sent: Wednesday, April 29, 2009 6:26
PM
Subject: [RBASE-L] - Re: Eliminating
Print of Blank Lines in Reports
Ed,
I
presented an incomplete thought. What I was really trying to suggest is
that you add ALL of the returns in the individual strings when appropriate,
rather than when you assemble each of the lines into the one final
result.
From: [email protected]
[mailto:[email protected]] On Behalf Of Ed Rivkin Sent:
Wednesday, April 29, 2009 12:02 PM To: RBASE-L Mailing
List Subject: [RBASE-L] - Re: Eliminating Print of Blank Lines in
Reports
Emmitt, Thanks. I tried the suggested syntax below and
it places the carriage return before printing the .csz variable so it now
prints one line too low.
If I use this syntax for Line
18: TEXT : PH : vprintline4 =
(Ifexists(.name2,.csz+(CHAR(13)),' '))
I still have the previously reported result; i.e. I don't get a space
between print line four and the next print line. I also tried defining a
new variable, .csz2 which includes .csz+(CHAR(13)) and making that the 2nd
argument in vprintline4. Finally I varied between (CHAR(13)) and (CHAR(013))
without any change in the result.
Thanks to Javier as well for the
band suggestion. Dynamic Height is highlighted for the Page Header
Band.
Sorry to be giving everyone such a challenge but I am really
stumped on this one....
Ed
Apr 29, 2009 10:16:59 AM, [email protected]
wrote:
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,'
'))
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.
No virus found in this incoming message. Checked by AVG -
www.avg.com Version: 8.5.287 / Virus Database: 270.12.8/2086 - Release
Date: 04/29/09 06:37:00
|