Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report using "," and ";" in textboxes

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!

VFP9

I am using in reports the possibility to get data spread over several lines.
Therefore I e.g. put in textbox expression:
"T1: "+cTel1_net,"-",cTel1;"T2: "+cTel2_net,"-",cTel2
This results in:
T1: +cTel1_net - cTel1
T2: +cTel2_net - cTel2

But...
if cTel1 is empty than next is displayed:
T1: cTel1_net - T2: cTel2_net - cTel2

As far to my knowlegde all of the expression 'behind' the ";" should start at a new line.

Any suggestions?

TIA
-Bart
 
Hi

I've never used that notation before, but I get a new line for each semicolon.

I had to turn on the 'stretch with overflow'.

Good luck

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Hi Griff,
Well the comma and semicolumn start from the early Dbase3-time. Handy option up to now..
Indeed 'stretch with overflow' must be ticked.
Nevertheless I still get this unexpected behaviour.
In fact I programmed data for 5 seperate lines:
T1(telephone line1)
T2(telephone line2)
M1(mobile 1)
M2(mobile 2)
F (fax)
I even sometimes get a display (when data is empty) like:

T1: 0314- 343160
T2: M1:
M2:
F:

or:

T1: T2: M1:
M2:
F:

note that the "T1:" "T2:" "M1:" "M2:" "F:" is just text inside th eexpression.
weird stuff......

-Bart
 
Interesting.

If you concatenate the expression before the semicolon to the expression before that
using a + it works as expected, likewise if you put a printable expression after the one that
is empty - such as a dash or a period!

Very odd.

I do vaguely remember using the comma, but never in a report expression!
I don't remember the semicolon at all, but I forget things all the time now
I'm 50!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
That's what I generally do, although I think I'm stuck doing Cr and Lf!

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Griff said:
I do vaguely remember using the comma, but never in a report expression

Commas do work in report expressions, just as in any other expression. But it's probably best to avoid them, if only because so few people know about them.

Griff said:
I forget things all the time now I'm 50

I must say it's good to see young people around here.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
he he

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Mike,
Going to give it a try.
But I mostly got used to work with comma and semicolumn.
E.g. when I print an addres I'll do like:
"street,housenumber,houseletter"
it works fine for me that way as it also inserts a space between each item.

By the way I slightly remember to be born in 1954 ;-)
So more young people overhere apart from Griff.

-Bart
 
Mike,
The allt(xxxxxx)+chr(13) solves this weird thing!
Cannot see why my "," and ";" did not do what expected and that's frustrating.
-Bart
 
Bart, I can't see why the semi-colon and comma didn't work, but in any case I'd recommend ALLTRIM() and CHR(13).

The main reason is that they are far more familiar to most VFP programmers. If there is any chance that someone else will one day have to maintain (or just understand) your report, it's better to use constructs and syntax that they are most likely to understand.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top