You can place 2 textboxes on your report (or actually an additional 1 because there is 1 there already)
Make sure they both have the same Source Expression. In the Format property for the 1 you want to display integers type <Integer> in the other textbox's Format property type <Decimals>
That's it.
This isn't a signature, I type this at the bottom of every message
SteveO Posted: Thu Aug 24, 2006 2:43 am Post subject:
You can place 2 textboxes on your report (or actually an additional 1 because there is 1 there already)
Make sure they both have the same Source Expression. In the Format property for the 1 you want to display integers type <Integer> in the other textbox's Format property type <Decimals>
That's it.
Iam sorry it doesnt work,i already tried that before i made a post
SteveO Posted: Thu Aug 24, 2006 2:43 am Post subject:
You can place 2 textboxes on your report (or actually an additional 1 because there is 1 there already)
Make sure they both have the same Source Expression. In the Format property for the 1 you want to display integers type <Integer> in the other textbox's Format property type <Decimals>
That's it.
Iam sorry it doesnt work,i already tried that before i made a post
In the source for the textbox try FORMAT(Amount,0,'<Integer>') and FORMAT(Amount,0,'<Decimal>')
But that gives 0.50 so FORMAT(Amount,0,'<Decimal>') * 100
THIS WORKS THANKS KRIKI AND DAVID
David Cox Posted: Thu Aug 24, 2006 2:59 am Post subject:
Try this
MESSAGE('%1',99.50 DIV 1); //= 99
MESSAGE('%1',99.50 MOD 1 * 100); // = 50
So the source for the textboxes with decimal places set to 0
AMOUNT DIV 1
AMOUNT MOD 1 * 100
kriki Posted: Thu Aug 24, 2006 2:50 am Post subject:
And in case you want it in variables:
Code:
integer part := decDecimal DIV 1;
decimal part := decDecimal MOD 1;
I'm curious to find out why you said using the Format property does not work? As I have tested it and it does work, admittedly it does produce .50 as opposed to just 50 (unless this is what you where refering to?).
Just in case
FORMAT(Amount,0,'<Decimal>') * 100
wont work because the FORMAT will have converted the expression to a string and string * 100 does not compute.
This isn't a signature, I type this at the bottom of every message
Comments
Make sure they both have the same Source Expression. In the Format property for the 1 you want to display integers type <Integer> in the other textbox's Format property type <Decimals>
That's it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MESSAGE('%1',99.50 DIV 1); //= 99
MESSAGE('%1',99.50 MOD 1 * 100); // = 50
So the source for the textboxes with decimal places set to 0
AMOUNT DIV 1
AMOUNT MOD 1 * 100
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
You can place 2 textboxes on your report (or actually an additional 1 because there is 1 there already)
Make sure they both have the same Source Expression. In the Format property for the 1 you want to display integers type <Integer> in the other textbox's Format property type <Decimals>
That's it.
Iam sorry it doesnt work,i already tried that before i made a post
GD
In the source for the textbox try FORMAT(Amount,0,'<Integer>') and FORMAT(Amount,0,'<Decimal>')
But that gives 0.50 so FORMAT(Amount,0,'<Decimal>') * 100
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
David Cox Posted: Thu Aug 24, 2006 2:59 am Post subject:
Try this
MESSAGE('%1',99.50 DIV 1); //= 99
MESSAGE('%1',99.50 MOD 1 * 100); // = 50
So the source for the textboxes with decimal places set to 0
AMOUNT DIV 1
AMOUNT MOD 1 * 100
kriki Posted: Thu Aug 24, 2006 2:50 am Post subject:
And in case you want it in variables:
Code:
integer part := decDecimal DIV 1;
decimal part := decDecimal MOD 1;
GD
I'm curious to find out why you said using the Format property does not work? As I have tested it and it does work, admittedly it does produce .50 as opposed to just 50 (unless this is what you where refering to?).
Just in case
wont work because the FORMAT will have converted the expression to a string and string * 100 does not compute.