rp
asked on
"Hide" if zero
Hi,
Is possible with Numeric Format Strings not show a value field if zero. For ex. i have some values like "0,00" in a report and i need to supress, print blank.
best regards
Is possible with Numeric Format Strings not show a value field if zero. For ex. i have some values like "0,00" in a report and i need to supress, print blank.
best regards
No, you need to implement that yourself by checking the value against zero and replacing with blank.
HI,
pls try in excel
yourRange.NumberFormat = "0.00;-0,00;";
if you want to use string format then use
refer to
https://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx
Regards
pls try in excel
yourRange.NumberFormat = "0.00;-0,00;";
if you want to use string format then use
double posValue = 1234;
double negValue = -1234;
double zeroValue = 0;
string fmt2 = "##;(##)";
string fmt3 = "##;(##);**Zero**";
Console.WriteLine(posValue.ToString(fmt2));
Console.WriteLine(String.Format("{0:" + fmt2 + "}", posValue));
// Displays 1234
Console.WriteLine(negValue.ToString(fmt2));
Console.WriteLine(String.Format("{0:" + fmt2 + "}", negValue));
// Displays (1234)
Console.WriteLine(zeroValue.ToString(fmt3));
Console.WriteLine(String.Format("{0:" + fmt3 + "}", zeroValue));
// Displays **Zero**
refer to
https://msdn.microsoft.com/en-us/library/0c899ak8(v=vs.110).aspx
Regards
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.