I have a report that shows a string containing "wildcard" values. I
would like to be able to change the formatting (Bold, Italicized, Red)
for the wildcard values within the string. I've been examining the
conditional formatting functionality, but it seems only to apply to the
whole textbox value not a portion of it.
Has anyone tackled this before?
TIA,
EricI had similar issue when combining string and number field and solved it with
Format function:
=Fields!industry.Value & " (" & Format(Fields!marketPct.Value, "#0.0%") & ")"
You can probably something similar for color.
"Ferd Biffle" wrote:
> I have a report that shows a string containing "wildcard" values. I
> would like to be able to change the formatting (Bold, Italicized, Red)
> for the wildcard values within the string. I've been examining the
> conditional formatting functionality, but it seems only to apply to the
> whole textbox value not a portion of it.
> Has anyone tackled this before?
> TIA,
> Eric
>
Showing posts with label portion. Show all posts
Showing posts with label portion. Show all posts
Monday, March 19, 2012
Formatting a portion of a String in a TextBox
Sunday, February 26, 2012
format number with decimals
I need to know to format a field that has decimals.
If the decimal portion is .00 then I do not want to display it.
For example:
1234.01 would display as 1234.01
1234.00 would display as 1234
Any help would be great thanks.
Dean
I found the answer:
if int({field})= {field} then
formula = totext({field},"##########")
else
formula = totext({field},"##########.##")
end ifHi,
Try this
if right(Cstr({feild}),3)=".00" then
mid(cstr({feild}),1,len(cstr({feild}))-3)
else
cstr({feild});
Madhivanan
If the decimal portion is .00 then I do not want to display it.
For example:
1234.01 would display as 1234.01
1234.00 would display as 1234
Any help would be great thanks.
Dean
I found the answer:
if int({field})= {field} then
formula = totext({field},"##########")
else
formula = totext({field},"##########.##")
end ifHi,
Try this
if right(Cstr({feild}),3)=".00" then
mid(cstr({feild}),1,len(cstr({feild}))-3)
else
cstr({feild});
Madhivanan
Format number
I am doing some simple arithmatic for a query that I am working on. What I have below describes the arithmatic that is taking place withing a portion of the query:
select(o.sales_val/o.qty_sales) as 'Unit_Price', (o.acctng_cost_val/o.qty_sales) as 'Unit_Cost'
from opcsahf as o
go
The division is correct. My only issue is that the results for 'Unit Price' or 'Unit Cost' may be formatted like example: 4.25000000.
How can I have my nubers show up with only to 2 decimal places instead of all the zeros at teh end?It really is a presentation layer issue..
What are the datatypes of the columns
Did you just try CONVERT(decimal(15,2),....|||Brett,
I went ahead and tryed the convert(decimal(15,2) and everything worked fine. This was the results for the statement:
select convert(decimal (15,2),o.sales_val/ convert(decimal (15,2),o.qty_sales)) as 'Unit_Price', convert(decimal (15,2),o.acctng_cost_val/ convert(decimal (15,2),o.qty_sales)) as 'Unit_Cost'
from opcsahf as o
go
Thanks alot Brett. It did the trick.
Originally posted by Brett Kaiser
It really is a presentation layer issue..
What are the datatypes of the columns
Did you just try CONVERT(decimal(15,2),....
select(o.sales_val/o.qty_sales) as 'Unit_Price', (o.acctng_cost_val/o.qty_sales) as 'Unit_Cost'
from opcsahf as o
go
The division is correct. My only issue is that the results for 'Unit Price' or 'Unit Cost' may be formatted like example: 4.25000000.
How can I have my nubers show up with only to 2 decimal places instead of all the zeros at teh end?It really is a presentation layer issue..
What are the datatypes of the columns
Did you just try CONVERT(decimal(15,2),....|||Brett,
I went ahead and tryed the convert(decimal(15,2) and everything worked fine. This was the results for the statement:
select convert(decimal (15,2),o.sales_val/ convert(decimal (15,2),o.qty_sales)) as 'Unit_Price', convert(decimal (15,2),o.acctng_cost_val/ convert(decimal (15,2),o.qty_sales)) as 'Unit_Cost'
from opcsahf as o
go
Thanks alot Brett. It did the trick.
Originally posted by Brett Kaiser
It really is a presentation layer issue..
What are the datatypes of the columns
Did you just try CONVERT(decimal(15,2),....
Subscribe to:
Posts (Atom)