Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Suppress Blank Line in Text Box Post Reply Post New Topic
Author Message
chiefwiggy
Newbie
Newbie


Joined: 07 Jun 2012
Location: United States
Online Status: Offline
Posts: 2
Quote chiefwiggy Replybullet Topic: Suppress Blank Line in Text Box
    Posted: 07 Jun 2012 at 8:00am
I will apologize for the long post ahead of time but I want to give a fairly clear picture of what I am trying to accomplish in this initial post. I am also new to programming so my methods may seem a bit cumbersome. Any help is much appreciated.

I need to create up to 10 80-character lines per record (call them M records) in a text file. Each M record contains multiple fields and spaces that I am pulling from a database and has a set number of characters per field.

The M records are related to Mortgage Loan information. Records M05 through M08 are only needed if there are co-borrowers on specific loan (M05 = Co-Borrower #1, M06 = Co-borrower #2, etc.). If not, I need to suppress the line.

I have defined a formula for each piece of the specific M Record (including any necessary totext functions and spacing). For example, M05_02 is to have a length of 25 characters and contain the spouses first name. It contains the following formula: left({coborrow.spouse_fn}+Space(25),25)

The M05Record formula is a formula that is on the report and is embedded in a text box below the M04Record file. The formula in the M05Record is:
if {@M05_04}=space(9) then

   Space(80) //I have also tried '' rather than Space(80)

else
      {@M05_01}+{@M05_02}+{@M05_03}+{@M05_04}+{@M05_05}

M05_04 is the spouse SSN. If it is not present the formula returns Space(9), otherwise it returns the nine character ssn.

PROBLEM: In the text box, I have checked the "Suppress Embedded Field Blank Lines" but the report still has a blank line between the M05 and M09 record(I have not included M06-M08 in the text box yet). I don't want the blank lines showing up in the report if the data is not present.

I have tried 1 text box, 1 text box per M record, I have tried multiple detail sections with and without individual text boxes. Any suggestions?

Thanks,

CW
IP IP Logged
chiefwiggy
Newbie
Newbie


Joined: 07 Jun 2012
Location: United States
Online Status: Offline
Posts: 2
Quote chiefwiggy Replybullet Posted: 07 Jun 2012 at 8:12am
One quick note: It does suppress the M5 line so that M09 is on the next line after M04 but it adds and additional line after after M10 (the last of the MRecords per loan record)where M05 does not contain any data.
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 31 Aug 2012 at 10:12am
SELECT     REGEXP_REPLACE ( tester
                 , '(^|' || CHR (10) || ')' || CHR (10) || '+'
                 , '\1'
                 )
FROM     test_tab
;
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.