Saturday, February 25, 2012

Displaying a word document via Reporting Services?

Does anyone know a way to (given a path to the file) display a word document via a reporting services report?

Thanks

This is not possible out-of-the-box. You could implement a custom renderer to do this.

You can publish Word documents into the Report Server catalog and browse them, though, you just can't embed them in reports.

|||I'm not sure what you mean by Report Server Catalog? Where can I read how to do this? I searched the documentation for "report server catalog" and couldn't find any hits. Is this another extension?|||

"Report Server Catalog" refers to the report server metadata database.

In report manager, you can upload reports and you can upload other files, for instance Word documents. You could then add hyperlinks to reports to link to these Word documents stored on the report server (in the metadata database), but you cannot directly embed these documents within reports.

-- Robert

|||Oh, sure! I have already uploaded PDFs, I thought it was something different. Thank you for the clarification!

Displaying a trend line (in line chart) in SSRS

We have a line graph which plots the actual data points (x,y), everything is working fine with this graph. Now we need to add a trend line to this existing graph after going thro. the articles we came to know that there is no direct option in SSRS to draw a trend line. So we need to calculate the trend values ourselves which we need to plot as atrend line. This trend line is similar to the trend line which comes in Excel chart, do anyone know how to calculate the trend values from the actual data points. We got through several formulas, but were not clear, have anyone tried out exactly the same, if so please help us out by providing an example to calculate the trend values.

The default functionality of Reporting Services does not support trend lines. There are some additional tools you can purchase to achieve this though, which is talked about in the first link below.

You can take a look at this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1148970&SiteID=1
and this one: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322398&SiteID=1

Jarret

displaying a table

I'm not sure how to go about this and need some help.
I've got a data extract rather than a properly structure table in SQL.
It looks something like below:

Name: Item:
John Ball
John Racket
Paul Ball
Jim Glove
Jim Ball

What sort of script can I run that will return each name once and then
the Items in as many columns needed to list them all?
I.e. so that it will look like
Name: Item1 Item2
John Ball Racket
Paul Ball
Jim Glove Ball

Regards,
Ciarn<chudson007@.hotmail.com> wrote in message
news:1117191730.138398.189500@.f14g2000cwb.googlegr oups.com...
I'm not sure how to go about this and need some help.
I've got a data extract rather than a properly structure table in SQL.
It looks something like below:

Name: Item:
John Ball
John Racket
Paul Ball
Jim Glove
Jim Ball

What sort of script can I run that will return each name once and then
the Items in as many columns needed to list them all?
I.e. so that it will look like
Name: Item1 Item2
John Ball Racket
Paul Ball
Jim Glove Ball

Regards,
Ciarn

The short answer is that this is usually much easier to do in the front end
than in the database; for the long answer, Google for "dynamic crosstab
queries", and also see this KB article:

http://support.microsoft.com/defaul...kb;en-us;175574

Simon

Displaying a subreport in main report at runtime

Hi

I have a report with a subreport within it. When I look at in the preview facility, the data from the subreport is displayed within the main report. At runtime, the sub report is not visible and has to be opened in a separate window. How can I display it in the main report at runtime?

Thanks.I've found the answer to this one. If anyone is interested, please see:

http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2007600&sliceId=&dialogID=6924658&stateId=1%200%206926126

Displaying a SQL Server Report 2005 in a PDA....

Hello All,

Good day!

I have developed a report using SQL Server Reporting Services.

I can view the report in a Browser, but when I try to view the Report in a Pocket PC 2003 Emulator, the report displays but without the data or the contents of the report....

I tried appending &rc:=HTML3.2 to the end as suggested by in one of the posts but no luck....

Any suggestion or directions will be higly appreciated....

Regards,

Srikanth Pai

Hello,

To specify a rendering extension on a report server URL you need to use this syntax:

rs:Format=HTML3.2

Also, as far as I know PPC 2003 browsers support HTML 4.0. Why do you want to render to HTML 3.2?

Thanks,

Chris

Displaying a SQL Server Report 2005 in a PDA....

Hello All,

Good day!

I have developed a report using SQL Server Reporting Services.

I can view the report in a Browser, but when I try to view the Report in a Pocket PC 2003 Emulator, the report displays but without the data or the contents of the report....

I tried appending &rc:=HTML3.2 to the end as suggested by in one of the posts but no luck....

Any suggestion or directions will be higly appreciated....

Regards,

Srikanth Pai

Hello,

To specify a rendering extension on a report server URL you need to use this syntax:

rs:Format=HTML3.2

Also, as far as I know PPC 2003 browsers support HTML 4.0. Why do you want to render to HTML 3.2?

Thanks,

Chris

Displaying a RS2000 Report in a .NET 2.0 control

Hello,
I need to display a report on a winform.
The report is a RS2000 report served by a RS2000 server.
The winform is in a VB .NET 2.0 (VS 2005) project.
1) Can I use a ReportViewer control (.NET 2.0) on this winform to display
this RS2000 report?
2) Must the ReportViewer control have its own dataset even though the report
is being served?
Thank you in advance,
RichardTwo modes for control: server and local. Local requires giving the control
the rdlc file and the dataset. Server mode doesn't and is much easier to do.
BUT, the server mode works only with RS 2005.
Your best bet is to embed an IE control and use URL integration.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:214F9EC1-BFD6-43E6-AC25-42D3A2A2B6F2@.microsoft.com...
> Hello,
> I need to display a report on a winform.
> The report is a RS2000 report served by a RS2000 server.
> The winform is in a VB .NET 2.0 (VS 2005) project.
> 1) Can I use a ReportViewer control (.NET 2.0) on this winform to display
> this RS2000 report?
> 2) Must the ReportViewer control have its own dataset even though the
> report
> is being served?
> Thank you in advance,
> Richard|||Thank you. Yes, I suspected that my only option was IE control.
But using the IE control and url integration, how can the navigation links
("My Subscriptions") and tabs ("Properties | History | Subscriptions") at the
top of the report's page be disabled or removed so the user don't see them,
just the report?
Thank you in advance,
Richard
"Bruce L-C [MVP]" wrote:
> Two modes for control: server and local. Local requires giving the control
> the rdlc file and the dataset. Server mode doesn't and is much easier to do.
> BUT, the server mode works only with RS 2005.
> Your best bet is to embed an IE control and use URL integration.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> news:214F9EC1-BFD6-43E6-AC25-42D3A2A2B6F2@.microsoft.com...
> > Hello,
> >
> > I need to display a report on a winform.
> > The report is a RS2000 report served by a RS2000 server.
> > The winform is in a VB .NET 2.0 (VS 2005) project.
> > 1) Can I use a ReportViewer control (.NET 2.0) on this winform to display
> > this RS2000 report?
> > 2) Must the ReportViewer control have its own dataset even though the
> > report
> > is being served?
> >
> > Thank you in advance,
> >
> > Richard
>
>|||You have control over all of that with the URL. However, being a URL the
user if they knew what they were doing could still get to those areas by
modifying the URL.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:68DB3C3D-E6F5-49FD-A217-AFCEB434C80A@.microsoft.com...
> Thank you. Yes, I suspected that my only option was IE control.
> But using the IE control and url integration, how can the navigation links
> ("My Subscriptions") and tabs ("Properties | History | Subscriptions") at
> the
> top of the report's page be disabled or removed so the user don't see
> them,
> just the report?
> Thank you in advance,
> Richard
> "Bruce L-C [MVP]" wrote:
>> Two modes for control: server and local. Local requires giving the
>> control
>> the rdlc file and the dataset. Server mode doesn't and is much easier to
>> do.
>> BUT, the server mode works only with RS 2005.
>> Your best bet is to embed an IE control and use URL integration.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> news:214F9EC1-BFD6-43E6-AC25-42D3A2A2B6F2@.microsoft.com...
>> > Hello,
>> >
>> > I need to display a report on a winform.
>> > The report is a RS2000 report served by a RS2000 server.
>> > The winform is in a VB .NET 2.0 (VS 2005) project.
>> > 1) Can I use a ReportViewer control (.NET 2.0) on this winform to
>> > display
>> > this RS2000 report?
>> > 2) Must the ReportViewer control have its own dataset even though the
>> > report
>> > is being served?
>> >
>> > Thank you in advance,
>> >
>> > Richard
>>|||If the report server and the report are 2000, can't the 2005's ReportViewer
control display the report? Thank you.
"Bruce L-C [MVP]" wrote:
> You have control over all of that with the URL. However, being a URL the
> user if they knew what they were doing could still get to those areas by
> modifying the URL.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> news:68DB3C3D-E6F5-49FD-A217-AFCEB434C80A@.microsoft.com...
> > Thank you. Yes, I suspected that my only option was IE control.
> > But using the IE control and url integration, how can the navigation links
> > ("My Subscriptions") and tabs ("Properties | History | Subscriptions") at
> > the
> > top of the report's page be disabled or removed so the user don't see
> > them,
> > just the report?
> >
> > Thank you in advance,
> >
> > Richard
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Two modes for control: server and local. Local requires giving the
> >> control
> >> the rdlc file and the dataset. Server mode doesn't and is much easier to
> >> do.
> >> BUT, the server mode works only with RS 2005.
> >>
> >> Your best bet is to embed an IE control and use URL integration.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Richard" <Richard@.discussions.microsoft.com> wrote in message
> >> news:214F9EC1-BFD6-43E6-AC25-42D3A2A2B6F2@.microsoft.com...
> >> > Hello,
> >> >
> >> > I need to display a report on a winform.
> >> > The report is a RS2000 report served by a RS2000 server.
> >> > The winform is in a VB .NET 2.0 (VS 2005) project.
> >> > 1) Can I use a ReportViewer control (.NET 2.0) on this winform to
> >> > display
> >> > this RS2000 report?
> >> > 2) Must the ReportViewer control have its own dataset even though the
> >> > report
> >> > is being served?
> >> >
> >> > Thank you in advance,
> >> >
> >> > Richard
> >>
> >>
> >>
>
>|||No, the reportviewer control only support RS 2005 reports.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Richard" <Richard@.discussions.microsoft.com> wrote in message
news:AF954A4C-BB99-4188-AD7B-3FEEC4873247@.microsoft.com...
> If the report server and the report are 2000, can't the 2005's
> ReportViewer
> control display the report? Thank you.
> "Bruce L-C [MVP]" wrote:
>> You have control over all of that with the URL. However, being a URL the
>> user if they knew what they were doing could still get to those areas by
>> modifying the URL.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> news:68DB3C3D-E6F5-49FD-A217-AFCEB434C80A@.microsoft.com...
>> > Thank you. Yes, I suspected that my only option was IE control.
>> > But using the IE control and url integration, how can the navigation
>> > links
>> > ("My Subscriptions") and tabs ("Properties | History | Subscriptions")
>> > at
>> > the
>> > top of the report's page be disabled or removed so the user don't see
>> > them,
>> > just the report?
>> >
>> > Thank you in advance,
>> >
>> > Richard
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Two modes for control: server and local. Local requires giving the
>> >> control
>> >> the rdlc file and the dataset. Server mode doesn't and is much easier
>> >> to
>> >> do.
>> >> BUT, the server mode works only with RS 2005.
>> >>
>> >> Your best bet is to embed an IE control and use URL integration.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Richard" <Richard@.discussions.microsoft.com> wrote in message
>> >> news:214F9EC1-BFD6-43E6-AC25-42D3A2A2B6F2@.microsoft.com...
>> >> > Hello,
>> >> >
>> >> > I need to display a report on a winform.
>> >> > The report is a RS2000 report served by a RS2000 server.
>> >> > The winform is in a VB .NET 2.0 (VS 2005) project.
>> >> > 1) Can I use a ReportViewer control (.NET 2.0) on this winform to
>> >> > display
>> >> > this RS2000 report?
>> >> > 2) Must the ReportViewer control have its own dataset even though
>> >> > the
>> >> > report
>> >> > is being served?
>> >> >
>> >> > Thank you in advance,
>> >> >
>> >> > Richard
>> >>
>> >>
>> >>
>>

Displaying a report on the browser when using SOAP

I was wondering if theres a way to correctly display reports on the browser
if you use SOAP to render them.Yes you can.
In this case when you try to render a report( You can use the Render method
to do so) the reporting services HTML Report in a byte array.
You can use this byte array to display reports on the browser.
"Rodrigo Sánchez" wrote:
> I was wondering if theres a way to correctly display reports on the browser
> if you use SOAP to render them.
>
>|||ive done that and used the response.write to send the report to screen but
images break, yo dont have the toolbar and paging doesnt seem to work, any
suggestions?
"Sangfroid" <Sangfroid@.discussions.microsoft.com> escribió en el mensaje
news:198F4602-729C-43AE-A7F7-CF4D76D600DE@.microsoft.com...
> Yes you can.
> In this case when you try to render a report( You can use the Render
method
> to do so) the reporting services HTML Report in a byte array.
> You can use this byte array to display reports on the browser.
> "Rodrigo Sánchez" wrote:
> > I was wondering if theres a way to correctly display reports on the
browser
> > if you use SOAP to render them.
> >
> >
> >

Displaying a relational database as it is displayed in MS Access

Can this be done in ASP.Net, as it stands my database views in my ASP.Net application are just standard

Unlike the view in MS Access which shows the collapsable linked data below the data (from a different table)

Many thanks

Rich

Yes, it's possible to create a GUI similar to the one that comes with Access. It's not a trivial undertaking though. You can use CSS, javascript and Ajax to overcome the inherent limitations of html.|||If your tables/views are relatively narrow and have few rows (the table can be convenantly viewed on a screen without scrolling), then use a DataGrid or GridView, and set it to automatic columns - this will give you a read-only view of the database. Code behind can be written to allow updates, but you do need to enforce any business rules.|||Have a look at http://www.codeproject.com/cs/database/DBViewer.asp A simple database viewer to manipulate SQL Server data types (in particular: image, binary, varbinary and text).|||Also try http://www.codeproject.com/asp/ute.asp "Viewer and Editor for any table in any Database you can reach from your IIS/PWS."

Displaying a Message if no chart data present

Hi, I currently have a report that displays a chart among other things. If
the report is called but no data is available for the chart i get a big
block of white space. Is it at all possible to display something in it's
place rather than just nothing at all if there is no data for the chart to
display?
Thanks, SimonYes. The chart has a "NoRows" property in the properties window. If the
chart's dataset has no rows and the NoRows property is set, a textbox with
the NoRows message will be shown instead of the chart.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Simon Dingley" <me@.example.com> wrote in message
news:OmWqrRrYFHA.3320@.TK2MSFTNGP12.phx.gbl...
> Hi, I currently have a report that displays a chart among other things.
> If
> the report is called but no data is available for the chart i get a big
> block of white space. Is it at all possible to display something in it's
> place rather than just nothing at all if there is no data for the chart to
> display?
> Thanks, Simon
>

Displaying a List Horizontally

Hi All,

I'm new to reporting services and I need some help. I've created a list which contains a photo and user name. Currently, it displays all the information I want however, the list expands down the page in one column. I would like it to expand across the page horizontally (4 columns) and then skip down to the next line. Can someone tell me how to do this using report designer? Thank youReporting Services doesn't support listing horizontally natively.

You could workaround by trying something like the following (conceptually this is easier to understand):
1) inserting a constructed column in your dataset (right click on your fields windows and select add)
2) set the value of the constructed column so it increases by 1 for every 4th value of RowNumber()... maybe =Floor(RowNumber()/4)
3) Add another constructed column in your data set
4) set the value to be the remainder =Mod(RowNumber()/4) this should give values from 1 - 4.
5) add a grouping to your list based on the constructed column created in #2
6) Add 4 lists into your list. Let's call these "inner lists"
7) for each inner list, add a filter on for the appropriate value of the constructed column created in #3.
8) in each inner list display your data the way you want it to look

(take a coffee break cause this was hard :-))

You might also be able to do something similar with a Matrix control where you put the constructed column in #4 as the column grouping and the constructed column in #2 as the row grouping. A little harder to understand maybe but probably easier to maintain in the long run.

Good luck,
-Lukasz|||I'm trying to use the solution provided by lukasz but I seem to be getting an error when creating the constructed field as suggested:

A sort expression for the field ‘=RowNumber("table")’ uses the function RowNumber. RowNumber cannot be used in sort expressions.

Anyone have any idea why?

Thanks.

|||

Hello,

This does not work for me as well. I get the same error as described by Pumm3l.

Can someone please provide a reliable answer?

Thanks.

Displaying a List Horizontally

Hi All,

I'm new to reporting services and I need some help. I've created a list which contains a photo and user name. Currently, it displays all the information I want however, the list expands down the page in one column. I would like it to expand across the page horizontally (4 columns) and then skip down to the next line. Can someone tell me how to do this using report designer? Thank youReporting Services doesn't support listing horizontally natively.

You could workaround by trying something like the following (conceptually this is easier to understand):
1) inserting a constructed column in your dataset (right click on your fields windows and select add)
2) set the value of the constructed column so it increases by 1 for every 4th value of RowNumber()... maybe =Floor(RowNumber()/4)
3) Add another constructed column in your data set
4) set the value to be the remainder =Mod(RowNumber()/4) this should give values from 1 - 4.
5) add a grouping to your list based on the constructed column created in #2
6) Add 4 lists into your list. Let's call these "inner lists"
7) for each inner list, add a filter on for the appropriate value of the constructed column created in #3.
8) in each inner list display your data the way you want it to look

(take a coffee break cause this was hard :-))

You might also be able to do something similar with a Matrix control where you put the constructed column in #4 as the column grouping and the constructed column in #2 as the row grouping. A little harder to understand maybe but probably easier to maintain in the long run.

Good luck,
-Lukasz|||I'm trying to use the solution provided by lukasz but I seem to be getting an error when creating the constructed field as suggested:

A sort expression for the field ‘=RowNumber("table")’ uses the function RowNumber. RowNumber cannot be used in sort expressions.

Anyone have any idea why?

Thanks.

|||

Hello,

This does not work for me as well. I get the same error as described by Pumm3l.

Can someone please provide a reliable answer?

Thanks.

Displaying a field in SQL Server MSE

I have a long text field in a table. Is there a query that I can execute in Mgt. Studio Express that will display the whole of this field. It is too long to easily see in the table view and SELECT <fieldname> from <tablename> only displays part of the field before displaying ellipses (...).

Many thanks,

This depends on what your data is and how you're displaying it. If the data is an XML document then casting it to XML in the select will allow you to click on it and display nicely formatted XML. If it's just text then management studio has a configurable limit on how much it will display. Go to Tools->Options in the menu bar and navigate to Query Results->SQL Server->Results to Grid and set the Non XML data size for results displayed in a grid and Query Results->SQL Server->Results to Text and set the Maximum number of characters displayed in each column for text results.|||

Thanks. This is a VARCHAR(MAX) field. I will try the menu option you recommend.

- A

|||

Hi Roger,

I wanted to know how can we convert (cast) the <Long Text> field into XML.

The query below isn't working !!

SELECT CAST(RateSet AS xml) AS Readable, *
FROM Table

|||

That's the right way to do it. Perhaps if you were to elaborate a little on "isn't working"

This works for me:

create table xmlstuff(txt nvarchar(MAX))

insert into xmlstuff values ('some XML')

select CAST(txt AS xml) from xmlstuff

Displaying a field in SQL Server MSE

I have a long text field in a table. Is there a query that I can execute in Mgt. Studio Express that will display the whole of this field. It is too long to easily see in the table view and SELECT <fieldname> from <tablename> only displays part of the field before displaying ellipses (...).

Many thanks,

This depends on what your data is and how you're displaying it. If the data is an XML document then casting it to XML in the select will allow you to click on it and display nicely formatted XML. If it's just text then management studio has a configurable limit on how much it will display. Go to Tools->Options in the menu bar and navigate to Query Results->SQL Server->Results to Grid and set the Non XML data size for results displayed in a grid and Query Results->SQL Server->Results to Text and set the Maximum number of characters displayed in each column for text results.|||

Thanks. This is a VARCHAR(MAX) field. I will try the menu option you recommend.

- A

|||

Hi Roger,

I wanted to know how can we convert (cast) the <Long Text> field into XML.

The query below isn't working !!

SELECT CAST(RateSet AS xml) AS Readable, *
FROM Table

|||

That's the right way to do it. Perhaps if you were to elaborate a little on "isn't working"

This works for me:

create table xmlstuff(txt nvarchar(MAX))

insert into xmlstuff values ('some XML')

select CAST(txt AS xml) from xmlstuff

Displaying a field in SQL Server MSE

I have a long text field in a table. Is there a query that I can execute in Mgt. Studio Express that will display the whole of this field. It is too long to easily see in the table view and SELECT <fieldname> from <tablename> only displays part of the field before displaying ellipses (...).

Many thanks,

This depends on what your data is and how you're displaying it. If the data is an XML document then casting it to XML in the select will allow you to click on it and display nicely formatted XML. If it's just text then management studio has a configurable limit on how much it will display. Go to Tools->Options in the menu bar and navigate to Query Results->SQL Server->Results to Grid and set the Non XML data size for results displayed in a grid and Query Results->SQL Server->Results to Text and set the Maximum number of characters displayed in each column for text results.|||

Thanks. This is a VARCHAR(MAX) field. I will try the menu option you recommend.

- A

|||

Hi Roger,

I wanted to know how can we convert (cast) the <Long Text> field into XML.

The query below isn't working !!

SELECT CAST(RateSet AS xml) AS Readable, *
FROM Table

|||

That's the right way to do it. Perhaps if you were to elaborate a little on "isn't working"

This works for me:

create table xmlstuff(txt nvarchar(MAX))

insert into xmlstuff values ('some XML')

select CAST(txt AS xml) from xmlstuff

Displaying A Date Prompt (Range) In Page Header

I inserted a date prompt (range) into a "Page Header" of a "Crystal Reports", but when I refreshed the report, the date prompt did not display in the "Page Header". What am I doing wrong ?Never mind, I found a solution. Below is the solution . . .

"From: " + ToText ( Minimum ( {?Prompt_Date} ) ) +
" To: " + ToText ( Maximum ( {?Prompt_Date} ) )

Displaying a custom and dynamic RTF oder HTML text

Hi,
I need to display a formatted text in the reports. Could be HTML, Word-Doc
or RTF or something else.
The text can be stored as file or in the database.
How I can do this with Reprting Services?
Thanks
EricCurrent Versions of RS does not support HTML or other formatted display
styles... Future releases will support HTML...
You might be able to create a custom control which displays rich text, but
since I have never done that - I can't offer any information as to the
difficulty...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.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
"Eric" <jug@.nospam.nospam> wrote in message
news:O1kBPY7ZFHA.3784@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I need to display a formatted text in the reports. Could be HTML, Word-Doc
> or RTF or something else.
> The text can be stored as file or in the database.
> How I can do this with Reprting Services?
>
> Thanks
> Eric
>|||do you have information on which of the future versions will actually
support HTML? I have seen a chat record on techNet about release of
msSQL2005 and it said that HTML will not be supported in 2005 that is coming
this summer, will be it supported in 2005 sp1?
thanks,
Alexander.
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:ueNRsF8ZFHA.3224@.TK2MSFTNGP10.phx.gbl...
> Current Versions of RS does not support HTML or other formatted display
> styles... Future releases will support HTML...|||Hi Alexander,
I have consulted this with development team, unfortunately, no
out-of-the-box rendering extension for word/RTF formats at this time.
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Displaying 2 records per row

I'm looking to display a list of records with 2 per row.
Record1 Record2
Record3 Record4
What's the best way to do this?Use matrix.
Column Grouping expression = RowNumber("matrix1") mod 2
Row Grouping expression = Floor((RowNumber("matrix1") - 1) / 2)
Cell = First(Fields!blabla.Value)
"JBrandt" <JBrandt@.discussions.microsoft.com> wrote in message
news:2C52CAF2-6BEF-4B4C-800D-6DA608BB68F2@.microsoft.com...
> I'm looking to display a list of records with 2 per row.
> Record1 Record2
> Record3 Record4
> What's the best way to do this?|||Can you give more of an example of how to do this these is not quite enough information here
From http://www.developmentnow.com/g/115_2005_5_0_0_516312/Displaying-2-records-per-row.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

displaying 0's instead of blank cells , in a report?

Anyone know a way of doing this?
Basically in cells where there is no results, I get blanks and I think 0's
would be a lot nicer.=iif(Fields!Fieldname.Value is nothing, 0, Fields!Fieldname.Value)
or you can return the 0 in your data source query. For example if using SQL
Server,
select isnull(Columnname,0) AS MyColumn, ... FROM Mytable
HTH
Charles Kangai, MCT, MCDBA
"Matt Swift" wrote:
> Anyone know a way of doing this?
> Basically in cells where there is no results, I get blanks and I think 0's
> would be a lot nicer.
>
>

Displaying 0 value on Y-axis

I have a column chart that has y-axis values that range between -100%
and 100%. I'd like the y-axis to autoscale at both the maximum and
minimum end, but always be sure that 0 will appear on the graph. So,
basically I'd like my minimum to autoscale anywhere between 0 and -1,
and my maximum to autoscale anywhere between 0 and 1. Does anyone know
if this is possible?
Thanks.This is possible with RS 2005. Min/Max values can be expressions in RS 2005.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Precisionbk" <bkeffer@.precisioncorp.net> wrote in message
news:1128027217.652074.312130@.g43g2000cwa.googlegroups.com...
>I have a column chart that has y-axis values that range between -100%
> and 100%. I'd like the y-axis to autoscale at both the maximum and
> minimum end, but always be sure that 0 will appear on the graph. So,
> basically I'd like my minimum to autoscale anywhere between 0 and -1,
> and my maximum to autoscale anywhere between 0 and 1. Does anyone know
> if this is possible?
> Thanks.
>

Displaying “Print” and “Print Preview” icons in the toolbar

Hi,

I'm using the "ReportViewer" control to display a report. I can see the "Print" and "Print Preview" icons in the toolbar when I'm in the "Preview" environment. When I run the report and when I use the "ReportViewer" I cannot see these 2 icons.

Can some please advice me how to view these icons.

Any help will be greatly appreciated.Install MSRS SP2, your problem will be solved.

displaying "No Record found" Message

hi all,

i want to show a message when no rows is being returned from the data set,

i.e when there is no data to display the report should display

"No Record Found"

In the properties tab of table or matric or list ,you can find the property named "No Rows" , assign "No records found".

If you dont like the visibility the way it shows the "No records found".

1)Have a text box "No Records found"

2)Control the visibility of "No Records found" text box, either by the no of rows returned" i.e count(fields!field.value) or check for null,whcih ever is suitable to your scneario.

Thank you

|||thanks

displaying % in value

Hi

I am calculating percentage using expression. I want to display % at the end of the result.

If I use P1 or P0 somehow it multiplies the result with 100 I guess.

Here is what my calculated value is

15.384515

and I want to display 15.38%

Using P1 or P0 I am getting 1,538.5%

How can I get the desired result?

Any help would be appreciated.

Regards

Amit

Yeah I always thought that was funny the way RS handles formating %.

You can try dividing your value by 100 and them formating it. I think the percent format requires a number between 0 and 1

e.d =format((field.value)/100,"P0")

that should give you "15%"

|||

You are great Nialhannon.

Thanks for your help. Your solution helped.

Regards

Amit

|||

I remember those issues, and I ended up doing the /100 in the dataset (or Stored Procs)

|||

Hi niallhannon,

I also have a similar problem in formatiing the data after rendering to excel.

The Field value is a percentage.

If there isn't any value zeros are getting displayed.

So if i use a format expression #,# (not to display anything in the cell),the percentage field is getting disturbed and is not getting displyed with two decimal places.

Kindly help me out in this issue.Its a bit urgent.

Thanks in advance

Nalini

displaying % in value

Hi

I am calculating percentage using expression. I want to display % at the end of the result.

If I use P1 or P0 somehow it multiplies the result with 100 I guess.

Here is what my calculated value is

15.384515

and I want to display 15.38%

Using P1 or P0 I am getting 1,538.5%

How can I get the desired result?

Any help would be appreciated.

Regards

Amit

Yeah I always thought that was funny the way RS handles formating %.

You can try dividing your value by 100 and them formating it. I think the percent format requires a number between 0 and 1

e.d =format((field.value)/100,"P0")

that should give you "15%"

|||

You are great Nialhannon.

Thanks for your help. Your solution helped.

Regards

Amit

|||

I remember those issues, and I ended up doing the /100 in the dataset (or Stored Procs)

Displaying '$' currency in a graph

I am populating a graph from a stored procedure. My graph displays
without a problem, except for the fact that it will not show a $ dollar
sign. I have tried using FormatCurrency() function on the value, but
it does not work. I have also tried just inserting a $ in front of the
vaue "$" & Fields!Total.Value, but it did not work either. Any
suggestions?
TwoNevermind, found it
Twobridge wrote:
> I am populating a graph from a stored procedure. My graph displays
> without a problem, except for the fact that it will not show a $ dollar
> sign. I have tried using FormatCurrency() function on the value, but
> it does not work. I have also tried just inserting a $ in front of the
> vaue "$" & Fields!Total.Value, but it did not work either. Any
> suggestions?
> Two

DisplayGroupTree Format?

Hi, I have a report in which I have created a group. The grou field is an integer in the database. I could format the groupname field on the report to display it without any decimals.
However, when I bind the report to a viewer on windows form, the displaygrouptree diplays the group name with decimals. For ex:, the report displays 2000 and the displaygrouptree displays it as 2000.00 How can I make the displaygrouptree to display it as 2000?

Any suggestions are greatly appreciated.

Thanks.You could use a formula to convert it to a string and group on the formula.
e.g.

totext({table.field}, 0, '')

display/show tablename

hi,
anybody know if it is possible to display only the table names? I would like to run a query that display the table names...
thanksTake a look at the sysobjects table in the sql books online. Here is an example of a query that will return user tables from a database:

select * from sysobjects where xtype = 'U'

Display XML Hierarchies in Reporting Services

Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Remove | Report Abuse | Find messages by this author
To all,
I have read several posts that say SQL 2005 Reporting Services does not
display hierarchical XML data very well. It must first be flattened.
Is this true?
In my scenario, I capture hierarchical data and store it in an XML
column in a SQL2005 table. Now I need to display it in a Server Side
Report using SQL 2005 Reporting Services. This data will have any
number of descendants that I need to ensure is intact and visible on
the report.
What are my options to get it done?
And if it really can't be done in Reporting Services what other
approach would be worth looking into?
Thanks in advance,
RobI think Asif Sayed has an example on Code Project that may help you. The
dataset is not based on xml data but demonstrates a parent/child
relationship.
http://www.codeproject.com/useritems/RecursiveData.asp
Steve MunLeeuw
"Rob" <rclassen@.IDSTechNet.com> wrote in message
news:1161266421.322891.145750@.i3g2000cwc.googlegroups.com...
> Reply | Reply to Author | Forward | Print | Individual Message | Show
> original | Remove | Report Abuse | Find messages by this author
>
> To all,
> I have read several posts that say SQL 2005 Reporting Services does not
>
> display hierarchical XML data very well. It must first be flattened.
> Is this true?
>
> In my scenario, I capture hierarchical data and store it in an XML
> column in a SQL2005 table. Now I need to display it in a Server Side
> Report using SQL 2005 Reporting Services. This data will have any
> number of descendants that I need to ensure is intact and visible on
> the report.
>
> What are my options to get it done?
>
> And if it really can't be done in Reporting Services what other
> approach would be worth looking into?
>
> Thanks in advance,
>
> Rob
>

Display X number of records per page

Hi
I have a report which displays skills per staff, I have placed staff details
in the textbox with a list and also I have placed a table of skills for
grouped by staffid. Basically I need to print out certificates like :
Staff X
--
then skills listed
1.skill A
2.skill B
--
footer which has a signature.
I have got everything working except if any staff has more than 10 skills it
just blows out of the page size and everything goes crazy. My question is how
can I display only 5 skills per page with header and footer and if the skills
exceed more than 5 then create a new page with header and footer and the
remaining skills.
I have used this function in the visibility of the skills table
=iif(rownumber(nothing)>5,False,True) but it just stops displaying anyskills
if the skills exceed more than 5 skills.
Please any advice or direction be most appreciated.
CheersCreate a grouping on the list as follows:
=Ceiling(RowNumber(nothing)/5)
and designate a page break after the group.
This will split the list into 5 per page.
--C17
"shahab" <shahab@.discussions.microsoft.com> wrote in message
news:4C9E5928-5BA9-49D0-B0C7-0F85EF42B927@.microsoft.com...
> Hi
> I have a report which displays skills per staff, I have placed staff
> details
> in the textbox with a list and also I have placed a table of skills for
> grouped by staffid. Basically I need to print out certificates like :
> Staff X
> --
> then skills listed
> 1.skill A
> 2.skill B
> --
> footer which has a signature.
> I have got everything working except if any staff has more than 10 skills
> it
> just blows out of the page size and everything goes crazy. My question is
> how
> can I display only 5 skills per page with header and footer and if the
> skills
> exceed more than 5 then create a new page with header and footer and the
> remaining skills.
> I have used this function in the visibility of the skills table
> =iif(rownumber(nothing)>5,False,True) but it just stops displaying
> anyskills
> if the skills exceed more than 5 skills.
> Please any advice or direction be most appreciated.
> Cheers|||Thank you very much it worked.
merry xmas
"C17" wrote:
> Create a grouping on the list as follows:
> =Ceiling(RowNumber(nothing)/5)
> and designate a page break after the group.
> This will split the list into 5 per page.
> --C17
>
> "shahab" <shahab@.discussions.microsoft.com> wrote in message
> news:4C9E5928-5BA9-49D0-B0C7-0F85EF42B927@.microsoft.com...
> > Hi
> > I have a report which displays skills per staff, I have placed staff
> > details
> > in the textbox with a list and also I have placed a table of skills for
> > grouped by staffid. Basically I need to print out certificates like :
> > Staff X
> > --
> > then skills listed
> > 1.skill A
> > 2.skill B
> > --
> > footer which has a signature.
> > I have got everything working except if any staff has more than 10 skills
> > it
> > just blows out of the page size and everything goes crazy. My question is
> > how
> > can I display only 5 skills per page with header and footer and if the
> > skills
> > exceed more than 5 then create a new page with header and footer and the
> > remaining skills.
> >
> > I have used this function in the visibility of the skills table
> > =iif(rownumber(nothing)>5,False,True) but it just stops displaying
> > anyskills
> > if the skills exceed more than 5 skills.
> > Please any advice or direction be most appreciated.
> > Cheers
>
>

display vocuher report twice with same data on CR 8.5

Hello ,
I need to display a voucher report twice in crystal reports 8.5 . I DONT want to print them on printer but display the same report twice with exactly the same data only with the 'COPY' printed in the 2nd voucher in crystal report.

Pls tell me how to write the formula n in which section.I am new to crystal reports n dont know how to write formulas in such a situation!
Pls help me

I get the following result set from my Stored Proc attached to report.
51 XML Markup Language Active 128 Copy
53 Team-Woodbury Audit Active 128 Copy
55 Team 4 Beebe's Team Active 128 Copy
56 Team 5 Bill's Team Active 128 Copy
51 XML Markup Language Active 128 Original
53 Team-Woodbury Audit Active 128 Original
55 Team 4 Beebe's Team Active 128 Original
56 Team 5 Bill's Team Active 128 Originali want to print twice in single page

Display Vlaue

Hi I am reporting off a dataset and I want to have a Display Value witch is the code rather then having the value witch is a Id is it possible?

All fields returned in your query should be available in design mode. If not then you may need to click the refresh button on the data tab for Visual Studio to re-create your dataset filed definitions. To access fileds from your dataset just use the following expression template:

= Fields!<<column_name>>.Value

When grouping of when you want to reference a filed outside of the context of a containing control e.g. matrix , table, list, then you have to use an aggregation function e.g. Sum, Avg, Max, Min, First, Last, and pass the dataset name as a scope e.g.

= First(Fields!<<column_name>>.Value, "<<dataset_name>>")

|||

Hi Adam

Thank you for replying but what I mean is having the actual column should be the ID but the display should be the Description or the code from a other dataset and I can’t use a join because I have the data in memory of my dataset

|||You need to do the join in your query and bring back an extra column (the description) in the same dataset as the ID. Use SQL for joins and use RS for presentation. RS has no capability for joining disperate datasets - not that I know of anyway.

display values depending on a rule

hello,
i have a table with 3 fields
CustNr (int)
artikleNr (int)
pieces (int)
simple example - all customer have bueyed the article with the nr 11
101 11 8
102 11 3
101 11 4
102 11 20
103 11 3
104 11 15
104 11 25
i want to display a information in the following way
if customer has < 10 pieces display 0
if customer has 10 -20 display real value 1...20
if customer has more then 20 display 20
101 8 + 4 =12 display 12
102 3 + 20=23 display 20
103 3 display 0
104 15+25=40 display 20
thanksSomething like this?
SELECT CustNr,
'SomeColumn' = CASE WHEN SUM(pieces) < 10 THEN 0
WHEN SUM(pieces) BETWEEN 10 AND 20 THEN SUM(pieces)
WHEN SUM(pieces) > 20 THEN 20
ELSE NULL END
FROM YourTable
WHERE artikleNr = 11 /* I don't know if this is a param that would limit
the data returned, or if you want to group by this column as well (in
addition to CustNr) */
Keith Kratochvil
"Xavier" <Xavier@.discussions.microsoft.com> wrote in message
news:6A10DB32-0D1E-4C48-B657-C5C83A78DDF7@.microsoft.com...
> hello,
> i have a table with 3 fields
> CustNr (int)
> artikleNr (int)
> pieces (int)
> simple example - all customer have bueyed the article with the nr 11
> 101 11 8
> 102 11 3
> 101 11 4
> 102 11 20
> 103 11 3
> 104 11 15
> 104 11 25
> i want to display a information in the following way
> if customer has < 10 pieces display 0
> if customer has 10 -20 display real value 1...20
> if customer has more then 20 display 20
>
> 101 8 + 4 =12 display 12
> 102 3 + 20=23 display 20
> 103 3 display 0
> 104 15+25=40 display 20
> thanks|||thanks Keith, it works perfect.
best regards
"Keith Kratochvil" wrote:

> Something like this?
> SELECT CustNr,
> 'SomeColumn' = CASE WHEN SUM(pieces) < 10 THEN 0
> WHEN SUM(pieces) BETWEEN 10 AND 20 THEN SUM(pieces)
> WHEN SUM(pieces) > 20 THEN 20
> ELSE NULL END
> FROM YourTable
> WHERE artikleNr = 11 /* I don't know if this is a param that would limit
> the data returned, or if you want to group by this column as well (in
> addition to CustNr) */
> --
> Keith Kratochvil
>
> "Xavier" <Xavier@.discussions.microsoft.com> wrote in message
> news:6A10DB32-0D1E-4C48-B657-C5C83A78DDF7@.microsoft.com...
>
>

Display User Name

We are looking at deploying SSRS. What I would like to do is display the
user on the home page. Something like:
Welcome Back, Russ Farris!
Is this possible?
Thanks,
RussHi Russ,
You can get the id of the person running the report from the user
collection (ck in books online for syntax). However ... that probably
wouldnt be the users name contained in the user id so you could then use that
to query a table to get the user's full name to display
"Russ Farris" wrote:
> We are looking at deploying SSRS. What I would like to do is display the
> user on the home page. Something like:
> Welcome Back, Russ Farris!
> Is this possible?
> Thanks,
> Russ

Display truncating on SQL Profiler

Greetings,

I am having a problem debugging an XML error we are getting in our production environment because I can't view the entire call to the stored procedure in Profiler. I have successfully traced the error, but when I go to the line with the call to the SP that caused the error, it doesn't show me the entire call. It only shows me the 'exec sproc_name and then the first 16 characters of the XML string parameter that is being passed to the proc. For some reason it's doing this to ONLY the stored procs that have XML parameters...on procs that use standard parameters, it displays the entire call correctly.

I have looked for some type of setting that controls this, but haven't been able to find it. I also have looked through many forums for this issue but to no avail. Does anyone know why this is happening? And, is there a workaround/fix?

Thanks in advance...

SBIs it because it's a text column? Do you see anny other calls using text, ntext or image?

Display top N records and its total

For a given dataset, I know how to display the top-N records. Is there
a way in reporting services to then show the total of those top-N
records?
For example, let's suppose I have a dataset of sales people and their
sales totals. By grouping on the sales person, I am able to display
the top 5 sales person base on their sales total. I then need to
display which % of total sales these top 5 sales person represent.
Some like this:
Top 5 sales
Bill 35%
Lucy 10%
Bob 7%
Jeff 5%
Kim 3%
Total: 60%
Is this possible?I figure out how to accomplish this. If anyone needs help doing this,
ping me.

display TODAY's records...

I am saving files in SQL Server 2005 with a datetime field called news_date_time and I want to display all today's records regardless of the record time.

I tried this code but didn't work..


[code]
SqlCommand sql_command = new SqlCommand("SELECT * FROM files_news WHERE news_date_time = TODAY ORDER BY news_date_time DESC", sql_connection);
[/code]

? Try: SELECT * FROM files_news WHERE news_date_time >= DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0) AND news_date_time < DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 1) ORDER BY news_date_time DESC -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Jassim Rahma@.discussions.microsoft.com> wrote in message news:a33dde1c-a329-4bf2-a66b-f2b842fdfd8c@.discussions.microsoft.com... I am saving files in SQL Server 2005 with a datetime field called news_date_time and I want to display all today's records regardless of the record time. I tried this code but didn't work.. [code]SqlCommand sql_command = new SqlCommand("SELECT * FROM files_news WHERE news_date_time = TODAY ORDER BY news_date_time DESC", sql_connection);[/code]|||use northwind
select * from orders
where convert(datetime,floor(CONVERT(FLOAT,orderdate)))= --<-- susbstitute the columns to qualify
convert(datetime,floor(CONVERT(FLOAT,GETDATE())))|||? The only problem with that method is that it's quite bad for performance. An index on "orderdate" will not be usable by the query engine to help satisfy the query. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <joeydj@.discussions.microsoft.com> wrote in message news:d496ce31-0a56-41f7-902f-bcd35c0ab29f@.discussions.microsoft.com...use northwindselect * from orderswhere convert(datetime,floor(CONVERT(FLOAT,orderdate)))= --<-- susbstitute the columns to qualifyconvert(datetime,floor(CONVERT(FLOAT,GETDATE())))|||Conversion will lead to bad execution plans or even table scans. You should always use the built-in functionality of the appropiate data types to achieve your goals and the best queryplan.

HTH, Jens SUessmeyer.

http://www.sqlserver2005.de
|||

i see.

thanks

|||

SELECT*FROM Employees

WHERECONVERT(varchar(15), hiredate, 112)=CONVERT(varchar(15),GETDATE(), 112)

Adamus

|||? Once again: Do not use that if you care about performance! Assuming that an index exists on "hiredate" in your example, SQL Server will not be able to use it. Please see my previous reply to this thread for an example of how to correctly phrase the query so that it can use an index. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Adamus Turner@.discussions.microsoft.com> wrote in message news:00a1169a-7acd-4c96-b6db-b130024a5e77@.discussions.microsoft.com... SELECT * FROM Employees WHERE CONVERT(varchar(15), hiredate, 112) = CONVERT(varchar(15), GETDATE(), 112) Adamus|||

There's a performance issue converting a date into a string and then comparing a string?

Can this performance difference even be measured?

Adamus

|||? No, the performance issue is that SQL Server doesn't have an index that helps it find the value of the column when converted to a string; it has an index on the actual date value. When you convert it to a string, that index is no longer usable -- so instead of being able to seek against the index to find the rows you want, SQL Server has to scan every row of the table, one-by-one, converting each of the hiredate values into a string, then comparing that string. Might not be too bad for a few hundred or even a few thousand rows, but imagine it having to do that for millions of rows. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Adamus Turner@.discussions.microsoft.com> wrote in message news:d59ca8af-b2cc-46f5-9d3f-24f113d9bb01@.discussions.microsoft.com... There's a performance issue converting a date into a string and then comparing a string? Can this performance difference even be measured? Adamus|||

NNTP User wrote:

?

No, the performance issue is that SQL Server doesn't have an index that helps it find the value of the column when converted to a string; it has an index on the actual date value. When you convert it to a string, that index is no longer usable -- so instead of being able to seek against the index to find the rows you want, SQL Server has to scan every row of the table, one-by-one, converting each of the hiredate values into a string, then comparing that string. Might not be too bad for a few hundred or even a few thousand rows, but imagine it having to do that for millions of rows.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html?bID=457
--

<Adamus Turner@.discussions.microsoft.com> wrote in message news:d59ca8af-b2cc-46f5-9d3f-24f113d9bb01@.discussions.microsoft.com...

There's a performance issue converting a date into a string and then comparing a string?

Can this performance difference even be measured?

Adamus

Well then you need to contact MS to inform them and all SQL users that an index is removed from a field where a conversion takes place.

Good luck,

Adamus

|||

Yes. See the last few messages in this thread: http://groups.google.com/groups/search?q=%22function+to+return+today+at+midnight%22 And see http://groups.google.com/groups/search?q=strik+kass+%22small+improvement%22 Steve Kass Drew University www.stevekass.com Adamus Turner@.discussions.microsoft.com wrote:
> There's a performance issue converting a date into a string and then
> comparing a string?
>
> Can this performance difference even be measured?
>
> Adamus
>
>

|||? Well then you need to contact MS to inform them and all SQL users that an index is removed from a field where a conversion takes place. Good luck, Adamus No, nothing is removed. The index is simply not usable. I highly recommend that you do some background reading on indexes and how they work; "Inside SQL Server 2000" by Kalen Delaney would be a very good place to start. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457--

display TODAY's records...

I am saving files in SQL Server 2005 with a datetime field called news_date_time and I want to display all today's records regardless of the record time.

I tried this code but didn't work..


[code]
SqlCommand sql_command = new SqlCommand("SELECT * FROM files_news WHERE news_date_time = TODAY ORDER BY news_date_time DESC", sql_connection);
[/code]

? Try: SELECT * FROM files_news WHERE news_date_time >= DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 0) AND news_date_time < DATEADD(dd, DATEDIFF(dd, 0, GETDATE()), 1) ORDER BY news_date_time DESC -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Jassim Rahma@.discussions.microsoft.com> wrote in message news:a33dde1c-a329-4bf2-a66b-f2b842fdfd8c@.discussions.microsoft.com... I am saving files in SQL Server 2005 with a datetime field called news_date_time and I want to display all today's records regardless of the record time. I tried this code but didn't work.. [code]SqlCommand sql_command = new SqlCommand("SELECT * FROM files_news WHERE news_date_time = TODAY ORDER BY news_date_time DESC", sql_connection);[/code]|||use northwind
select * from orders
where convert(datetime,floor(CONVERT(FLOAT,orderdate)))= --<-- susbstitute the columns to qualify
convert(datetime,floor(CONVERT(FLOAT,GETDATE())))|||? The only problem with that method is that it's quite bad for performance. An index on "orderdate" will not be usable by the query engine to help satisfy the query. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <joeydj@.discussions.microsoft.com> wrote in message news:d496ce31-0a56-41f7-902f-bcd35c0ab29f@.discussions.microsoft.com...use northwindselect * from orderswhere convert(datetime,floor(CONVERT(FLOAT,orderdate)))= --<-- susbstitute the columns to qualifyconvert(datetime,floor(CONVERT(FLOAT,GETDATE())))|||Conversion will lead to bad execution plans or even table scans. You should always use the built-in functionality of the appropiate data types to achieve your goals and the best queryplan.

HTH, Jens SUessmeyer.

http://www.sqlserver2005.de
|||

i see.

thanks

|||

SELECT*FROM Employees

WHERECONVERT(varchar(15), hiredate, 112)=CONVERT(varchar(15),GETDATE(), 112)

Adamus

|||? Once again: Do not use that if you care about performance! Assuming that an index exists on "hiredate" in your example, SQL Server will not be able to use it. Please see my previous reply to this thread for an example of how to correctly phrase the query so that it can use an index. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Adamus Turner@.discussions.microsoft.com> wrote in message news:00a1169a-7acd-4c96-b6db-b130024a5e77@.discussions.microsoft.com... SELECT * FROM Employees WHERE CONVERT(varchar(15), hiredate, 112) = CONVERT(varchar(15), GETDATE(), 112) Adamus|||

There's a performance issue converting a date into a string and then comparing a string?

Can this performance difference even be measured?

Adamus

|||? No, the performance issue is that SQL Server doesn't have an index that helps it find the value of the column when converted to a string; it has an index on the actual date value. When you convert it to a string, that index is no longer usable -- so instead of being able to seek against the index to find the rows you want, SQL Server has to scan every row of the table, one-by-one, converting each of the hiredate values into a string, then comparing that string. Might not be too bad for a few hundred or even a few thousand rows, but imagine it having to do that for millions of rows. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Adamus Turner@.discussions.microsoft.com> wrote in message news:d59ca8af-b2cc-46f5-9d3f-24f113d9bb01@.discussions.microsoft.com... There's a performance issue converting a date into a string and then comparing a string? Can this performance difference even be measured? Adamus|||

NNTP User wrote:

?

No, the performance issue is that SQL Server doesn't have an index that helps it find the value of the column when converted to a string; it has an index on the actual date value. When you convert it to a string, that index is no longer usable -- so instead of being able to seek against the index to find the rows you want, SQL Server has to scan every row of the table, one-by-one, converting each of the hiredate values into a string, then comparing that string. Might not be too bad for a few hundred or even a few thousand rows, but imagine it having to do that for millions of rows.


--
Adam Machanic
Pro SQL Server 2005, available now
http://www..apress.com/book/bookDisplay.html?bID=457
--

<Adamus Turner@.discussions.microsoft.com> wrote in message news:d59ca8af-b2cc-46f5-9d3f-24f113d9bb01@.discussions.microsoft.com...

There's a performance issue converting a date into a string and then comparing a string?

Can this performance difference even be measured?

Adamus

Well then you need to contact MS to inform them and all SQL users that an index is removed from a field where a conversion takes place.

Good luck,

Adamus

|||

Yes. See the last few messages in this thread: http://groups.google.com/groups/search?q=%22function+to+return+today+at+midnight%22 And see http://groups.google.com/groups/search?q=strik+kass+%22small+improvement%22 Steve Kass Drew University www.stevekass.com Adamus Turner@.discussions.microsoft.com wrote:
> There's a performance issue converting a date into a string and then
> comparing a string?
>
> Can this performance difference even be measured?
>
> Adamus
>
>

|||? Well then you need to contact MS to inform them and all SQL users that an index is removed from a field where a conversion takes place. Good luck, Adamus No, nothing is removed. The index is simply not usable. I highly recommend that you do some background reading on indexes and how they work; "Inside SQL Server 2000" by Kalen Delaney would be a very good place to start. -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457--

display time for tooltips on reports built in Reportserver

Hi All,

Users Love the tooltips. But the tooltip disappers in very very short time, before they get to read it.

Can any one helpme in cotrolling the lenght of the time, tooltip is displayed.

Regards

Bobba

I closest I could get is ask users to go to

controlpannel>display>appearance>advanced>item>tooltip.

But it only lets me change the font. If any one found a way to control the time the tooltip is display, that would be a lot of help.

Regards

Bobba

display time

How do I display time from
23:00:00 to 11:00pm
or vice versa,
Thanks,
Lam"culam" <culam@.discussions.microsoft.com> wrote in message
news:39CB0644-279D-448A-9389-357871CEBDF1@.microsoft.com...
> How do I display time from
> 23:00:00 to 11:00pm
> or vice versa,
> Thanks,
> Lam
Do you mean how do you format the display of a DATETIME value? Your client
application controls how dates and times are displayed - not SQL Server.
Best to take a look at the features of whatever client you are using.
The only way to have any control over this with SQL Server is to return a
string instead of a DATETIME. That's a poor idea for several reasons but if
you really want to do it take a look at the CONVERT function in Books
Online.
David Portas
SQL Server MVP
--|||Since CONVERT() function return different format for Date, I thought one of
them might get me the desired time format. I tried but no prevail. There is
no Client side on my environment. I just get data from Query Analyzer and
present it to my boss.
Thanks,
Lam
"David Portas" wrote:

> "culam" <culam@.discussions.microsoft.com> wrote in message
> news:39CB0644-279D-448A-9389-357871CEBDF1@.microsoft.com...
> Do you mean how do you format the display of a DATETIME value? Your client
> application controls how dates and times are displayed - not SQL Server.
> Best to take a look at the features of whatever client you are using.
> The only way to have any control over this with SQL Server is to return a
> string instead of a DATETIME. That's a poor idea for several reasons but i
f
> you really want to do it take a look at the CONVERT function in Books
> Online.
> --
> David Portas
> SQL Server MVP
> --
>
>|||you could parse CONVERT results, e.g.
select substring(convert(varchar, getdate(), 100),13,7)
culam wrote:
> Since CONVERT() function return different format for Date, I thought one o
f
> them might get me the desired time format. I tried but no prevail. There
is
> no Client side on my environment. I just get data from Query Analyzer and
> present it to my boss.
> Thanks,
> Lam
> "David Portas" wrote:
>|||"culam" <culam@.discussions.microsoft.com> wrote in message
news:66069841-E6F0-44A3-85AB-D75711D8356C@.microsoft.com...
> Since CONVERT() function return different format for Date, I thought one
> of
> them might get me the desired time format. I tried but no prevail. There
> is
> no Client side on my environment. I just get data from Query Analyzer and
> present it to my boss.
> Thanks,
> Lam
> "David Portas" wrote:
>
CONVERT allows you to format dates as *strings*. DATETIME itself has no
specific formatting. For example:
SELECT CONVERT(VARCHAR(8),CURRENT_TIMESTAMP,14)
The result is a VARCHAR not a DATETIME.
Alternatively, in Query Analyzer select Tools / Options / Connections and
check the option that says "Use regional settings when displaying currency,
number, dates and times." to control how the dates are formatted. Query
Analyzer is a client application like any other but it's not a very good
tool for presentational work. You might be better off investing in a
reporting tool.
David Portas
SQL Server MVP
--

Display tiff in Reporting Services

I have a file directory of tiff images that I need to display dynamically with reporting services. I receive the following error message: "The value of the MIMEType property for the image ‘image1’ is “image/tiff”, which is not a valid MIMEType." After looking it up sure enough tiff is not a valide type. Does anyone know of a way to display tiff images in reporting services.

Thanks,

Ross

Well I see plenty of threads on tiffs in the forums so it must be possible. I'm not sure why you're getting the error though.|||Not sure what your situation is, but one way to display a *.tif file in reporting services is to drag the image tool from the report items onto the canvas and select "Web" from the radio boxes options. Reference your url http://localhost/images/yourTIFname.tif. As far as doing this dynamically, I'm unclear as to what it is that your actually trying to do and why you want to do this in reporting services in the first place as apposed to some other means. There are a lot of easier ways to display images, instead of using reporting services to do this.|||I currently have it set to web however the images are not on a web server. I have to access them via a file path file:\\servername\image\1234.tif. The image tool in reporting services does not support the *.tif format. Is there a way to work around this limitation?|||

I wasn't able to find a solution. I'll have to force the users to publish their CADs in another format. If someone finds a solution in the future to display tiff images in ssrs please post it here for others to see.

Thanks,

Ross

|||

Pardon me. The image control in a report does support TIF.

Could these be multi-page TIFFs by any chance? I guess those might not be supported.

>L<

Display tiff in Reporting Services

I have a file directory of tiff images that I need to display dynamically with reporting services. I receive the following error message: "The value of the MIMEType property for the image ‘image1’ is “image/tiff”, which is not a valid MIMEType." After looking it up sure enough tiff is not a valide type. Does anyone know of a way to display tiff images in reporting services.

Thanks,

Ross

Well I see plenty of threads on tiffs in the forums so it must be possible. I'm not sure why you're getting the error though.|||Not sure what your situation is, but one way to display a *.tif file in reporting services is to drag the image tool from the report items onto the canvas and select "Web" from the radio boxes options. Reference your url http://localhost/images/yourTIFname.tif. As far as doing this dynamically, I'm unclear as to what it is that your actually trying to do and why you want to do this in reporting services in the first place as apposed to some other means. There are a lot of easier ways to display images, instead of using reporting services to do this.|||I currently have it set to web however the images are not on a web server. I have to access them via a file path file:\\servername\image\1234.tif. The image tool in reporting services does not support the *.tif format. Is there a way to work around this limitation?|||

I wasn't able to find a solution. I'll have to force the users to publish their CADs in another format. If someone finds a solution in the future to display tiff images in ssrs please post it here for others to see.

Thanks,

Ross

|||

Pardon me. The image control in a report does support TIF.

Could these be multi-page TIFFs by any chance? I guess those might not be supported.

>L<

Display the total sum of rows found

I'm sure there is an easy answer to this question, it's just I couldn't find it in any of the books that I own.

If I do a SELECT statement that finds say 1000 rows that have been matched, is it possible to return the sum of rows found, i.e. 1000 and at the same time LIMIT the rows returned to 20.

Basiclly, I want to show the user 20 rows at a time but also the total number of rows found, i.e 1000. I hope I have explained things clear enough.

Many thanks in advance.I don't think it's possible in one statement. You have to run 2 statements:

select count(*)from table;

select * from table where rownum <= 20;

or you can have one additional column in your result filled with the count

select
(select count(*) from table),
t.*
from table t
where rownum <= 20;

or have one additional row, but you have to know how many columns you have in your result. e.g. for 4 columns

selce count(*), count(*), count(*), count(*) from table
union all
select * from table
where rownum <= 20;|||Thank you very much for your prompt reply.

With a little bit of tweaking, I managed to get the following statement to work exactly how I like. Basically, out of a table of 3000 rows, it returns 1300 rows, of which I want to display 20 rows only plus at the end of the table one extra row of the count (in this case 1300).

SELECT product, price from electronics
WHERE sid = '187'
LIMIT 20
UNION ALL
SELECT count(*), count(*) from electronics
WHERE sid = '187'

However, as I want to eventually do a sort on the 1300 rows returned, I think I would like to have an extra column of the count instead of an extra row of the count, i.e. 'product', 'price', 'count'. I know it's inefficient to have an extra colomn all with the same sum but I don't really want to do a sort and then mix the count in with it. A solution to adding an extra column with the count would be much appreciated.

Or, is it possible to have the above working select statement but with the count as the first row, and then somehow extract the first row using perl before I do a sort on the 1300 rows returned.

Thanking you again.|||I'm not sure, but I think, it could work when you first select count(*) then UNION ALL your select ordered by whatever. Do not order final result which includes count.

SELECT count(*), count(*) from electronics
WHERE sid = '187'
UNION ALL
SELECT product, price from electronics
WHERE sid = '187'
ORDER BY price DESC
LIMIT 20 -- I don't know if this goes before ORDER BY|||now I had a chance to test my last suggestion (previous post). You'll have to use something like:

SELECT count(*) product, count(*) price from electronics
WHERE sid = '187'
UNION ALL
SELECT product, price from
(SELECT product, price from electronics
WHERE sid = '187'
ORDER BY price DESC
LIMIT 20 -- I don't know if this goes before ORDER BY
) X;

otherwise most likely your count won't be in first line. the problem is some databases don't allow ORDER BY in views, subqueries, derived tables...|||Again thank you for your replies. Unfortunatly, I can't seem to get your examples to work. I've managed to come up with the statement below which does exactly what I want i.e. with the count as the first row, this is only possible because I've set the 2nd column of the count row to 0.00, and hopefully as there will never be a product whose price is 0.00 then when I do a ASC sort it should always become the first row.

Additionally, as the count is a number and is in the product column (products are normally described in words), a ASC sort should always put that as the first row.

Of course everything falls down if a product is described as a number or it's price is 0.00, rare but could happen.

SELECT product, price from electronics
WHERE sid = '187'
UNION ALL
SELECT count(*), '0.00' from electronics
WHERE sid = '187'
ORDER BY price ASC
LIMIT 20

I'm sure there is a proper solution, just haven't found it yet. What I really want is to have an extra column with the count in it, i.e.

Table has 3000 rows, rows returned from search is 1300

Product Price Count
--------------
JVC AV27D202 125.00 1300
Panasonic CT32SF37 150.00 1300
Pioneer PDP505HD 200.00 1300
Sharp 27NS100 250.00 1300
etc

instead of

Product Price
----------
1300 0.00
JVC AV27D202 125.00
Panasonic CT32SF37 150.00
Pioneer PDP505HD 200.00
Sharp 27NS100 250.00
etc

By the way, my database is MySQL. Many thanks.|||You could use negative price (like -1.00), and NULL description for your count, it should be on the top allways (row solutions).

did you also try something like:

SELECT
product,
price,
(SELECT count(*) from electronics WHERE sid = '187') cnt
from electronics
WHERE sid = '187'
LIMIT 20

this could be your "column" solution.
what DB do you use?|||My database is MySQL. Great idea about the negative price and NULL. I shall use the row solution if nothing else works.

The column solution however doesn't seem to work, although I can see what you are doing. It falls down I think because it doesn't like the syntax "(SELECT count(*) from electronics WHERE sid = '187') cnt" as a means of creating a third column. Both select statements work perfectly on their own but not together.

Many thanks.|||yes, I think problem is: MySQL doesn't support subqueries. Maybe it's not true in newer versions, but I'm sure this feature wasn't supported by some older versions

display the number of times a report has been run?

hi all
Is there a way to tell how many times a report has been run in SRS Report
manager? and maybe other related stats.
much thanksYou can use the execution log set of reports that come with reporting
services. Just google on "Reporting services execution log" and you should
find an article telling all about it.
"darwin" wrote:
> hi all
> Is there a way to tell how many times a report has been run in SRS Report
> manager? and maybe other related stats.
> much thanks
>

display the description of the parameter field in the report

How do i display the description in the report for the parameter field
eg suppose Parameter UWName Value is AA Desc is Andy Arace
I want to display the Desc of the Parameter in the report details instead of the value AA
Pls helpNot sure what you really want, but here goes (VB Code using CRAXDRT COM object):
assumes you already have an instance of the report object open:

Dim objParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim objParamDef As CRAXDRT.ParameterFieldDefinition
.
.
.
.
Set objPrintApp = New CRAXDRT.Application
Set objReport = objPrintApp.OpenReport(strReportSourcePath & strSource)
.
.
.
Set objParamDefs = objReport.ParameterFields

For Each objParamDef In objParamDefs
objParamDef.Print .Prompt
Next
.
.
.
does that help

dave|||Hi, I have the same problem too,
Springsoft, your answer doesnt match with the problem :(

Display textboxes depending on rendering format

I would like to display some textboxes depending on the rendering format. I
would like to write an expression like this in the Visibility.Hidden
=renderingFormat="Excel"
Is this possible?In case you are calling Reporting Services from your
Application then just pass an extra parameter from the UI
which has the Rendering Format value and then use the
value of this Textbox in the Report to determine Rendering
Format.
>--Original Message--
>I would like to display some textboxes depending on the
rendering format. I
>would like to write an expression like this in the
Visibility.Hidden
>=renderingFormat="Excel"
>Is this possible?
>.
>|||Eric:
I don't see a solution posted, but I have a similar need. Did you ever come
up with an answer to this?
Vince P
"Eric Quist" wrote:
> Thanks for your suggestion, but I have to support it even if the user uses
> the HtmlViewer and chooses to export the report from there.
>
> "Ravi" wrote:
> > In case you are calling Reporting Services from your
> > Application then just pass an extra parameter from the UI
> > which has the Rendering Format value and then use the
> > value of this Textbox in the Report to determine Rendering
> > Format.
> >
> > >--Original Message--
> > >I would like to display some textboxes depending on the
> > rendering format. I
> > >would like to write an expression like this in the
> > Visibility.Hidden
> > >=renderingFormat="Excel"
> > >
> > >Is this possible?
> > >.
> > >
> >|||I haven't found any good solution to this problem. I guess it must be added
to RS.
/Eric
"vmp_pdx" wrote:
> Eric:
> I don't see a solution posted, but I have a similar need. Did you ever come
> up with an answer to this?
> Vince P
> "Eric Quist" wrote:
> > Thanks for your suggestion, but I have to support it even if the user uses
> > the HtmlViewer and chooses to export the report from there.
> >
> >
> > "Ravi" wrote:
> >
> > > In case you are calling Reporting Services from your
> > > Application then just pass an extra parameter from the UI
> > > which has the Rendering Format value and then use the
> > > value of this Textbox in the Report to determine Rendering
> > > Format.
> > >
> > > >--Original Message--
> > > >I would like to display some textboxes depending on the
> > > rendering format. I
> > > >would like to write an expression like this in the
> > > Visibility.Hidden
> > > >=renderingFormat="Excel"
> > > >
> > > >Is this possible?
> > > >.
> > > >
> > >

Display textbox on each page of the report

Hi,
I have created a multi-page report. I want to display a text box on each
page of the report. How to do so?
Note that I cannot make the text box as a part of data region (like list).
Its a kind of header information that need to be outputed in each page.
I cannot place the text box in header of the page since it takes value from
a database field. The header doesn't accept database fields.
regards,
Sachin.I think this is a difficult thing to do. One approach is to ensure that a
database field in a textbox is on each page of the report body. You may
then reference the textbox in the headder or footer with the ReportItems!
collection. We have reports that extend multiple pages when exported to PDF
format. I tried making a really tall and narrow textbox and this would work
for the first two pages, but when the matrix at the bottom of the report
grew onto a third page, the third page would not have a textbox and the
reference would be empty.
We took another approach, we passed in the ReportItems collection to a
custom assembly and kept a 'last known good' reference to it. We would then
call this method on each page and retrieve the last known good. I had to
pass in the whole ReportItems collection because passing in just the report
item would result in an #Error for pages that didn't contain the hidden text
box. From what I can tell all references in an expression are resolved
which is why I passed the collection. I think this would also work in code
behind without the custom assembly, but haven't tried it.
Hidden textbox in report body:
txtSchoolNameHidden
=First(Fields!OrganizationName.Value, "GetOrgInfo")
Expression in footer:
=Code.loc.SchoolName(ReportItems)
Code in Custom Assembly (because we are using a property, had to create an
instance, rather than static method)
private string _SchoolName;
public string
SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
input)
{
string ReturnVal = null;
try
{
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
rptItemSchoolNameHidden = null;
rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
if (rptItemSchoolNameHidden != null)
{
_SchoolName = rptItemSchoolNameHidden.Value.ToString();
}
}
catch
{
//ignore report item not found error.
}
return _SchoolName;
}
Seems like a lot of work for something simple. Any other ideas would be
appreciated.
Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF only
the first page has my database field in the footer.
Steve MunLeeuw
"Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
> Hi,
> I have created a multi-page report. I want to display a text box on each
> page of the report. How to do so?
> Note that I cannot make the text box as a part of data region (like list).
> Its a kind of header information that need to be outputed in each page.
> I cannot place the text box in header of the page since it takes value
> from
> a database field. The header doesn't accept database fields.
> regards,
> Sachin.
>|||A text box can't take a database field directly in the header or footer, but
it can take a report parameter. That parameter in turn can be filled with
the value of a field in a dataset.
"Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
> Hi,
> I have created a multi-page report. I want to display a text box on each
> page of the report. How to do so?
> Note that I cannot make the text box as a part of data region (like list).
> Its a kind of header information that need to be outputed in each page.
> I cannot place the text box in header of the page since it takes value
> from
> a database field. The header doesn't accept database fields.
> regards,
> Sachin.
>|||I put a call to a custom assembly in a textbox expression in the footer.
When I appendend a counter for each call I was suprised to find the first
page expression was getting called 6 times, then one additional time for
each page when exported to PDF. I didn't go back and do the comparison for
the browser view with interactive height, and therefore different number of
pages as pdf.
The following code works.
static string _SchoolName;
public string
SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
input)
{
string ReturnVal = null;
try
{
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
rptItemSchoolNameHidden = null;
rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
if (rptItemSchoolNameHidden != null)
{
if (rptItemSchoolNameHidden.Value.ToString().Length > 0)
{
_SchoolName = rptItemSchoolNameHidden.Value.ToString();
}
}
}
catch
{
//ignore report item not found error.
}
return _SchoolName;
}
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:ORGfb5LNGHA.2300@.TK2MSFTNGP15.phx.gbl...
>I think this is a difficult thing to do. One approach is to ensure that a
>database field in a textbox is on each page of the report body. You may
>then reference the textbox in the headder or footer with the ReportItems!
>collection. We have reports that extend multiple pages when exported to
>PDF format. I tried making a really tall and narrow textbox and this would
>work for the first two pages, but when the matrix at the bottom of the
>report grew onto a third page, the third page would not have a textbox and
>the reference would be empty.
> We took another approach, we passed in the ReportItems collection to a
> custom assembly and kept a 'last known good' reference to it. We would
> then call this method on each page and retrieve the last known good. I
> had to pass in the whole ReportItems collection because passing in just
> the report item would result in an #Error for pages that didn't contain
> the hidden text box. From what I can tell all references in an expression
> are resolved which is why I passed the collection. I think this would
> also work in code behind without the custom assembly, but haven't tried
> it.
> Hidden textbox in report body:
> txtSchoolNameHidden
> =First(Fields!OrganizationName.Value, "GetOrgInfo")
> Expression in footer:
> =Code.loc.SchoolName(ReportItems)
>
> Code in Custom Assembly (because we are using a property, had to create an
> instance, rather than static method)
> private string _SchoolName;
> public string
> SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
> input)
> {
> string ReturnVal = null;
> try
> {
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
> rptItemSchoolNameHidden = null;
> rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
> if (rptItemSchoolNameHidden != null)
> {
> _SchoolName = rptItemSchoolNameHidden.Value.ToString();
> }
> }
> catch
> {
> //ignore report item not found error.
> }
> return _SchoolName;
> }
>
> Seems like a lot of work for something simple. Any other ideas would be
> appreciated.
> Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF
> only the first page has my database field in the footer.
>
>
> Steve MunLeeuw
>
>
> "Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
> news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
>> Hi,
>> I have created a multi-page report. I want to display a text box on each
>> page of the report. How to do so?
>> Note that I cannot make the text box as a part of data region (like
>> list).
>> Its a kind of header information that need to be outputed in each page.
>> I cannot place the text box in header of the page since it takes value
>> from
>> a database field. The header doesn't accept database fields.
>> regards,
>> Sachin.
>|||The parameter technique is better, I will use that.
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:ORGfb5LNGHA.2300@.TK2MSFTNGP15.phx.gbl...
>I think this is a difficult thing to do. One approach is to ensure that a
>database field in a textbox is on each page of the report body. You may
>then reference the textbox in the headder or footer with the ReportItems!
>collection. We have reports that extend multiple pages when exported to
>PDF format. I tried making a really tall and narrow textbox and this would
>work for the first two pages, but when the matrix at the bottom of the
>report grew onto a third page, the third page would not have a textbox and
>the reference would be empty.
> We took another approach, we passed in the ReportItems collection to a
> custom assembly and kept a 'last known good' reference to it. We would
> then call this method on each page and retrieve the last known good. I
> had to pass in the whole ReportItems collection because passing in just
> the report item would result in an #Error for pages that didn't contain
> the hidden text box. From what I can tell all references in an expression
> are resolved which is why I passed the collection. I think this would
> also work in code behind without the custom assembly, but haven't tried
> it.
> Hidden textbox in report body:
> txtSchoolNameHidden
> =First(Fields!OrganizationName.Value, "GetOrgInfo")
> Expression in footer:
> =Code.loc.SchoolName(ReportItems)
>
> Code in Custom Assembly (because we are using a property, had to create an
> instance, rather than static method)
> private string _SchoolName;
> public string
> SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
> input)
> {
> string ReturnVal = null;
> try
> {
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
> rptItemSchoolNameHidden = null;
> rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
> if (rptItemSchoolNameHidden != null)
> {
> _SchoolName = rptItemSchoolNameHidden.Value.ToString();
> }
> }
> catch
> {
> //ignore report item not found error.
> }
> return _SchoolName;
> }
>
> Seems like a lot of work for something simple. Any other ideas would be
> appreciated.
> Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF
> only the first page has my database field in the footer.
>
>
> Steve MunLeeuw
>
>
> "Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
> news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
>> Hi,
>> I have created a multi-page report. I want to display a text box on each
>> page of the report. How to do so?
>> Note that I cannot make the text box as a part of data region (like
>> list).
>> Its a kind of header information that need to be outputed in each page.
>> I cannot place the text box in header of the page since it takes value
>> from
>> a database field. The header doesn't accept database fields.
>> regards,
>> Sachin.
>

Friday, February 24, 2012

Display text in SQL reports

Good evening. This may be an easy question but I am using SMS Reporting
(which is SQL Reporting Services) to generate reports for inventory
collections, etc. I am not the greatest with SQL but is / how can I display
plain text in my reports? This text is descriptive / comment text and not
part of the SQL data itself.
Thanks in advance for any assistance,
UCGOn Jun 26, 4:53 pm, UnderCoverGuy
<UnderCover...@.discussions.microsoft.com> wrote:
> Good evening. This may be an easy question but I am using SMS Reporting
> (which is SQL Reporting Services) to generate reports for inventory
> collections, etc. I am not the greatest with SQL but is / how can I display
> plain text in my reports? This text is descriptive / comment text and not
> part of the SQL data itself.
> Thanks in advance for any assistance,
> UCG
On the Layout view, in the toolbox, select a textbox control and add
it to the report and then click inside the textbox and enter the text.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks - but unfortunately it won't work for this situation. What I have to
do is directly edit SQL code / statements - no controls or GUI.
Any other thoughts anyway?
Thanks Enrique,
UCG|||On Jun 26, 8:06 pm, UnderCoverGuy
<UnderCover...@.discussions.microsoft.com> wrote:
> Thanks - but unfortunately it won't work for this situation. What I have to
> do is directly edit SQL code / statements - no controls or GUI.
> Any other thoughts anyway?
> Thanks Enrique,
> UCG
Could you explain the situation in more detail? I'm not quite
following you.
Enrique Martinez
Sr. Software Consultant|||See below:
---
select distinct
v_GS_Computer_system.Name0 AS "PC Name"
, v_GS_Computer_system.UserName0 AS "User last logged on"
, v_gs_Operating_system.csdversion0 AS "SP Level"
, v_GS_Computer_system.manufacturer0 AS "Make"
, v_GS_Computer_system.model0 AS "Model"
, v_GS_x86_PC_memory.totalphysicalmemory0 AS "RAM Installed"
, v_gs_processor.maxclockspeed0 AS "CPU Speed"
, v_gs_disk.Size0 AS "Disk Size"
, v_R_System.Active0 AS "Active"
from
v_gs_computer_system,
v_GS_x86_PC_memory,
v_GS_processor,
v_GS_video_controller,
v_GS_Operating_system,
v_GS_Network_Adapter_Configur,
v_R_System,
v_gs_disk
WHERE
v_gs_operating_system.resourceid = v_gs_computer_system.resourceid
and v_gs_computer_system.resourceid = v_gs_computer_system.resourceid
and v_GS_x86_PC_memory.resourceid = v_gs_computer_system.resourceid
and v_GS_disk.resourceid = v_gs_computer_system.resourceid
and v_GS_processor.resourceid = v_gs_computer_system.resourceid
and v_GS_Operating_system.caption0 like '%Microsoft Windows 2000 Pro%'
and v_GS_video_controller.CurrentHorizontalResolution0 <> ""
and v_GS_x86_PC_memory.totalphysicalmemory0 > '512384'
and v_gs_processor.maxclockspeed0 > '1400'
and v_gs_disk.Size0 > '10000'
and v_R_System.Active0 = 1
Order by
v_gs_computer_system.name0
---
This isn't the entire report but it should help you get the gist of what I
am trying to do. SMS Reporting (which is a SQL Reporting Services back-end)
is how this is being done (no GUI, no wizards, no controls, etc. but only a
SQL code editor). This report will gather info from the SQL db (such as HD
size, CPU speed, etc.) and display the systems where the criteria is met.
There is a header with the "entire" report that will explain what the data is
for. Now, I need to show more reports with different criteria (but from
within the same report). So, what I have done is copy this report (above)
and paste it at the end of what I have and change the criteria (where RAM <
512000, etc.) so that we see which systems meet different criteria - so that
we can install XP on it. Next, copy / paste the same report to the end of
what is already there and again, change the criteria (maybe HD size needs).
Basically, combining several reports into one. I could break these into
individual reports and link to each of them from the main report but I don't
know how to do that. I need to display a header (or comments) at the
beginning of each so that the reader of the report knows which section is
which. So, unless I can figure out how to "chain" reports, i.e.,
sub-reports, then what I need to do is try and display comments (like a
header - text for each report) along the way at the start of each section
(i.e., comment - "This section shows HD's needing to be upgraded / replaced",
comments like that).
Hope this helps explain it.
Thanks in advance,
UCG|||I think this may be helpful. You can simply select text and give it a
column header and include it in your query. Each row will then have the
text (I'm calling it group_text) and you can group on it and produce your
header row so that it's not repeated. See the following example:
select distinct
'This section shows HDs needing to be upgraded / replaced' AS group_text,
v_GS_Computer_system.Name0 AS "PC Name"
, v_GS_Computer_system.UserName0 AS "User last logged on"
, v_gs_Operating_system.csdversion0 AS "SP Level"
, v_GS_Computer_system.manufacturer0 AS "Make"
, v_GS_Computer_system.model0 AS "Model"
, v_GS_x86_PC_memory.totalphysicalmemory0 AS "RAM Installed"
, v_gs_processor.maxclockspeed0 AS "CPU Speed"
, v_gs_disk.Size0 AS "Disk Size"
, v_R_System.Active0 AS "Active"
from
v_gs_computer_system,
v_GS_x86_PC_memory,
v_GS_processor,
v_GS_video_controller,
v_GS_Operating_system,
v_GS_Network_Adapter_Configur,
v_R_System,
v_gs_disk
WHERE
v_gs_operating_system.resourceid = v_gs_computer_system.resourceid
and v_gs_computer_system.resourceid = v_gs_computer_system.resourceid
and v_GS_x86_PC_memory.resourceid = v_gs_computer_system.resourceid
and v_GS_disk.resourceid = v_gs_computer_system.resourceid
and v_GS_processor.resourceid = v_gs_computer_system.resourceid
and v_GS_Operating_system.caption0 like '%Microsoft Windows 2000 Pro%'
and v_GS_video_controller.CurrentHorizontalResolution0 <> ""
and v_GS_x86_PC_memory.totalphysicalmemory0 > '512384'
and v_gs_processor.maxclockspeed0 > '1400'
and v_gs_disk.Size0 > '10000'
and v_R_System.Active0 = 1
Order by
v_gs_computer_system.name0
"UnderCoverGuy" <UnderCoverGuy@.discussions.microsoft.com> wrote in message
news:5E037208-3BA5-47CF-8B6A-C84F6A1EDC6F@.microsoft.com...
> See below:
> ---
> select distinct
> v_GS_Computer_system.Name0 AS "PC Name"
> , v_GS_Computer_system.UserName0 AS "User last logged on"
> , v_gs_Operating_system.csdversion0 AS "SP Level"
> , v_GS_Computer_system.manufacturer0 AS "Make"
> , v_GS_Computer_system.model0 AS "Model"
> , v_GS_x86_PC_memory.totalphysicalmemory0 AS "RAM Installed"
> , v_gs_processor.maxclockspeed0 AS "CPU Speed"
> , v_gs_disk.Size0 AS "Disk Size"
> , v_R_System.Active0 AS "Active"
> from
> v_gs_computer_system,
> v_GS_x86_PC_memory,
> v_GS_processor,
> v_GS_video_controller,
> v_GS_Operating_system,
> v_GS_Network_Adapter_Configur,
> v_R_System,
> v_gs_disk
> WHERE
> v_gs_operating_system.resourceid = v_gs_computer_system.resourceid
> and v_gs_computer_system.resourceid = v_gs_computer_system.resourceid
> and v_GS_x86_PC_memory.resourceid = v_gs_computer_system.resourceid
> and v_GS_disk.resourceid = v_gs_computer_system.resourceid
> and v_GS_processor.resourceid = v_gs_computer_system.resourceid
> and v_GS_Operating_system.caption0 like '%Microsoft Windows 2000 Pro%'
> and v_GS_video_controller.CurrentHorizontalResolution0 <> ""
> and v_GS_x86_PC_memory.totalphysicalmemory0 > '512384'
> and v_gs_processor.maxclockspeed0 > '1400'
> and v_gs_disk.Size0 > '10000'
> and v_R_System.Active0 = 1
> Order by
> v_gs_computer_system.name0
> ---
> This isn't the entire report but it should help you get the gist of what I
> am trying to do. SMS Reporting (which is a SQL Reporting Services
> back-end)
> is how this is being done (no GUI, no wizards, no controls, etc. but only
> a
> SQL code editor). This report will gather info from the SQL db (such as
> HD
> size, CPU speed, etc.) and display the systems where the criteria is met.
> There is a header with the "entire" report that will explain what the data
> is
> for. Now, I need to show more reports with different criteria (but from
> within the same report). So, what I have done is copy this report (above)
> and paste it at the end of what I have and change the criteria (where RAM
> <
> 512000, etc.) so that we see which systems meet different criteria - so
> that
> we can install XP on it. Next, copy / paste the same report to the end of
> what is already there and again, change the criteria (maybe HD size
> needs).
> Basically, combining several reports into one. I could break these into
> individual reports and link to each of them from the main report but I
> don't
> know how to do that. I need to display a header (or comments) at the
> beginning of each so that the reader of the report knows which section is
> which. So, unless I can figure out how to "chain" reports, i.e.,
> sub-reports, then what I need to do is try and display comments (like a
> header - text for each report) along the way at the start of each section
> (i.e., comment - "This section shows HD's needing to be upgraded /
> replaced",
> comments like that).
> Hope this helps explain it.
>
> Thanks in advance,
> UCG
>|||That was exactly what I needed. You response is MUCH appreciated.
Thanks again,
UCG