Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Sunday, March 25, 2012

Can we a use a CSS or equivalent for a reports(RDLC File)

Hi,

I will be using RDLC files to display reports in various pages.

My Question is this.

I need to use the same type of formatting of color,fonts,font sizes and the background colors so that the same can be used across the reports.

This is somewhat like using a CSS file for aspx pages.

Any ideas... , solution........, .......

Hi,

Just wondering!

We have CSS for the aspx and the HTML pages.

Are there no ways to set a golbal standard for the Reports( Ok, be it a Server report or a local report.). Is it not correct what I am asking.

|||I've been looking into this also, and I found some old threads stating that themes and css are not supported but that they may be in the next version.|||

Hello,

Formatting for reports can be expression based. Create your reports using a standard formula for similar items and pass in values through a dataset. Another option would be to take formatting information in as parameters. The RDL file is just an XML file, you could modify it directly if you want. Here is a link to information on programmatically generating RDLs: http://technet.microsoft.com/en-us/library/ms154583.aspx. RDLs and RDLCs are very similar, and the same techniques could be used.

Good luck,

Larry

|||I need a clarification.

How do I assign a class in the css to a text box.

Say I have a class .txtboxTahomaBold in the CSS, how do I assign the class to the textbox. I do not find any property for the controls (textbox, table .... )|||

I am sorry to have misslead you. You do not get to assign CSS to the textboxes, but you can assign the regular SSRS formatting to each text box on a report prior to displaying it. The easiest way would be to create formulas within the report based on data that you provide through a dataset. For example, set the Font formula to =FieldsTextBoxTahomaBold.Value and have the dataset pass in the string "Normal, Tahoma, 11pt, Bold". Of course, you could also modify the XML, but that is more trouble than it is worth.

I will try and get an example written up on my blog. I will post a link here when I do.

Larry

|||

Thanks.

Waiting for your reply.

|||

Formatting your report based on the user or the data is relatively straight forward once you get the trick. To demonstrate, create a report with a valid connection to an instance of Microsoft SQL Server and use the following SQL as your query:

Code Snippet

SELECT
CASE @.param
WHEN 0 THEN 'Blue'
WHEN 1 THEN 'Red'
END AS color,
CASE @.param
WHEN 0 THEN '12pt'
WHEN 1 THEN '24pt'
END AS size

and create five text boxes with the following attributes:
TextBox1
Value: Color
Color: =First(Fields!color.Value)

TextBox2
Value: Size
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox3
Value: Both
Color: =First(Fields!color.Value)
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox4
Value: =First(Fields!color.Value)

TextBox5
Value: =First(Fields!size.Value)

Sorry for the delay. The article at http://smithmier.com/blog/?p=38 has a picture of the results, but it really isn't required to understand the concept.

|||

Hi Larry,

Thanks for the post.

I will check it out.

Can we a use a CSS or equivalent for a reports(RDLC File)

Hi,

I will be using RDLC files to display reports in various pages.

My Question is this.

I need to use the same type of formatting of color,fonts,font sizes and the background colors so that the same can be used across the reports.

This is somewhat like using a CSS file for aspx pages.

Any ideas... , solution........, .......

Hi,

Just wondering!

We have CSS for the aspx and the HTML pages.

Are there no ways to set a golbal standard for the Reports( Ok, be it a Server report or a local report.). Is it not correct what I am asking.

|||I've been looking into this also, and I found some old threads stating that themes and css are not supported but that they may be in the next version.|||

Hello,

Formatting for reports can be expression based. Create your reports using a standard formula for similar items and pass in values through a dataset. Another option would be to take formatting information in as parameters. The RDL file is just an XML file, you could modify it directly if you want. Here is a link to information on programmatically generating RDLs: http://technet.microsoft.com/en-us/library/ms154583.aspx. RDLs and RDLCs are very similar, and the same techniques could be used.

Good luck,

Larry

|||I need a clarification.

How do I assign a class in the css to a text box.

Say I have a class .txtboxTahomaBold in the CSS, how do I assign the class to the textbox. I do not find any property for the controls (textbox, table .... )|||

I am sorry to have misslead you. You do not get to assign CSS to the textboxes, but you can assign the regular SSRS formatting to each text box on a report prior to displaying it. The easiest way would be to create formulas within the report based on data that you provide through a dataset. For example, set the Font formula to =FieldsTextBoxTahomaBold.Value and have the dataset pass in the string "Normal, Tahoma, 11pt, Bold". Of course, you could also modify the XML, but that is more trouble than it is worth.

I will try and get an example written up on my blog. I will post a link here when I do.

Larry

|||

Thanks.

Waiting for your reply.

|||

Formatting your report based on the user or the data is relatively straight forward once you get the trick. To demonstrate, create a report with a valid connection to an instance of Microsoft SQL Server and use the following SQL as your query:

Code Snippet

SELECT
CASE @.param
WHEN 0 THEN 'Blue'
WHEN 1 THEN 'Red'
END AS color,
CASE @.param
WHEN 0 THEN '12pt'
WHEN 1 THEN '24pt'
END AS size

and create five text boxes with the following attributes:
TextBox1
Value: Color
Color: =First(Fields!color.Value)

TextBox2
Value: Size
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox3
Value: Both
Color: =First(Fields!color.Value)
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox4
Value: =First(Fields!color.Value)

TextBox5
Value: =First(Fields!size.Value)

Sorry for the delay. The article at http://smithmier.com/blog/?p=38 has a picture of the results, but it really isn't required to understand the concept.

|||

Hi Larry,

Thanks for the post.

I will check it out.

Tuesday, March 20, 2012

Can this be done?

Hello,

I have been trying to figure out what seems to be a simple task:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?

I also tried this: The below code sets the value for MYTEXTBOX. If the value in “MyField” of my dataset = “0.0”, I want MYTEXTBOX to hold the value of “MyRelatedField” (so another field within the same row of my dataset). Otherwise, DO NOTHING!!!!!, but because all functions MUST return a value, I attempted to return the value of MYTEXTBOX—hence setting it equal to what it already is, but this give me #ERROR!

=iif(Fields!MyField.Value = "0.0",Fields!MyRelatedField.Value, ReportItems!MYTEXTBOX.Value)

I have read the wrox reporting service book from front to back, and what seems like pie is giving me a grief—any help, link or advice would be so much appreciated!...much thanks, John

It could be done through some custom code. Store the data set element access code in a little class and refer it from the report

http://msdn2.microsoft.com/en-us/library/ms155798.aspx

|||

Johnny606 wrote:

I have a dataset (of 10 rows) and a text box. You are to display the value found in the 3rd row, first column of my dataset into that textbox. You may not alter the dataset.

I want to know how this can be done. Is there a way to loop through the dataset programmatically in a function?


What about saving the first dataset into a multivalue report parameter (make it internal or hidden if you do not want users to see it)
Make a 2nd dataset that selects top 3 from the multivalue parameter.

The textfield value should then be something like =Last(Fields!<nameOfField>.Value, "<name of 1st dataset>")

That way you have not changed the first dataset and you get the correct value in your text box

I cannot test it at the moment so it might not work (I'm in the middle of installing the SP2 CTP and have a little time for surfing while it's doing its thing) :-)

Monday, March 19, 2012

Can This Be Done - Display Yes/No parameters using a check box

I have a parameters that is either yes or no, I want to be able to show this
parameter in a checkbox - for the parameter of Yes, the check box needs to
show all the Yes answers, if they want the No answers that want to uncheck
the box.
Can this be done? Any information on how?
thanks
noraWithout custom programming, the only way to get check boxes in the parameter
area of SSRS is
1. to allow Nulls ( you get a check box to say the value is null)
2. Have a multi-select list box, populated with Yes, No... You could select
both however..
Otherwise you are stuck with Radio buttons or regular lists... ( or put an
html page in front of the report, with your check boxes, and let the html
page call the Report URL)
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.
See you at the PASS Conference!
"NormaD" wrote:
> I have a parameters that is either yes or no, I want to be able to show this
> parameter in a checkbox - for the parameter of Yes, the check box needs to
> show all the Yes answers, if they want the No answers that want to uncheck
> the box.
> Can this be done? Any information on how?
> thanks
> nora

Can the data viewers display Chinese characters?

Is there a way to change the font that the data viewer uses, so that the Chinese characters don't appear as boxes?

The data viewer displays Chinese characters as boxes, something similar to [_], at least on a computer with the following regional settings.

get-wmiobject CIM_OperatingSystem | ft OSLanguage, CodeSet, Locale


OSLanguage CodeSet Locale

- -

1033 1252 0409

The data itself is flowing correctly into the target database with a pipeline data_type of DT_WSTR. The ideograms can be seen by query utilities which supports a unicode font (e.g. Management Studio).

Yes, follow
Tools > Options > Environment > Fonts and Colors, then
select Show settings for: Business Intelligence Data Viewers.
Now select the font you want to use.|||Thanks a lot Michael, works great.

Can the data viewers display Chinese characters?

Is there a way to change the font that the data viewer uses, so that the Chinese characters don't appear as boxes?

The data viewer displays Chinese characters as boxes, something similar to [_], at least on a computer with the following regional settings.

get-wmiobject CIM_OperatingSystem | ft OSLanguage, CodeSet, Locale


OSLanguage CodeSet Locale

- -

1033 1252 0409

The data itself is flowing correctly into the target database with a pipeline data_type of DT_WSTR. The ideograms can be seen by query utilities which supports a unicode font (e.g. Management Studio).

Yes, follow
Tools > Options > Environment > Fonts and Colors, then
select Show settings for: Business Intelligence Data Viewers.
Now select the font you want to use.|||Thanks a lot Michael, works great.

Sunday, March 11, 2012

Can the "money" datatype be constrained to two decimal places?

I have a column that is a "money" datatype, which returns a four decimal
place value. It is a bit of a hassle to format this for display. Is there
anyway to default this to two decimal places?No, the datatype cannot be changed.
Look at CAST and CONVERT and you will see that there is a style that you can
use with CONVERT to return the value with 2 decimal places. (Or you could
stop using money and use DECIMAL if that meets your need.)
Russell Fields
"Top Gun" <nfr@.nospam.com> wrote in message
news:OyqMHnk8DHA.2540@.TK2MSFTNGP11.phx.gbl...
> I have a column that is a "money" datatype, which returns a four decimal
> place value. It is a bit of a hassle to format this for display. Is there
> anyway to default this to two decimal places?
>|||No, change to decimal as Russell suggests... But the benefit of using money
is that the front-end application should be able to recognize and format the
data to 2 decimals using localization... Many folks need the 4 decimals for
increased accuracy, then round for display...
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Top Gun" <nfr@.nospam.com> wrote in message
news:OyqMHnk8DHA.2540@.TK2MSFTNGP11.phx.gbl...
> I have a column that is a "money" datatype, which returns a four decimal
> place value. It is a bit of a hassle to format this for display. Is there
> anyway to default this to two decimal places?
>

Can the "money" datatype be constrained to two decimal places?

I have a column that is a "money" datatype, which returns a four decimal
place value. It is a bit of a hassle to format this for display. Is there
anyway to default this to two decimal places?No, the datatype cannot be changed.
Look at CAST and CONVERT and you will see that there is a style that you can
use with CONVERT to return the value with 2 decimal places. (Or you could
stop using money and use DECIMAL if that meets your need.)
Russell Fields
"Top Gun" <nfr@.nospam.com> wrote in message
news:OyqMHnk8DHA.2540@.TK2MSFTNGP11.phx.gbl...
> I have a column that is a "money" datatype, which returns a four decimal
> place value. It is a bit of a hassle to format this for display. Is there
> anyway to default this to two decimal places?
>|||No, change to decimal as Russell suggests... But the benefit of using money
is that the front-end application should be able to recognize and format the
data to 2 decimals using localization... Many folks need the 4 decimals for
increased accuracy, then round for display...
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Top Gun" <nfr@.nospam.com> wrote in message
news:OyqMHnk8DHA.2540@.TK2MSFTNGP11.phx.gbl...
> I have a column that is a "money" datatype, which returns a four decimal
> place value. It is a bit of a hassle to format this for display. Is there
> anyway to default this to two decimal places?
>

Sunday, February 19, 2012

Can Reportviewer control size be dynamic

When using an asp.net 2.0 reportviewer control to display an SSRS report, the size of the report is always bigger that the control it is housed in. So you have to scroll back and forth.

Can't the Reportviewer control size be dynamic? What is the general parctice on this?

Thanks

ReportControl and SSRS newbie!

Hi,

I'm not sure what do you mean by "control the size dynamically". Based on my knowledge, if the report does not need to scroll verticall within the iframe, you can handle it in two ways.

First, assign the height, width value in a hard coded way, you can refer the following code which shares the solution.
http://www.codeproject.com/sqlrs/ReportViewer2005.asp

Second, you can set two properties to make the repoertviewer autosize:

AsyncRendering = false; and SizeToReportContent = true;

Thanks.

Thursday, February 16, 2012

can Profiler display port number?

Where - in SQL Server Profiler - can I see the port number that someone has used to connect to a database?

e.g. given the connect string "tcp:MACHINE1\INSTANCE7,3045" - where in Profiler does it tell me that the connection is using port 3045? I looked at "audit login" and "existing connection" but I don't see a port number...

Any other SQL/Windows tools that I can use to monitor connections to databases on specific ports?

thanks

Hi,

open ports can be monitored using the commandline tool netstat -a.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Tuesday, February 14, 2012

Can not Update/Insert big5 characters in to sql server 2000

I have current current sql server 2000 database containing some columns in big5. To display these cols correctly, my asp.net nust have directive with CodePage="1252" ContentType="text/html;charset=BIG5". I can not update, or insert big5 character into these columns via .aspx page. I'm using .net framework 2.0.

Please help me, thanks a lot for any help.

The quick question is why are you using Latin code page to save data going into a Chinese alphabet database column?|||

I really don't want to use that method, but it's a legacy database used with asp. We are migrating to asp.net while the asp version's still running. So, I can not change it. But your question may give me some ideas, thank you very much.

By the way, I've try the solution in http://forums.asp.net/518209/ShowPost.aspx, It seem to be ok. But there're some words becoming '?' after updated into database.

Any hints for me

|||

I have read that thread but not everything the person said is correct so here is what you to avoid character conversion, in VS2005 the advanced option let you save your code with code pages any langauge, and you can also do encoding of the page when you save it. These will help you with the application layer but also make sure you use column level collation in the database because the Latin alphabet is 26 characters, the Chinese is more than 2000 characters, they cannot be passed arround as you want. The links below will help you. Hope this helps.

https://www.microsoft.co.ke/middleeast/msdn/arabicsupp.aspx#7

http://www.developerland.com/DotNet/General/99.aspx

|||

ThankCaddre very much,

I'll read them. My important problem is: I cannot column change the 'level collation in the database' as you said because it's a legacy database. Actually, I don't know much 'bout it. I'll check with my DBA.

regards,

|||If your database is in SQL Server 7.0 youmust migrate it or you cannot store Chinese in it correctly. Hope this helps.|||

thanks a lot,

I'm using sql server 2000, and I'm trying to use UTF-8 charset only

|||

You cannot use UTF-8 in SQL Server because SQL Server uses UC-S 2 a version of UTF-16 but here is a thread I helped someone do Chinese collation in SQL Server 2000. But you can do encoding in the application layer in UTF-8. Hope this helps.

http://forums.asp.net/1067798/ShowPost.aspx