Normal Topic Line wrap on report (Read 779 times)
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Line wrap on report
Mar 8th, 2007 at 5:51pm
Print Post Print Post  
I have a report named statement. The first line of the N & A can be rather long and sometimes wraps to the next line. One run the whole name was on the first line but on a subsequent run the last word of the name went to the second line. Now it is always on the second line. This is using print immediate in the report. In preview it is always on the first line.
The on print command is
Sold_Name + @NewLine() + Sold_Addr + @NewLine() +  etc.
What determines the length of the line printed?
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Line wrap on report
Reply #1 - Mar 9th, 2007 at 4:16am
Print Post Print Post  
You can use HTML codes to control where line-breaks occur (or don't occur). Use <br> anywhere that you want to force a line-break. And you can [i]prevent[/i] a line-break by enclosing your data inside these tags: <nobr> </nobr>

As in this example: [color=#ff0000]<nobr>[/color]My data all on one line[color=#ff0000]</nobr>[/color]

The <br> tag is very common, but I think the <nobr> tag is quite a bit less known. I use it a lot when producing reports that contain phone numbers in this format: nnn-nnn-nnnn. That's because browsers see the dashes as hyphens, and seem to like to line-break on them.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Line wrap on report
Reply #2 - Mar 9th, 2007 at 4:23am
Print Post Print Post  
BTW, using your example, you could try something like:
"<nobr>" + Sold_Name + "</nobr><br><nobr>" + Sold_Addr + "</nobr><br>" + etc...

This would force any data in Sold_Name to appear all on one line, then all data in Sold_Addr to appear on the next line.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
pineberry
Full Member
***
Offline


No personal text

Posts: 115
Location: Strawberry, AZ  USA
Joined: Nov 30th, 2002
Re: Line wrap on report
Reply #3 - Mar 12th, 2007 at 2:32am
Print Post Print Post  
Thanks Carl. That is a solution to my problem but I would still like to know about the length. Everyplace else I print the length is not a problem. Why in this report?

Harley
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Line wrap on report
Reply #4 - Mar 12th, 2007 at 12:11pm
Print Post Print Post  
pineberry wrote on Mar 12th, 2007 at 2:32am:
Thanks Carl. That is a solution to my problem but I would still like to know about the length. Everyplace else I print the length is not a problem. Why in this report?

Harley


Harley,

HTML will try to adjust the column sizes so the report fits on the page. It does this by looking at the data in the column to decide how wide the column should be. This means that the width of a column may change if you print different data.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged