Monday, March 19, 2012

how can I make a report that will run against a list of servers?

Hi, I have SQL 2005 sp2 installed on a test server that I run admin type
reports from. I have a report that I want to run against a list of servers,
the list is from an SQL table on the same server as RS. I've found that data
source parameters are possible, but I can't seem to get it to work. Can
anyone point to an example?Have you tried the examples provided? You mention data source parameters. It
makes me wonder if you are looking at the right information. What you want
to do is base your data source as an expression. From Books OnLine
>>>>>>
You can put an expression into a connection string to allow users to select
the data source at run time. For example, suppose a multinational firm has
data servers in several countries. With an expression-based connection
string, a user who is running a sales report can select a data source for a
particular country before running the report.
The following example illustrates the use of a data source expression in a
SQL Server connection string. The example assumes you have created a report
parameter named ServerName:
Copy Code
="data source=" & Parameters!ServerName.Value & ";initial
catalog=AdventureWorks
Data source expressions are processed at run time or when a report is
previewed. The expression must be written in Visual Basic. Use the following
guidelines when defining a data source expression:
a.. Design the report using a static connection string. A static
connection string refers to a connection string that is not set through an
expression (for example, when you follow the steps for creating a
report-specific or shared data source, you are defining a static connection
string). Using a static connection string allows you to connect to the data
source in Report Designer so that you can get the query results you need to
create the report.
b.. When defining the data source connection, do not use a shared data
source. You cannot use a data source expression in a shared data source. You
must define a report-specific data source for the report.
c.. Specify credentials separately from the connection string. You can use
stored credentials, prompted credentials, or integrated security.
d.. Add a report parameter to specify a data source. For parameter values,
you can either provide a static list of available values (in this case, the
available values should be data sources you can use with the report) or
define a query that retrieves a list of data sources at run time.
e.. Be sure that the list of data sources shares the same database schema.
All report design begins with schema information. If there is a mismatch
between the schema used to define the report and the actual schema used by
the report at run time, the report might not run.
f.. Before publishing the report, replace the static connection string
with an expression. Wait until you are finished designing the report before
you replace the static connection string with an expression. Once you use an
expression, you cannot execute the query in Report Designer. Furthermore,
the field list in the Datasets window and the Parameters list will not
update automatically.
>>>>>>>
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
news:9260F115-1407-4227-8A74-2D545456E620@.microsoft.com...
> Hi, I have SQL 2005 sp2 installed on a test server that I run admin type
> reports from. I have a report that I want to run against a list of
> servers,
> the list is from an SQL table on the same server as RS. I've found that
> data
> source parameters are possible, but I can't seem to get it to work. Can
> anyone point to an example?
begin 666 copycode.gif
M1TE&.#EA#P`/`.9F`).BM[+"V*[$\(&NY:Z_U'.AWER,VIBKQBE4JIFLQ_S]
M_LO/U)*P[8JN_,73\JFXSF2%R=;>[/;Y_>OO]BM7L6Z<VB)&CZ:]["!!AJ"Y
M[VB7U9RPSM+;\9>FNZ.RR"-(EOGZ_")%CIRKP;+)\*[0_Z^^U#5EQ2E4K*FY
MSX*?V,_9YM+6W9JMRFZ7YV".Y\S7[-'ZINOS)"JX+K:_^KO^R5,FR=0HIJN
MRI:FN^;J\^#F\25-G25*F+_+W=+>\,#*X,+.Y/7V^[K%U/O]_B-'DG^G\_#T
M^\?2X7.2T4=NNI_%^B%#B=OD]_?X^Z_#[?#R^)>IQ*K![XZX\"%#BIRUYZ*Q
MQV:"I?#S^*.RQYJNS*O"[]/>]55YP2I7LW*:ZH6GZR=0I%MRC[[.\#5)8U&#
MT?_______P``````````````````````````````````````````````````
M`````````````````````````````````````````````````"'Y! $``&8`
M+ `````/``\```>?@.&:"@.X2%AH>"`0$$! \>*X@.!99-E558+AR64"CA"89B%
M*&4S)#X``EI1&0P,+X)8DR!/.0*495\F0&8B94I2`P47MEXC%#\="D$3.A%4
M90T-'"Y=)V `3< 5&C*41DP.63L`5S J1STI944M!F1D-SP`8_/S2&5#-%MB
F3@.E$AA!EVKDC<R"$(2X2-L1@.D> `E"6&DB! 8*/&!PM3, 0"`#L`
`
end|||Thanks for the prompt reply Bruce. The BOL info you listed was the
information I was looking at. However, I want my reports to run
automatically, with no user intervention against a list of server names.
What led me to believe this was possible was the quote:
> d.. Add a report parameter to specify a data source. For parameter values,
> you can either provide a static list of available values (in this case, the
> available values should be data sources you can use with the report) or
> define a query that retrieves a list of data sources at run time.
Is this still possible ?
"Bruce L-C [MVP]" wrote:
> Have you tried the examples provided? You mention data source parameters. It
> makes me wonder if you are looking at the right information. What you want
> to do is base your data source as an expression. From Books OnLine
> >>>>>>
> You can put an expression into a connection string to allow users to select
> the data source at run time. For example, suppose a multinational firm has
> data servers in several countries. With an expression-based connection
> string, a user who is running a sales report can select a data source for a
> particular country before running the report.
> The following example illustrates the use of a data source expression in a
> SQL Server connection string. The example assumes you have created a report
> parameter named ServerName:
> Copy Code
> ="data source=" & Parameters!ServerName.Value & ";initial
> catalog=AdventureWorks
> Data source expressions are processed at run time or when a report is
> previewed. The expression must be written in Visual Basic. Use the following
> guidelines when defining a data source expression:
> a.. Design the report using a static connection string. A static
> connection string refers to a connection string that is not set through an
> expression (for example, when you follow the steps for creating a
> report-specific or shared data source, you are defining a static connection
> string). Using a static connection string allows you to connect to the data
> source in Report Designer so that you can get the query results you need to
> create the report.
>
> b.. When defining the data source connection, do not use a shared data
> source. You cannot use a data source expression in a shared data source. You
> must define a report-specific data source for the report.
>
> c.. Specify credentials separately from the connection string. You can use
> stored credentials, prompted credentials, or integrated security.
>
> d.. Add a report parameter to specify a data source. For parameter values,
> you can either provide a static list of available values (in this case, the
> available values should be data sources you can use with the report) or
> define a query that retrieves a list of data sources at run time.
>
> e.. Be sure that the list of data sources shares the same database schema.
> All report design begins with schema information. If there is a mismatch
> between the schema used to define the report and the actual schema used by
> the report at run time, the report might not run.
>
> f.. Before publishing the report, replace the static connection string
> with an expression. Wait until you are finished designing the report before
> you replace the static connection string with an expression. Once you use an
> expression, you cannot execute the query in Report Designer. Furthermore,
> the field list in the Datasets window and the Parameters list will not
> update automatically.
> >>>>>>>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
> news:9260F115-1407-4227-8A74-2D545456E620@.microsoft.com...
> > Hi, I have SQL 2005 sp2 installed on a test server that I run admin type
> > reports from. I have a report that I want to run against a list of
> > servers,
> > the list is from an SQL table on the same server as RS. I've found that
> > data
> > source parameters are possible, but I can't seem to get it to work. Can
> > anyone point to an example?
>
>|||You could have a main report that is empty. Then have a subreport that has a
parameter like the example. Embed the subreport into the main report, right
mouse click, parameters and map the parameter to one of the server. Repeat
with a different server with each subreport.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
news:02A4BBD3-9376-4EA9-AE7D-A89FFE9FD75F@.microsoft.com...
> Thanks for the prompt reply Bruce. The BOL info you listed was the
> information I was looking at. However, I want my reports to run
> automatically, with no user intervention against a list of server names.
> What led me to believe this was possible was the quote:
>> d.. Add a report parameter to specify a data source. For parameter
>> values,
>> you can either provide a static list of available values (in this case,
>> the
>> available values should be data sources you can use with the report) or
>> define a query that retrieves a list of data sources at run time.
> Is this still possible ?
>
> "Bruce L-C [MVP]" wrote:
>> Have you tried the examples provided? You mention data source parameters.
>> It
>> makes me wonder if you are looking at the right information. What you
>> want
>> to do is base your data source as an expression. From Books OnLine
>> >>>>>>
>> You can put an expression into a connection string to allow users to
>> select
>> the data source at run time. For example, suppose a multinational firm
>> has
>> data servers in several countries. With an expression-based connection
>> string, a user who is running a sales report can select a data source for
>> a
>> particular country before running the report.
>> The following example illustrates the use of a data source expression in
>> a
>> SQL Server connection string. The example assumes you have created a
>> report
>> parameter named ServerName:
>> Copy Code
>> ="data source=" & Parameters!ServerName.Value & ";initial
>> catalog=AdventureWorks
>> Data source expressions are processed at run time or when a report is
>> previewed. The expression must be written in Visual Basic. Use the
>> following
>> guidelines when defining a data source expression:
>> a.. Design the report using a static connection string. A static
>> connection string refers to a connection string that is not set through
>> an
>> expression (for example, when you follow the steps for creating a
>> report-specific or shared data source, you are defining a static
>> connection
>> string). Using a static connection string allows you to connect to the
>> data
>> source in Report Designer so that you can get the query results you need
>> to
>> create the report.
>>
>> b.. When defining the data source connection, do not use a shared data
>> source. You cannot use a data source expression in a shared data source.
>> You
>> must define a report-specific data source for the report.
>>
>> c.. Specify credentials separately from the connection string. You can
>> use
>> stored credentials, prompted credentials, or integrated security.
>>
>> d.. Add a report parameter to specify a data source. For parameter
>> values,
>> you can either provide a static list of available values (in this case,
>> the
>> available values should be data sources you can use with the report) or
>> define a query that retrieves a list of data sources at run time.
>>
>> e.. Be sure that the list of data sources shares the same database
>> schema.
>> All report design begins with schema information. If there is a mismatch
>> between the schema used to define the report and the actual schema used
>> by
>> the report at run time, the report might not run.
>>
>> f.. Before publishing the report, replace the static connection string
>> with an expression. Wait until you are finished designing the report
>> before
>> you replace the static connection string with an expression. Once you use
>> an
>> expression, you cannot execute the query in Report Designer. Furthermore,
>> the field list in the Datasets window and the Parameters list will not
>> update automatically.
>> >>>>>>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
>> news:9260F115-1407-4227-8A74-2D545456E620@.microsoft.com...
>> > Hi, I have SQL 2005 sp2 installed on a test server that I run admin
>> > type
>> > reports from. I have a report that I want to run against a list of
>> > servers,
>> > the list is from an SQL table on the same server as RS. I've found
>> > that
>> > data
>> > source parameters are possible, but I can't seem to get it to work.
>> > Can
>> > anyone point to an example?
>>|||I'll give it a shot & let you know. Thanks.
"Bruce L-C [MVP]" wrote:
> You could have a main report that is empty. Then have a subreport that has a
> parameter like the example. Embed the subreport into the main report, right
> mouse click, parameters and map the parameter to one of the server. Repeat
> with a different server with each subreport.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
> news:02A4BBD3-9376-4EA9-AE7D-A89FFE9FD75F@.microsoft.com...
> > Thanks for the prompt reply Bruce. The BOL info you listed was the
> > information I was looking at. However, I want my reports to run
> > automatically, with no user intervention against a list of server names.
> > What led me to believe this was possible was the quote:
> >> d.. Add a report parameter to specify a data source. For parameter
> >> values,
> >> you can either provide a static list of available values (in this case,
> >> the
> >> available values should be data sources you can use with the report) or
> >> define a query that retrieves a list of data sources at run time.
> >
> > Is this still possible ?
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Have you tried the examples provided? You mention data source parameters.
> >> It
> >> makes me wonder if you are looking at the right information. What you
> >> want
> >> to do is base your data source as an expression. From Books OnLine
> >> >>>>>>
> >> You can put an expression into a connection string to allow users to
> >> select
> >> the data source at run time. For example, suppose a multinational firm
> >> has
> >> data servers in several countries. With an expression-based connection
> >> string, a user who is running a sales report can select a data source for
> >> a
> >> particular country before running the report.
> >>
> >> The following example illustrates the use of a data source expression in
> >> a
> >> SQL Server connection string. The example assumes you have created a
> >> report
> >> parameter named ServerName:
> >>
> >> Copy Code
> >> ="data source=" & Parameters!ServerName.Value & ";initial
> >> catalog=AdventureWorks
> >>
> >> Data source expressions are processed at run time or when a report is
> >> previewed. The expression must be written in Visual Basic. Use the
> >> following
> >> guidelines when defining a data source expression:
> >>
> >> a.. Design the report using a static connection string. A static
> >> connection string refers to a connection string that is not set through
> >> an
> >> expression (for example, when you follow the steps for creating a
> >> report-specific or shared data source, you are defining a static
> >> connection
> >> string). Using a static connection string allows you to connect to the
> >> data
> >> source in Report Designer so that you can get the query results you need
> >> to
> >> create the report.
> >>
> >>
> >> b.. When defining the data source connection, do not use a shared data
> >> source. You cannot use a data source expression in a shared data source.
> >> You
> >> must define a report-specific data source for the report.
> >>
> >>
> >> c.. Specify credentials separately from the connection string. You can
> >> use
> >> stored credentials, prompted credentials, or integrated security.
> >>
> >>
> >> d.. Add a report parameter to specify a data source. For parameter
> >> values,
> >> you can either provide a static list of available values (in this case,
> >> the
> >> available values should be data sources you can use with the report) or
> >> define a query that retrieves a list of data sources at run time.
> >>
> >>
> >> e.. Be sure that the list of data sources shares the same database
> >> schema.
> >> All report design begins with schema information. If there is a mismatch
> >> between the schema used to define the report and the actual schema used
> >> by
> >> the report at run time, the report might not run.
> >>
> >>
> >> f.. Before publishing the report, replace the static connection string
> >> with an expression. Wait until you are finished designing the report
> >> before
> >> you replace the static connection string with an expression. Once you use
> >> an
> >> expression, you cannot execute the query in Report Designer. Furthermore,
> >> the field list in the Datasets window and the Parameters list will not
> >> update automatically.
> >>
> >> >>>>>>>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >>
> >> "DBAGURU" <DBAGURU@.discussions.microsoft.com> wrote in message
> >> news:9260F115-1407-4227-8A74-2D545456E620@.microsoft.com...
> >> > Hi, I have SQL 2005 sp2 installed on a test server that I run admin
> >> > type
> >> > reports from. I have a report that I want to run against a list of
> >> > servers,
> >> > the list is from an SQL table on the same server as RS. I've found
> >> > that
> >> > data
> >> > source parameters are possible, but I can't seem to get it to work.
> >> > Can
> >> > anyone point to an example?
> >>
> >>
> >>
>
>

No comments:

Post a Comment