Hi All,
In an app I have numeric fields in which no result of earlier actions are known yet.
In an TsBrowse presentation I want no "zero" in the field but an empty field presentation.
Dbases tend to put a zero in a numeric field, but in certain cases there is no value available yet.
How can I force that field into an empty field.
Thanks,
Jules
How can I show an empty numeric field without a zero
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: How can I show an empty numeric field without a zero
Just use
TRANSFORM( "@Z ...", FIELD -> number )
as browse column expression or directly
PICTURE "@Z ..."
if your browse supports it.
EMG
TRANSFORM( "@Z ...", FIELD -> number )
as browse column expression or directly
PICTURE "@Z ..."
if your browse supports it.
EMG
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands
Enrico,
Thanks for advising me.
I am not able to do the right thing with it.
I will give some more specific info.
I use TsBrowse with Add Column
ADD COLUMN TO oBrw[ 1 ];
HEADER "Runs2" ;
SIZE 50 PIXELS ;
DATA FieldWblock("Uitslag2", Select());
COLORS CLR_YELLOW,CLR_BLUE;
ALIGN DT_CENTER
When nUitslag2 == 0 it should display a blank field.
Is that possible or should I change the next line in a Resource?
REDEFINE GET onUitslag2 VAR nUitslag2 ID 105 OF oDlwBew UPDATE Picture "999"
Thanks,
Jules
Thanks for advising me.
I am not able to do the right thing with it.
I will give some more specific info.
I use TsBrowse with Add Column
ADD COLUMN TO oBrw[ 1 ];
HEADER "Runs2" ;
SIZE 50 PIXELS ;
DATA FieldWblock("Uitslag2", Select());
COLORS CLR_YELLOW,CLR_BLUE;
ALIGN DT_CENTER
When nUitslag2 == 0 it should display a blank field.
Is that possible or should I change the next line in a Resource?
REDEFINE GET onUitslag2 VAR nUitslag2 ID 105 OF oDlwBew UPDATE Picture "999"
Thanks,
Jules
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands
Enrico,
This works OK:
ADD COLUMN TO oBrw[ 1 ];
HEADER "Runs2" ;
SIZE 50 PIXELS ;
DATA FieldWblock("Uitslag2", Select());
COLORS CLR_YELLOW,CLR_BLUE;
ALIGN DT_CENTER;
PICTURE "@Z 999"
TsBrowse does not recognize Transform in this place
DATA TRANSFORM( "@Z 999", FIELD -> Uitslag2 );
However in my database I have to differentiate between certain records with a different field content to show zero's or blanks.
It does not work when I use :
If Gesp == "J"
Add Column etc
Picture "@Z 999"
Else
Add Column etc
Endif
So it is all blanks or zero's.
I need both depending on field Gesp
Jules
This works OK:
ADD COLUMN TO oBrw[ 1 ];
HEADER "Runs2" ;
SIZE 50 PIXELS ;
DATA FieldWblock("Uitslag2", Select());
COLORS CLR_YELLOW,CLR_BLUE;
ALIGN DT_CENTER;
PICTURE "@Z 999"
TsBrowse does not recognize Transform in this place
DATA TRANSFORM( "@Z 999", FIELD -> Uitslag2 );
However in my database I have to differentiate between certain records with a different field content to show zero's or blanks.
It does not work when I use :
If Gesp == "J"
Add Column etc
Picture "@Z 999"
Else
Add Column etc
Endif
So it is all blanks or zero's.
I need both depending on field Gesp
Jules
-
- Posts: 21
- Joined: Mon Mar 20, 2006 12:48 pm
- Location: Netherlands