Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove line if blank in report poser

Status
Not open for further replies.

codetyko

Programmer
May 26, 2001
73
MY
In report writer, I have often used the "Print When" expression as well as the "Remove Line If Blank" option with variable success. I just want to know the logical explanation as to why sometimes it works and sometimes it doesn't.

For example, I have a report detailing loan defaulters' name, acctno, guarantors and the remarks (memo field) relating to each case. I have the detail band expand with the memo field together with the rectangle object surrounding the column. On top of the memo field position i put a few fields relating to the date of Summons filed, Judgment obtained etc. So I put in the "Print When" expression as "defendant.judgment!={}" and check the "Remove Line If Blank" option. The variable to be printed was entered as "IIF(defendant.judgment!={},COND1,COND2) where cond1 and cond2 was initialized as "cond1='Judgment Obtained On '+alltr(dtoc(defendant.judgment)" and cond2=''respectively. However, when I print the report, the line was not removed.

I then tried to use the report variables and define the variable as "cond1='Judgment Obtained On '+alltr(dtoc(defendant.judgment)" and set the initial value as ''. Still the line was not removed despite being blank.

Anybody with the same experience and hopefully a solution? I hope the experts would not be bored with my endless questions and I hope I would not be awarded with "The guy with the most questions within the hour" trophy. Thanks in advance, you guys has been very helpful all this while.


 
Since there is a rectangle there, the line is not blank. You might try a Print When for the rectangle itself.
Unless I am misunderstanding what you are saying.

Dave S.
 
Dear Dave,

I think you misunderstood the situation.

What I have is 5 report fields for each account in the following order.

1) Remarks for the account -memo field - expand with size

2) Letter of Demand Date -Date - Remove line if blank, print as "Letter of Demand Dated '+alltr(dtoc(defendant.lod))

3) Summons Date - Date - Remove line if blank, print as "Summons Filed On '+alltr(dtoc(defendant.summons))

4) Mention Date - Date - Remove line if blank, print as "Case Fixed for Mention On '+alltr(dtoc(defendant.mention))

5) Judgment Date - Date - Remove line if blank, print as "Judgment Obtained On '+alltr(dtoc(defendant.judgment))

The "Print When" options are as the one decribed in my earlier post. The rectangle is the "container" for all the above fields. Therefore it is not "involved" directly with the fields contained within it, just expand or adjust its size accordingly. To test the report, I swicth the position of fields 2 to 5 to see whether the lines are removed but to no avail. Any ideas?
 
You might want to try "Print When..." a statement like

!EMPTY(defendant.judgment)

instead of

defendant.judgment != {}

as an date empty field could evaluate to {//} as opposed to {}.

Dave S.
 
Tried your suggestion dave, still the same result. Off to take a few aspirins.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top