Report, Shrink, hiding blank lines

S

sammi

Please help.

I am creating a report with following 9 columns.

column1, column2,column3, column4, column5, column6,column7, column8,column9

In the expression builder, I used following expressions:

In the first text box.
='Column1:'+'+[column1]+','+'Column2:'+'+[column2]','+'Column3:'+'+[column3]
In the 2nd text box.
='Column4:'+'+[column4]+','+'Column5:'+'+[column5]','+'Column6:'+'+[column6]
In the thrid text box.
='Column7:'+'+[column7]+','+'Column8:'+'+[column8]','+'Column9:'+'+[column9]

I have set 'can shrink' to Yes, so that if there's no data in 2nd or 3rd
text box it will take up space. this works.

The problem I am having is that if column3 is also blank (null), whole line
(text box 1 disappears)

How do I prevent that from happening? Should be using Nz expression?

Thanks in advance.
 
B

BruceM

When you use the + sign as the concatenation operator, if any part of the
expression is null then the whole expression evaluates to null. Also, you
seem to have some extra + signs in any case. If I understand correctly, you
may want something like:

=("Column1: " + [column1]) & (", Column2: " + [column2]) & (", Column3: " +
[column3])

You may want to set the Can Shrink property of the Detail Section, if that
is where this expression occurs. If the expression above does not give the
result you want, provide a little bit of sample data (the values in Column1,
2, and 3, for instance) and the desired display of those data.
 
M

Marshall Barton

sammi said:
I am creating a report with following 9 columns.

column1, column2,column3, column4, column5, column6,column7, column8,column9

In the expression builder, I used following expressions:

In the first text box.
='Column1:'+'+[column1]+','+'Column2:'+'+[column2]','+'Column3:'+'+[column3]
In the 2nd text box.
='Column4:'+'+[column4]+','+'Column5:'+'+[column5]','+'Column6:'+'+[column6]
In the thrid text box.
='Column7:'+'+[column7]+','+'Column8:'+'+[column8]','+'Column9:'+'+[column9]

I have set 'can shrink' to Yes, so that if there's no data in 2nd or 3rd
text box it will take up space. this works.

The problem I am having is that if column3 is also blank (null), whole line
(text box 1 disappears)


Use & instead of + to concatenate.
 
S

sammi

Thanks to both of you. I used '&' instead of '+" and it worked !!!

Thanks, BruceM & Marshall Barton

--
Thanks,

Sammi


Marshall Barton said:
sammi said:
I am creating a report with following 9 columns.

column1, column2,column3, column4, column5, column6,column7, column8,column9

In the expression builder, I used following expressions:

In the first text box.
='Column1:'+'+[column1]+','+'Column2:'+'+[column2]','+'Column3:'+'+[column3]
In the 2nd text box.
='Column4:'+'+[column4]+','+'Column5:'+'+[column5]','+'Column6:'+'+[column6]
In the thrid text box.
='Column7:'+'+[column7]+','+'Column8:'+'+[column8]','+'Column9:'+'+[column9]

I have set 'can shrink' to Yes, so that if there's no data in 2nd or 3rd
text box it will take up space. this works.

The problem I am having is that if column3 is also blank (null), whole line
(text box 1 disappears)


Use & instead of + to concatenate.
 

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