How do I display data formatted in a particular way?

J

JustinP

The data format is like ->> a | b | c | d | e. So as an example:

Record 1 = wid | git
Record 2 = this | is | a | wid | git

I need to split this field (strX = Split(..., "|") and display each
array on a new line under a grouped header in a report.

Like this:
------------------------------------------
Record 1

wid
git
-------------------------------------------

Record 2

this
is
a
wid
git
------------------------------------------


How do I go about putting the current row in the (strX = Split(...,
"|") statement?
Is this the best way to go about this?
 
G

Guest

Hi JustinP,

What about something like this:

replace(FIELD, " | ", chr(13) & chr(10))

Where FIELD is the field name.

Damian.
 
J

JustinP

Works a treat and is simple. Thanks.

Hi JustinP,

What about something like this:

replace(FIELD, " | ", chr(13) & chr(10))

Where FIELD is the field name.

Damian.
 
J

JustinP

Works a treat, thanks. Just to make it a bit more difficult though what
if I have two columns of information and need the second column to go
below the first. (The problem being that the variable length of the
data may cause the text boxes to either overlap or spread too far from
each other).
------------------------------------------
Record 1

Column 1 wid
git

Column 2 some
other
thing
-------------------------------------------

Record 2

Column 1 this
is
a
wid
git

Column 2 yet
more
 
G

Guest

Hi again,

Just set your report up with the grouping on the Record Number, put the
heading (Record 1 in your sample) in the group header, then put Field 1 at
normal size with Field 2 at normal size below it in the Details section.

Set the properties of Field 1 and Field 2 so that Can Grow are set to true.
Set the Properties of the Details Section so that Can Grow is set to true.

That should fix it for you.

Damian.
 
J

JustinP

Nailed it, thanks bud.

Hi again,

Just set your report up with the grouping on the Record Number, put the
heading (Record 1 in your sample) in the group header, then put Field 1 at
normal size with Field 2 at normal size below it in the Details section.

Set the properties of Field 1 and Field 2 so that Can Grow are set to true.
Set the Properties of the Details Section so that Can Grow is set to true.

That should fix it for you.

Damian.
 

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