Showing posts with label displays. Show all posts
Showing posts with label displays. Show all posts

Monday, March 26, 2012

formatting textbox output

I have a report whcih displays information about a servers hardware
configuration. Unfortunatley the vendors application whcih collects and
stores this information, add spcaing between vaules in the form of [-] and
[+].
I'd like to remove this in the final rendering of the report for display
purposes.
see sample output:
ComputerSystem Name[-]ADM-EX01[+]SystemType[-]X86-based
PC[+]Manufacturer[-]Compaq[+]Model[-]ProLiant ML350
G3[+]Domain[-]MARBLEHEAD[+]DomainRole[-]Member
Server[+]NumberOfProcessors[-]2[+]TotalPhysicalMemory[-]2,146,979,840
Anyone have any ideas?
Much appreciated,
RCITGUYUse expression and Replace function. Remember, you can use VB in expressions.
Victor
"RCITGuy" wrote:
> I have a report whcih displays information about a servers hardware
> configuration. Unfortunatley the vendors application whcih collects and
> stores this information, add spcaing between vaules in the form of [-] and
> [+].
> I'd like to remove this in the final rendering of the report for display
> purposes.
> see sample output:
> ComputerSystem Name[-]ADM-EX01[+]SystemType[-]X86-based
> PC[+]Manufacturer[-]Compaq[+]Model[-]ProLiant ML350
> G3[+]Domain[-]MARBLEHEAD[+]DomainRole[-]Member
> Server[+]NumberOfProcessors[-]2[+]TotalPhysicalMemory[-]2,146,979,840
> Anyone have any ideas?
> Much appreciated,
> RCITGUY

Wednesday, March 21, 2012

Formatting NoRows text

Hi,
I'm using a subreport that displays a NoRows message. Is there any way to
format it so that the NoRows message/textbox is different from the normal
subreport (i.e. big and red and ugly so people will notice that their data is
incomplete). Is there a NoRows=True property or something that I can
reference from the font colour expressions?
- DebThe NoRows property derives its style properties from the Subreport report
item.
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"DTimmins" <DTimmins@.discussions.microsoft.com> wrote in message
news:E8E0B589-6BAA-41F7-8C7A-20F752FB4B5C@.microsoft.com...
> Hi,
> I'm using a subreport that displays a NoRows message. Is there any way to
> format it so that the NoRows message/textbox is different from the normal
> subreport (i.e. big and red and ugly so people will notice that their data
> is
> incomplete). Is there a NoRows=True property or something that I can
> reference from the font colour expressions?
> - Deb

Monday, March 19, 2012

Formatting a textbox

I need to format a phone number parameter the user enters. Currently
when I print the parameter entered it displays like this ##########. I
want to format it to look like ###-###-####. Does anyone have any
ideas for making it look like that?E,
RS has a Custom Formatting built in where you can type in ###-###-####
for the Format.
But for phone Numbers the DB probably returns it as a string. You must
first convert it to a Number... a LONG in this case.
So go to report Properties go to Custom Code and put this in there:
Public Function convertToIntegerNow(tempVar2 As String)
convertToIntegerNow= CLng(tempVar2)
End Function
in the cell type in
=Code.convertToIntegerNow(Fields!Phone_Field_name.Value)
Then right click on the cell go to properties, change the format of the
cell to ###-###-####
Hope this helps
regards,
Stas K.

Formatting a Text box

I need to format a phone number parameter the user enters. Currently
when I print the parameter it displays like this ##########.
I want to format it to look like ###-###-####.
It can't be done with SQL, it must be done in the VB of that textbox.
Does anyone have any ideas' It would save me from pulling my last
hair out!!Down and Dirty, but:
=Mid(Fields!homephone.Value,1,3) & "-" & Mid(Fields!homephone.Value,4,3) &
"-" & Mid(Fields!homephone.Value,7,4)
You can substitute the Parameter value as Parameters!PHNumber.Value in place
of Fields!homephone.Value if they are entering the phone number in the
parameter box.
Rodney Landrum
"E" <ericfreiman@.mtgsi.com> wrote in message
news:1144097404.116802.178020@.v46g2000cwv.googlegroups.com...
>I need to format a phone number parameter the user enters. Currently
> when I print the parameter it displays like this ##########.
> I want to format it to look like ###-###-####.
> It can't be done with SQL, it must be done in the VB of that textbox.
> Does anyone have any ideas' It would save me from pulling my last
> hair out!!
>|||Hi,
Just select the cell you want to display with format right click and click
properties and select Format tab on the format field select "..." and click
custom and type "###-####"
Amarnath
"E" wrote:
> I need to format a phone number parameter the user enters. Currently
> when I print the parameter it displays like this ##########.
> I want to format it to look like ###-###-####.
> It can't be done with SQL, it must be done in the VB of that textbox.
> Does anyone have any ideas' It would save me from pulling my last
> hair out!!
>

Formatting a string from the code

I have a textbox that displays the amout of free disk space in megabytes.
I'm working on converting it to gigabytes and if it's less that one gig, I
want to display the string "Critical" bold and in red. Can this be done?
Thanks.This can certainly be done. Where do you want to display the text
'Critical'? If you have another textbox you would use an expression to
determine the value of that checkbox. for example if you were getting the
value from a dataset you would have a similar code to the following in the
expression editor:
=IIf(Fields!Number_Of_Megs < 1024,"","Critical")
Hope this helps
"chalexan" wrote:
> I have a textbox that displays the amout of free disk space in megabytes.
> I'm working on converting it to gigabytes and if it's less that one gig, I
> want to display the string "Critical" bold and in red. Can this be done?
> Thanks.|||Bret or anyone else,
Thanks for the reply. Any suggestions on changing the font's color to red
if it's critical and making it bold?
--Chad|||You will have to do this from the report designer. You can select the
textbox that the text is in and go to the textbox properties. (right click
and properties) From here you can select the format for this text box... A
nice feature is using the Expression Editor to select the font color. This
will allow you to use an IIF() statement to have the font red or black. You
can allow do this with the font weight.
Example of formatting font color in expression editor: (you would put this
in the format expression for the font-color in the designer)
=IIf(Fields!Number_Of_Megs < 1024,"black","red")
"chalexan" wrote:
> Bret or anyone else,
> Thanks for the reply. Any suggestions on changing the font's color to red
> if it's critical and making it bold?
> --Chad|||Bret,
Wow! I thought that the "IIf(" was a typo. That functionality can be very
useful. Thank you so much for explaining that to me.
--Chad

Monday, March 12, 2012

Formating Reports To Print

How can I fixa report that displays correctly on the web page (Report
manager) but when I either print or convert to .pdf, some of the text boxes
shifts to a second and maybe a third ?
The report is actualy smaller than a regular letter page.
Any ideas ?You will have to build the report to render as a pdf. In doing so the
web formatting may look out of allignment but the pdf file will look
right. It is very difficult to get them both to look good.
Also, sometimes placing rectangles behind your report items will
prevent them from going outside the report boundries.
Another thing to check is to make sure the "report" page size and
"body" size properties are matching or similar (ie. set the report page
size to 11 x 8.5 for a Landscape print and set the body size to 10.75 x
8 to fit within the page boundries) and only work with in these
boundries. Take some time to try out different margin settings as
well. Work with it a little and usually you can come up with something
that works in the web and pdf worlds.
Let me know how it goes!

Wednesday, March 7, 2012

Format String

Hi all
I am using a control that i hand a record set to.
One of the columns in the record set displays totals.
I need to format these totals into currency.
What is the best way of doing this?
I would like it to look like this £2,324.40
If possible.
Thanks Heaps
IanWhy not format it in the control? That way the control can apply the
user's preferred currency format settings, which might be harder to do
in the database. In general presentational stuff is best kept separate
from data retrieval. Otherwise, you'll want to take a look at the
various style options of the CONVERT function.
David Portas
SQL Server MVP
--|||Thanks David
I don't have control over the Grid control. Some one else developed it.
Ian
"David Portas" wrote:

> Why not format it in the control? That way the control can apply the
> user's preferred currency format settings, which might be harder to do
> in the database. In general presentational stuff is best kept separate
> from data retrieval. Otherwise, you'll want to take a look at the
> various style options of the CONVERT function.
> --
> David Portas
> SQL Server MVP
> --
>

Format on text box not working as expected

I have a table in a report that is displaying some call duration data. I
have a field that averages the results and displays them. My issue is the
result is often a number with many decimal places (example 15.888883) and I
would like the field to display a whole number (example 15).
In report designer I right click on the cell in the table I wish to alter
and choose properties. In the Textbox Properties window under Format I
select Number and then 1234 (custom code D0) and click OK. I then preview
the report and the number still shows a bunch of decimal places.
When I go back to check the properties of the cell the Format is often reset
back to 'Default' as if it didn't save my select. I've tried using the
Standard and Custom radio buttons under Format but nothing I do seems to
change the display of the number to a nondecimal type. I'm sure I can run a
function that rounds the number but I'd much rather do it in the display as
it seems you should be able to do.
Any help would be appreciated!
Peace,
DanDan,
I'm not aware of this as a bug but if it is try setting it in the
properties window (not the same as right-click|properties) if you can't
see it, press F4. You will see a 'Format' property, set that to d0 or
alternatively try n0 (puts a comma in as a thousands seperator).
Chris
Dan Christjohn wrote:
> I have a table in a report that is displaying some call duration
> data. I have a field that averages the results and displays them. My
> issue is the result is often a number with many decimal places
> (example 15.888883) and I would like the field to display a whole
> number (example 15).
> In report designer I right click on the cell in the table I wish to
> alter and choose properties. In the Textbox Properties window under
> Format I select Number and then 1234 (custom code D0) and click OK. I
> then preview the report and the number still shows a bunch of decimal
> places.
> When I go back to check the properties of the cell the Format is
> often reset back to 'Default' as if it didn't save my select. I've
> tried using the Standard and Custom radio buttons under Format but
> nothing I do seems to change the display of the number to a
> nondecimal type. I'm sure I can run a function that rounds the number
> but I'd much rather do it in the display as it seems you should be
> able to do.
> Any help would be appreciated!
> Peace,
> Dan|||Chris,
Thank you for your reply. d0 did not work and that was a value for format
that I had already tried. n0 however worked great and change the display
from 8.333333336 to 8 exactly the way I want it. Weird how that's not one of
the choices when you rightclick/format and it shows the standard formatting.
Oh well it works, thanks much!
Peace,
Dan
"Chris McGuigan" <chris.mcguigan@.zycko.com> wrote in message
news:ez03hkRiFHA.1204@.TK2MSFTNGP12.phx.gbl...
> Dan,
> I'm not aware of this as a bug but if it is try setting it in the
> properties window (not the same as right-click|properties) if you can't
> see it, press F4. You will see a 'Format' property, set that to d0 or
> alternatively try n0 (puts a comma in as a thousands seperator).
> Chris
>
> Dan Christjohn wrote:
>> I have a table in a report that is displaying some call duration
>> data. I have a field that averages the results and displays them. My
>> issue is the result is often a number with many decimal places
>> (example 15.888883) and I would like the field to display a whole
>> number (example 15).
>> In report designer I right click on the cell in the table I wish to
>> alter and choose properties. In the Textbox Properties window under
>> Format I select Number and then 1234 (custom code D0) and click OK. I
>> then preview the report and the number still shows a bunch of decimal
>> places.
>> When I go back to check the properties of the cell the Format is
>> often reset back to 'Default' as if it didn't save my select. I've
>> tried using the Standard and Custom radio buttons under Format but
>> nothing I do seems to change the display of the number to a
>> nondecimal type. I'm sure I can run a function that rounds the number
>> but I'd much rather do it in the display as it seems you should be
>> able to do.
>> Any help would be appreciated!
>> Peace,
>> Dan
>|||Hi,
I just had the exact same problem. Choosing D0 does not work, but N0
does. This behaviour is weird and should be fixed because N0 puts a
comma in there.
e.g.
source = 2793.333333
D0 = 2793.333333
N0 = 2,793
When what I really want is 2793!! I think this is a bug. Internally,
the casting from float (with decimal) places is not being converted to
integeter properly.|||I think n with no zero will remove the comma but I'd have to test it to be
sure.
"Roy Assaly" <royassaly@.gmail.com> wrote in message
news:1121885650.591601.179260@.g43g2000cwa.googlegroups.com...
> Hi,
> I just had the exact same problem. Choosing D0 does not work, but N0
> does. This behaviour is weird and should be fixed because N0 puts a
> comma in there.
> e.g.
> source = 2793.333333
> D0 = 2793.333333
> N0 = 2,793
> When what I really want is 2793!! I think this is a bug. Internally,
> the casting from float (with decimal) places is not being converted to
> integeter properly.
>|||Hi Dan,
Just tested it:
source = 2793.333333
n = 2793.33
N = 2793.33
No difference. I still believe that D0 is the problem and that it's a
bug.|||'n' on it's own will always default to 2 decimal places.
I think the 'D' issue is because d or D is also a date format code it
may be getting confused!?!
You may want to consider custom format codes.
#0 or ## will give you 2793 with no commas. Using this you can specify
different formatting for positive, negative and zero numbers.
i.e. a format code of #,#;(#,#);"zero" would produce
2793 = 2,793
-2793 = (2,793)
0 = zero
Look up custom format codes in msdn vb help.
Chris
Roy Assaly wrote:
> Hi Dan,
> Just tested it:
> source = 2793.333333
> n = 2793.33
> N = 2793.33
> No difference. I still believe that D0 is the problem and that it's a
> bug.