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

Wednesday, March 28, 2012

how to show the month name?

I am using

selectmonth(date_field)

to display the month but it's showing the month number and I want to show as names, e.g. Jan, Feb, Mar. etc..

|||

Jassim:

Lookup the DATENAME function in books online; it should be something like:

select datename (mm, date_field)

Or if you want to only show the first three letters of the month:

select left(datename (mm, date_field), 3)

|||Select Convert(Varchar(3),Datename(mm,getdate()))

how to show the month name?

I am using

selectmonth(date_field)

to display the month but it's showing the month number and I want to show as names, e.g. Jan, Feb, Mar. etc..

|||

Jassim:

Lookup the DATENAME function in books online; it should be something like:

select datename (mm, date_field)

Or if you want to only show the first three letters of the month:

select left(datename (mm, date_field), 3)

|||Select Convert(Varchar(3),Datename(mm,getdate()))

How to show the border of the table?

hi,
How to adjust/display/hide the table border(including all cells)?
I see in the property page, there is a BorderStyle for the table, but it only changes the outline of the table border style, I want to change the border style including all cells, like we did in html page, is there an easy way to do this, or I have to make the setting for all cells?

Thanks

I don't think there is a way to force gridlines for the table. You'll probably need to specify the borders of the cells.|||

Oh...
When I created a report table by the wizard, it can be set to have the gridlines. From the rdl file, seems it sets this for each cell, not the whole table.

sql

How to show result for each day of the past 30 days?

Hello,

I would like to show the result fo each day of the past 30 days. I might not have data to display for everyday but I still want the date to show up
01/27/2007 resultA
01/28/2007 resultB
01/29/2007 .
...
02/26/2007 resultC
02/27/2007 resultD

Thanks for your help
Arnold

If there is a possibility there could be no records for each day in the column, you might have to build this table manually. If the records do exist you can do a GROUP BY convert(Varchar,datefield, 101). You can probably create a stored proc , use a table variable with the 2 columns and insert data into it and finally do a SELECT from it.|||

Could you give me an example for the table variable as I have no idea on how to build that.

Thanks

|||

Just to give you an idea here's a sample. You might need to build your code on top of this (if this works for you).

declare @.ttable( Datecoldatetime, col2varchar(50))Declare @.mindatedatetime, @.maxDatedatetime, @.daysint,Set @.mindate ='01/27/2007'Set @.maxDate ='02/27/2007'while (datediff(d,@.mindate,@.maxdate) >= 0 )BeginInsert into @.t (Datecol, col2)Values (@.mindate )set @.mindate = @.mindate + 1--Another Query to get the results for date = @.mindateEndselect *from @.t

How to show duplicates in reports

I'm trying to create a report in Sql Server 2005 Reporting Services where it will display duplicates rows in the reports. I'm unable to find the property that enables this. I would need something like HideDuplicates = false, but that is not the way it is intended to be used. If HideDuplicates is left blank, it seems to still hide duplicate values if the preceding row matches.

The report is a crosstab type, so we are using a Matrix for the report item. I'll illustrate with a simple example:

This is what we currently get:

CatagoryClassDetail
Type 1AItem 1
BItem 2
Item 3
Type 2AItem 4
BItem 5

This is what we want:

CatagoryClassDetail
Type 1AItem 1
Type 1BItem 2
Type 1BItem 3
Type 2AItem 4
Type 2BItem 5

I'm sure its something simple, but we just cant seem to find the solution,

Thanks

Darin

Rather than using a matrix report, I think a simple list report would do what you are looking for (if you don't do any grouping). You can still use aggreated fields in the simple list report.

|||

Unfortunately we need to use a matrix as the actual report is a crosstab, I just didn't illustrate that in the example for simplicity sake.

I think the report looks nicer with the blanks and is easier to read; however, if it is dumped to Excel for further analysis ( which in our actual report will happen often), the auto filter function will not work as the blank rows are not included if a specifiec catagory is selected. Only the first row that is allgned with the merged cells is shown.

|||

Open the code view of the report and search for the XML node called "HideDuplicates". See http://msdn2.microsoft.com/en-us/library/ms152916.aspx for on how to set. Removing the element entirely will cause the values to appear in each row on the report, like you'd want to have for use in Excel.

My problem is related. I have business analysts using the Report Builder tool basically as a querying tool. 90% of the time, they export to Excel and then crunch there. While I know this is not intended usage of Reporting Services, I am still disappointed by the fact that, in order to get duplicates to appear, you must go code-side, something I can't push off on a BA.

Any ideas for editting a Report Builder generated report file on the fly, to remove "HideDuplicates" elements?

|||

Try setting the "HideDuplicate" property on the "Type 1" textbox in your report.

Here are the defintion of the Textbox properties:

=========================================

Textbox

The Textbox element has the following attributes/elements in addition to what it inherits from ReportItem:

Attributes/Elements

Name

Card

Type

Description

Value

1

Expression

(Variant)

An expression, the value of which is displayed in the text-box.

This can be a constant expression for constant labels.

CanGrow

0-1

Boolean

Indicates the Textbox size can increase to accommodate the contents

CanShrink

0-1

Boolean

Indicates the Textbox size can decrease to match the contents

HideDuplicates

0-1

String

Indicates the text should not be displayed when the value of the expression associated with the report item is the same as the preceding instance.The value of HideDuplicates is the name of a containing grouping (other than the current grouping) or data set over which to apply the hiding.Each time a new instance of that group is encountered, the first instance of this report item will not be hidden. Rows on a previous page are ignored for the purposes of hiding duplicates.If the textbox is in a table or matrix cell, only the text will be omitted.The textbox will remain to provide background and border for the cell.Outside of a table/matrix cell, the background and borders are omitted as well.

Ignored in matrix subtotals.

ToggleImage

0-1

Element

Indicates the initial state of a toggling image should one be displayed as a part of the textbox.

UserSort

0-1

Element

Indicates an end-user sort control should be displayed as a part of this textbox in the UI.

DataElementStyle

0-1

Enum

Indicates whether textbox value should render as an element or attribute: Auto (Default) | AttributeNormal | ElementNormal. Auto uses the setting on the Report element.

|||Sorry for the late reply, but the 'HideDuplicates' element is nowhere to be found in the report definition.|||I've tried setting the HideDuplicates to a number of the values available in the dropdown list and it still does not solve my problem. Other than that, I really dont know what to set it to.|||You have to change the DiscourageGrouping Property on the fields you don't want the report to be hidden when grouped. Do it on the Report Model Designer.

Regards

How to show duplicates in reports

I'm trying to create a report in Sql Server 2005 Reporting Services where it will display duplicates rows in the reports. I'm unable to find the property that enables this. I would need something like HideDuplicates = false, but that is not the way it is intended to be used. If HideDuplicates is left blank, it seems to still hide duplicate values if the preceding row matches.

The report is a crosstab type, so we are using a Matrix for the report item. I'll illustrate with a simple example:

This is what we currently get:

CatagoryClassDetail
Type 1AItem 1
BItem 2
Item 3
Type 2AItem 4
BItem 5

This is what we want:

CatagoryClassDetail
Type 1AItem 1
Type 1BItem 2
Type 1BItem 3
Type 2AItem 4
Type 2BItem 5

I'm sure its something simple, but we just cant seem to find the solution,

Thanks

Darin

Rather than using a matrix report, I think a simple list report would do what you are looking for (if you don't do any grouping). You can still use aggreated fields in the simple list report.

|||

Unfortunately we need to use a matrix as the actual report is a crosstab, I just didn't illustrate that in the example for simplicity sake.

I think the report looks nicer with the blanks and is easier to read; however, if it is dumped to Excel for further analysis ( which in our actual report will happen often), the auto filter function will not work as the blank rows are not included if a specifiec catagory is selected. Only the first row that is allgned with the merged cells is shown.

|||

Open the code view of the report and search for the XML node called "HideDuplicates". See http://msdn2.microsoft.com/en-us/library/ms152916.aspx for on how to set. Removing the element entirely will cause the values to appear in each row on the report, like you'd want to have for use in Excel.

My problem is related. I have business analysts using the Report Builder tool basically as a querying tool. 90% of the time, they export to Excel and then crunch there. While I know this is not intended usage of Reporting Services, I am still disappointed by the fact that, in order to get duplicates to appear, you must go code-side, something I can't push off on a BA.

Any ideas for editting a Report Builder generated report file on the fly, to remove "HideDuplicates" elements?

|||

Try setting the "HideDuplicate" property on the "Type 1" textbox in your report.

Here are the defintion of the Textbox properties:

=========================================

Textbox

The Textbox element has the following attributes/elements in addition to what it inherits from ReportItem:

Attributes/Elements

Name

Card

Type

Description

Value

1

Expression

(Variant)

An expression, the value of which is displayed in the text-box.

This can be a constant expression for constant labels.

CanGrow

0-1

Boolean

Indicates the Textbox size can increase to accommodate the contents

CanShrink

0-1

Boolean

Indicates the Textbox size can decrease to match the contents

HideDuplicates

0-1

String

Indicates the text should not be displayed when the value of the expression associated with the report item is the same as the preceding instance.The value of HideDuplicates is the name of a containing grouping (other than the current grouping) or data set over which to apply the hiding.Each time a new instance of that group is encountered, the first instance of this report item will not be hidden. Rows on a previous page are ignored for the purposes of hiding duplicates.If the textbox is in a table or matrix cell, only the text will be omitted.The textbox will remain to provide background and border for the cell.Outside of a table/matrix cell, the background and borders are omitted as well.

Ignored in matrix subtotals.

ToggleImage

0-1

Element

Indicates the initial state of a toggling image should one be displayed as a part of the textbox.

UserSort

0-1

Element

Indicates an end-user sort control should be displayed as a part of this textbox in the UI.

DataElementStyle

0-1

Enum

Indicates whether textbox value should render as an element or attribute: Auto (Default) | AttributeNormal | ElementNormal. Auto uses the setting on the Report element.

|||Sorry for the late reply, but the 'HideDuplicates' element is nowhere to be found in the report definition.|||I've tried setting the HideDuplicates to a number of the values available in the dropdown list and it still does not solve my problem. Other than that, I really dont know what to set it to.sql

How to show duplicates in reports

I'm trying to create a report in Sql Server 2005 Reporting Services where it will display duplicates rows in the reports. I'm unable to find the property that enables this. I would need something like HideDuplicates = false, but that is not the way it is intended to be used. If HideDuplicates is left blank, it seems to still hide duplicate values if the preceding row matches.

The report is a crosstab type, so we are using a Matrix for the report item. I'll illustrate with a simple example:

This is what we currently get:

Catagory Class Detail
Type 1 A Item 1
B Item 2
Item 3
Type 2 A Item 4
B Item 5

This is what we want:

Catagory Class Detail
Type 1 A Item 1
Type 1 B Item 2
Type 1 B Item 3
Type 2 A Item 4
Type 2 B Item 5

I'm sure its something simple, but we just cant seem to find the solution,

Thanks

Darin

Rather than using a matrix report, I think a simple list report would do what you are looking for (if you don't do any grouping). You can still use aggreated fields in the simple list report.

|||

Unfortunately we need to use a matrix as the actual report is a crosstab, I just didn't illustrate that in the example for simplicity sake.

I think the report looks nicer with the blanks and is easier to read; however, if it is dumped to Excel for further analysis ( which in our actual report will happen often), the auto filter function will not work as the blank rows are not included if a specifiec catagory is selected. Only the first row that is allgned with the merged cells is shown.

|||

Open the code view of the report and search for the XML node called "HideDuplicates". See http://msdn2.microsoft.com/en-us/library/ms152916.aspx for on how to set. Removing the element entirely will cause the values to appear in each row on the report, like you'd want to have for use in Excel.

My problem is related. I have business analysts using the Report Builder tool basically as a querying tool. 90% of the time, they export to Excel and then crunch there. While I know this is not intended usage of Reporting Services, I am still disappointed by the fact that, in order to get duplicates to appear, you must go code-side, something I can't push off on a BA.

Any ideas for editting a Report Builder generated report file on the fly, to remove "HideDuplicates" elements?

|||

Try setting the "HideDuplicate" property on the "Type 1" textbox in your report.

Here are the defintion of the Textbox properties:

=========================================

Textbox

The Textbox element has the following attributes/elements in addition to what it inherits from ReportItem:

Attributes/Elements

Name

Card

Type

Description

Value

1

Expression

(Variant)

An expression, the value of which is displayed in the text-box.

This can be a constant expression for constant labels.

CanGrow

0-1

Boolean

Indicates the Textbox size can increase to accommodate the contents

CanShrink

0-1

Boolean

Indicates the Textbox size can decrease to match the contents

HideDuplicates

0-1

String

Indicates the text should not be displayed when the value of the expression associated with the report item is the same as the preceding instance.The value of HideDuplicates is the name of a containing grouping (other than the current grouping) or data set over which to apply the hiding.Each time a new instance of that group is encountered, the first instance of this report item will not be hidden. Rows on a previous page are ignored for the purposes of hiding duplicates.If the textbox is in a table or matrix cell, only the text will be omitted.The textbox will remain to provide background and border for the cell.Outside of a table/matrix cell, the background and borders are omitted as well.

Ignored in matrix subtotals.

ToggleImage

0-1

Element

Indicates the initial state of a toggling image should one be displayed as a part of the textbox.

UserSort

0-1

Element

Indicates an end-user sort control should be displayed as a part of this textbox in the UI.

DataElementStyle

0-1

Enum

Indicates whether textbox value should render as an element or attribute: Auto (Default) | AttributeNormal | ElementNormal. Auto uses the setting on the Report element.

|||Sorry for the late reply, but the 'HideDuplicates' element is nowhere to be found in the report definition.|||I've tried setting the HideDuplicates to a number of the values available in the dropdown list and it still does not solve my problem. Other than that, I really dont know what to set it to.

Monday, March 26, 2012

how to show binary data in report

I want to display the content stored in image column. Can anyone tell me how?
The content is actually XML text, encoded and stored in a image type.This link should help you.
http://msdn2.microsoft.com/en-us/library/aa179439(SQL.80).aspx
Also if you have the Sample Reports installed the Product Catalog report
shows you how to do this.
--
Andy Potter
blog : http://sqlreportingservices.spaces.live.com
info@.(NOSPAM)lakeclaireenterprises.com
"Jason Wang" <JasonWang@.discussions.microsoft.com> wrote in message
news:2D1F3430-D9B7-499D-B77E-0CF6DC464F21@.microsoft.com...
>I want to display the content stored in image column. Can anyone tell me
>how?
> The content is actually XML text, encoded and stored in a image type.

How to show a rectangle in a SQL report

Does anyone know how I can display a rectangle in the rendered SQL report?
I need this to assist the users of the report to have an area in the printed
report column so that they could do a manual check mark or some kind of a
mark on the rows of the report. I tried to place an image but it slows the
report rendering. Thanks in advance.
--
Thanks,
SDRoyIf you are using a table you could do this:
1.In one of the text boxes, drag a rectangle. This will allow you to
drop other items within the texbox/rectangle.
2. Within that rectangle, draw another rectangle to be the "checkbox".
3. Set the borders appropriately to display an outline (set top,
bottom, left, and right BorderStyle to Solid)
If you are free form designing a report with lists, just drop the
rectangle, resize, and set the borders as in above.
Let me know if I've misunderstood the requirements.
Regards,
Dan|||Hi Dan:
Thanks for the gr8 idea. It worked perfect ! That's how I wanted.
Once again, thank you so much.
--
Thanks,
SDRoy
"Dan" wrote:
> If you are using a table you could do this:
>
> 1.In one of the text boxes, drag a rectangle. This will allow you to
> drop other items within the texbox/rectangle.
> 2. Within that rectangle, draw another rectangle to be the "checkbox".
> 3. Set the borders appropriately to display an outline (set top,
> bottom, left, and right BorderStyle to Solid)
> If you are free form designing a report with lists, just drop the
> rectangle, resize, and set the borders as in above.
> Let me know if I've misunderstood the requirements.
> Regards,
> Dan
>sql

How to show a linked report in a report container?

I have a report container (reportviewer.dll) in a .net web page to display
the reports using the reporting services. Some of the reportds are linked
report and I am not sure how to display it in the report container.
Currently it opens on a new page. Thanks.I have the same problem...
Any luck with that?
--
http://dotnet.org.za/stanley
"Paul" wrote:
> I have a report container (reportviewer.dll) in a .net web page to display
> the reports using the reporting services. Some of the reportds are linked
> report and I am not sure how to display it in the report container.
> Currently it opens on a new page. Thanks.
>
>

Monday, March 19, 2012

How to set two or more queries in one report

I'm having a problem with accessing two or more data sources and display in a single report(same paper). I'm using CR XI Dev. Ed. and VB 6.0 sp6

For example:

I have a table named 'Patients' and the fields are,

Name, Date_Admitted, Date_Discharged

The first sql query is

Select * from Patients Where Date_Admitted = 'Date'

then the second query is

Select * from Patients Where Name = 'James'

How will I display this two diffrent sql queries in a single report(same paper)?

Please! anyone! help me!!!See reply in other forum.|||Thanks for the reply! But I have another question if it's ok with you?

I managed to add a sub report on my main report, but how do I make it appear this way?

Example:

The given first sql query is

"Select * from Patients Where Date_Admitted = 'Date'"

Then display all the data in the first statement first

[Name][Date Admitted][Date_Discharged]

[Jay][8/15/2006][8/16/2006]
[John][8/15/2006][8/16/2006]
[Bob][8/15/2006][8/16/2006]

Then execute the second query

"Select * from Patients Where Name = 'James'"

Then display all the data in the second statement

[Name][Date Admitted] [Date_Discharged]

[James][8/9/2006][8/10/2006]
[James][8/6/2006][8/7/2006]
[James][8/10/2006][8/12/2006]

Then the final output would be like this

[Name][Date Admitted][Date_Discharged]

[Jay][8/15/2006][8/16/2006]
[John][8/15/2006][8/16/2006]
[Bob][8/15/2006][8/16/2006]

[Name][Date Admitted] [Date_Discharged]

[James][8/9/2006][8/10/2006]
[James][8/6/2006][8/7/2006]
[James][8/10/2006][8/12/2006]