insert new line...

R

Ricardo Batista

Hello,


I have this code:

«year1» «desc1»
«cfi1»
«year2» «desc2»
«cfi2»
..
..
..
«year20» «desc20»
«cfi20»


How can insert a "new line" so the output can be like:

1990 car
the car is very good

1998 house
i have a new houe

2009 bike
The bike is red
..
..
..

and NOT like this (this is the current output)

1990 car
the car is very good
1998 house
i have a new houe
2009 bike
The bike is red
..
..
..



Can I insert something in the "field option ->> Text to be inserted after:"
with a <br> or \p????

thanks
 
P

Peter Jamieson

Sorry to be stupid, but
a. why not try


«year1» «desc1»
«cfi1»

«year2» «desc2»
«cfi2»

«year3» «desc3»
«cfi3»
..
..
..
..
«year20» «desc20»
«cfi20»

i.e. just put an extra line after each <<cfi>> field?

b. or maybe you could try to spell out why that will not work.
 
R

Ricardo Batista

:)

The problem is that if the database is enpty or has only 2 records, the word
doc will have to many blanck lines.
 
M

macropod

Hi Ricardo,

you could use IF tests to work out what to do. For example, if the presenced or absence of data in your 'desc' field indicates
whether anything needs to be output for the record-set, you could use field coding like:
{IF«desc1»<> "" "«year1» «desc1»¶
«cfi1»¶
"}{IF«desc2»<> "" "«year2» «desc2»¶
«cfi2»¶
"}{IF«desc3»<> "" "«year3» «desc3»¶
«cfi3»¶
"}...

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.
 
P

Peter Jamieson

OK, so you're asking a programming question.
(An end user can generally cope with what happens when they have 0, 1 or 2
records)
So it's not hard to spell it out...
Is it?

e.g. your data source is like this:

Year Desc CFI


What output do you expect?

Or this:

Year Desc CFI
2005 two oh oh five see eff eye

What output do you expect?

Like this

Year Desc CFI
2005 two oh oh five see eff eye won
2006 two zero zero six coffee2

and so on
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top