How would you display a dataset's data source in a report?
I want to say something like "This report uses data from X database"
Thanks!
DominiqueCreate a new dataset (data tab, select combo and new dataset).
Switch to generic designer (the button is to the right of the ...)
Put this in:
"Dom" <dominique.plante@.gmail.com> wrote in message
news:1140026946.331926.266950@.z14g2000cwz.googlegroups.com...
> How would you display a dataset's data source in a report?
> I want to say something like "This report uses data from X database"
> Thanks!
> Dominique
>|||Whoops, sent before done. OK here is the whole answer:
Create a new dataset (data tab, select combo and new dataset).
Switch to generic designer (the button is to the right of the ...)
Put this in:
declare @.DBID int
select @.DBID = db_id()
select db_name(@.DBID) as DatabaseName
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Dom" <dominique.plante@.gmail.com> wrote in message
news:1140026946.331926.266950@.z14g2000cwz.googlegroups.com...
> How would you display a dataset's data source in a report?
> I want to say something like "This report uses data from X database"
> Thanks!
> Dominique
>|||Dear Bruce:
I definitely feel on the right track, to get other information, I did
something like
declare @.DBID int
select @.DBID = db_id()
select db_name(@.DBID) as DatabaseName, @.@.version as Version ,
@.@.servername as ServerName
(which I would expect to only return a single row)
And to display, I created a list in layout view, and added the fields
within the list to text boxes. The biggest pain was that I had to
manually add the fields to the dataset, and sometimes VS .NET 2003
would reset the list of fields back to nothing.
Thanks for all the help!!!
Dominique|||You shouldn't have had to manually add the field names. Most likely you just
needed to click on the refresh fields button (to the right of the ..., it
looks like the refresh button of IE).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Dom" <dominique.plante@.gmail.com> wrote in message
news:1140038964.115390.256080@.f14g2000cwb.googlegroups.com...
> Dear Bruce:
> I definitely feel on the right track, to get other information, I did
> something like
> declare @.DBID int
> select @.DBID = db_id()
> select db_name(@.DBID) as DatabaseName, @.@.version as Version ,
> @.@.servername as ServerName
> (which I would expect to only return a single row)
> And to display, I created a list in layout view, and added the fields
> within the list to text boxes. The biggest pain was that I had to
> manually add the fields to the dataset, and sometimes VS .NET 2003
> would reset the list of fields back to nothing.
> Thanks for all the help!!!
> Dominique
>
No comments:
Post a Comment