Line Breaks or Carriage Returns in a report

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Line Breaks or Carriage Returns in a report

Post by rbross »

Hello,

Is there a way to include a CR or Line Break in a report Tag?
I want to format an address in one tag control on the form instead of having multiple tags.
Can you use ASCII codes in a tag element?
I see that html does not work in a standard AwareIM Report.

Roger
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
kklosson
Posts: 1617
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Line Breaks or Carriage Returns in a report

Post by kklosson »

I did it once but I don't remember quite how. I have put a carriage return element into the SystemSettings then insert <<SystemSettings.LineBreak>> into the report. I just can't remember how I captured the line break - but I did.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: Line Breaks or Carriage Returns in a report

Post by rbross »

do you think you just enter the ascii code for CR & line Break? 10 and 13?
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
kklosson
Posts: 1617
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: Line Breaks or Carriage Returns in a report

Post by kklosson »

No, I think I had to copy a line break character from something (maybe MS Word) and paste it into the field.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Line Breaks or Carriage Returns in a report

Post by tford »

Tom - V8.8 build 3137 - MySql / PostGres
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: Line Breaks or Carriage Returns in a report

Post by rbross »

Tom,

Tried added SystemSettings.CR and then doing 'Enter' on the CR field.
I added the SystemSetting.CR to my Tag Control formatted like this:

TRIM(Contact.ContactBusinessName)+SystemSettings.CR+
TRIM(Contact.PhysicalAddress1)+SystemSettings.CR+
TRIM(Contact.PhysicalAddress2)+SystemSettings.CR+
TRIM(Contact.PhysicalCity)+' '+TRIM(Contact.sc_State_PhysicalStateCode)+' '+Contact.PhysicalZipCode

BUT no luck no CR?
Is the CR attribute plain text or a numeric field. How ling should it be?

Roger
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: Line Breaks or Carriage Returns in a report

Post by rbross »

I got it to work. Text Field 1 Character in Length. Add the CR in Runtime.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Line Breaks or Carriage Returns in a report

Post by tford »

Great Roger!
Tom - V8.8 build 3137 - MySql / PostGres
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: Line Breaks or Carriage Returns in a report

Post by rbross »

Now to get the proper format so it skips address2 if it is blank so it does not have blank lines in the address when it iis printed.

Any idea's?
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Solution to set a value into CR field

Post by Jaymer »

Using v8, and MySQL

I added the CR field from SystemSettings to a form.
I could not get a CR to "stick" in the field. using Safari (Mac), I tried pasting in a CR (copied to clipboard from a text field in an app) but Aware didn't think I'd changed the field because if I clicked Close, it didn't say that there had been changes to fields on the form.

Using TOAD EDGE on Windows, I could edit the CR field in their mini editor, and enter a CR, but it wouldn't stick either.

Then, a simple SQL statement set it just fine.

I opened the DOS SQL window for mySQL:

Code: Select all

update testbo_systemsettings
set CR = '\n'
in MSSQL, you could do this with SSMS:

Code: Select all

update testbo_systemsettings
set CR = char(13)
--> JaymerTip keywords: carriage return, line feed
Last edited by Jaymer on Mon Dec 09, 2019 4:14 pm, edited 4 times in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
rbross
Posts: 441
Joined: Wed Nov 19, 2014 4:13 am
Location: Coventry, Connecticut USA

Re: Line Breaks or Carriage Returns in a report

Post by rbross »

When you enter the CR in SystemSettings you just park on the CR field and press the Enter key. You will not see any value but the character is there. Then in the report, you have your BO.Attr+systemstettings.CR and it will do the carriage return for you. works good for formatting addresses.
Good to know '\n' works as well.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Line Breaks or Carriage Returns in a report

Post by Jaymer »

rbross wrote:When you enter the CR in SystemSettings you just park on the CR field and press the Enter key. You will not see any value but the character is there. Then in the report, you have your BO.Attr+systemstettings.CR and it will do the carriage return for you. works good for formatting addresses.
Good to know '\n' works as well.
Roger, I read that above, but that DID NOT work for me.
I looked at the raw data (via MySQL) and it did not save a CR.
have you done this recently in v8 - maybe something changed.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply