Showing posts with label datasource. Show all posts
Showing posts with label datasource. Show all posts

Friday, March 9, 2012

Dynamically Changing the DataSource of the Report

hi to all,

This is SidRogers,

i was newer to the this Reporting Services..

my Pbm is....

Creating the Report with or with out having any dataSource with SqlServer BI Studio.

I have some dummy fields in the Report..after I deployed into the ReportServer...

After that my Task is... Getting that ReportDefinition and Assinging the DataSource at the Runtime..in .Net frameWork 2.0...

upto My R & D.. i got one ReportDefintion.VB file.... I saw other forums. it said that. By using classes in this Vb file we can change the DataSource..if so may i know how...

this is very Urgent Work..

pleaseeeeeee urgently let me knoww..if u know any body....

thax in Advance,

Hi Sid-

You can set data source properties of a report through VB script, using the rs.exe tool, or you can alter it via the SOAP API from any C#/VB application. For more information on using script, some samples can be found here: http://msdn2.microsoft.com/en-us/library/ms160854.aspx

-JonHP

Dynamically change report datasource based upon parameter.

I currently have one report that I would like to be able to use to report
off of stored procs on multiple servers. And am hoping someone can point me
in the right direction.
Example:
Report A will run off of storedProc1 which exists in every database.
However, the specific server and database to use will depend upon the user
currently logged in.
Currently I am trying to make use of the custom dataset extension (by Teo
Lachev) to report off of an XML string. Unfortunately, I am having fits
trying to get it to work and don't even know if this is the best way.
Any help would be appreciated.Various approaches for dynamic database connections in RS 2000 have been
discussed on this newsgroup:
* Use a custom data processing extension (as you currently do)
* Use the linked server functionality of SQL Server; please check this
thread:
http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.sqlserver.reportingsvcs&mid=848bac6b-98a2-4de7-abfd-bf199a99b660&sloc=en-us
* If the databases are on the same server, use a dynamic query text (i.e.
="select * from " & Parameters!DatabaseName.Value & "..table")
* If you're just toggling between two or three databases, you can publish
the same report 3 times with 3 different names using 3 different data
sources and write a main report that shows/hides the correct subreport based
on whatever criteria you want.
Native support (expression-based connection strings) is available in RS
2005.
Hope this helps,
Robert
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tarik Peterson" <tarikp@.investigo.net> wrote in message
news:O4%23lPKA9EHA.960@.TK2MSFTNGP11.phx.gbl...
> I currently have one report that I would like to be able to use to report
> off of stored procs on multiple servers. And am hoping someone can point
me
> in the right direction.
> Example:
> Report A will run off of storedProc1 which exists in every database.
> However, the specific server and database to use will depend upon the user
> currently logged in.
> Currently I am trying to make use of the custom dataset extension (by Teo
> Lachev) to report off of an XML string. Unfortunately, I am having fits
> trying to get it to work and don't even know if this is the best way.
> Any help would be appreciated.
>

Dynamically change datasource

Is it possible to dynamically change the datasource in a report? I have a database for each company and I don't want to have to replicate each report for each datasource.

Thanks,

Duncan

Moved to Reporting Services.|||

Hi Duncan,

If your databases are identical you can define them to the report server as linked servers, and build your sql statements for report datasets as dynamic sql statements.

Pass the linked server name as a parameter and use that parameter value in the dynamic sql.

Set data source as :

"Exec " & Parameters!LinkedServer.Value & "." & Parameters!DBName.Value & ".dbo.SampleStoredProcedureName " & Parameters!SampleParameterName.Value

|||

Also check this related thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=16395&SiteID=1

-- Robert

Wednesday, March 7, 2012

Dynamical XML as datasource.

Hi!

I'd like to know if I can pass a datasource as a parameter or better, if a datasource can be set for a report dinamically. The reason is that we're generating an xml dinamically and we would like to use this xml as our datasource. Is this possible?

Thanks in advance!!! :)

Are you looking for expression based connction strings, to have the connection string info for a datasource to be dynamic:

http://blogs.msdn.com/bimusings/archive/2006/07/20/673051.aspx