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

Tuesday, March 20, 2012

change datasource with sqlReportingService2005 class

hi pro , i created model project with .net 2005 after that , create report with reportbuilder that it use this model. it s ok.

i have project and i want to change datasource (connection string ) in runtime when User click on report ,i use sqlReportingService2005 class :

Dim rs As New ReportingService2005()

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = "Data Source=" & serverName & ";Initial Catalog=" & DataBaseName & ";Integrated Security=True"
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = "SQL"
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = False ' True
definition.Prompt = Nothing
definition.WindowsCredentials = True ' False

Try
rs.SetDataSourceContents("/Data Sources/" & DataSourceName, definition)

Catch ex As SoapException
Console.WriteLine(ex.Detail.OuterXml)
End Try
End Sub

error "An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll

Additional information: The request failed with HTTP status 404: Object Not Found." happend

( i checked Enable Unmanged code debugging =true)

please help me

tanks

This error occurs only when the report server URL is given wrong or does not exists. Do check your report server URL assigned to the rs.Url property.

|||

tanks for reply. i was forgotten to say : i have 2 machin ,the first one uses Windows 2003 Server and i installed sql server on it , another machin uses windows a xp and i run project on it( it s like client). when i take project on sql server 2005 it s work nice but when i run project on xp it dosent work.

|||

Are you able to open the report server url in browser?

Change datasource on the fly

is it possible to change the differece datasource when execution of report,
since I need to keep the data into 5 difference databases by some reasons,
but I don't want to create 5 new reports for that each time. it wastle a lot
of time to reproduce the same reports. any ideas I appreciated.
Thanks in advance.Hi,
you can use parametrization to use IIF to change the datasource
properties.
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--|||Could you please give me some samples, I am a newbie for RS.
"Jens" <Jens@.sqlserver2005.de>
'?:1168941447.869460.85450@.11g2000cwr.googlegroups.com...
> Hi,
> you can use parametrization to use IIF to change the datasource
> properties.
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>|||Hi,
i don=B4t have actually a RS Server at hand but it is like the following
query (non-tested), change the connection string to listen to a
parameter:
=3D"Data Source=3D" & Parameters!DataSourceSelector.Value & ";Initial
Catalog=3DSomeDB"
You can also use IIF in the above mentioned statment, like:
=3D"Data Source=3D" & IIF(Parameters!DataSourceSelector.Value =3D
"TestEnvironment";"TestServer";ProductionServer) & ";Initial
Catalog=3DSomeDB"
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--

Change datasource location

All my reports are using odbc connection to connect to database.
Anytime database server is changed I have to manually update the
datasource in each report. My question is there a better way to do
this?
Thanks in Advance,
Bhavnawhat version of crystal u r using?

Using front end interface u can set datasource..|||I am using crystal 10. I know how to update datasource in the report. What I would like to know how to update all the reports datasource at one time instead of opening up each report and changing the datasource.

Thanks!sql

Change Datasource connectionstring

Hey,

I have a SQL Server 2005, an Reporting Services is also installed.
Now I have a report 'Report1' and a datasource 'DS1', the report is build and deployed.
The report works fine when i see it in a browser.

Now I have made a vb.net application with a dataviewer, the dataviewer shows the report 'Report1'.
But I want to be able to change the datasource 'DS1' from my application code.

How can I do this?

thanks

Hi,

you could use a hidden parameter which will influence the beahaviour of a dynamic evaluated connectring string, though connection strings can be designed dynamically like ="Data Source" + IIF(Parameters!SomeParam.Value = 1, "SomeServer",SomeOtherServer") That is a thing which is most common, enabling you to do this also on the brwoser interface by just manipulating the URL of the Report.


HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

Change DataSource between Development and Production

I have some existing .NET app, and so I'd like to integrate the RS w/
them.
Reports created by RS is very impressive, now I need to think about
integration. Two choices for me:
1. URL Access
2. Web Services
Option 1 is the fastest and efficient way, has the followings:
1) DataSource in dev and prod are different, doesn't seem like easy to
change them w/ modifying in the project.
2) SessionID, UserName and Password and other parameters are exposed in
URL unless using SSL, otherwise not secure.
Option 2 needs more coding just like a normal .NET projects but w/o
security concerns, still have to worry about changing DataSource stuff.
For example for .rdl
<DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID>
Our existing .NET has its own web.config file works like a .ini, we put
in all data source connection there, when move to production,
Production Release team needs to change SQL box name, UserID and
password inside of the web.config. Now, how do they change them in
.rdl?
Thanks in advance.Couple of things to consider. First, datasource should be a non-problem if
you use shared datasources (which I recommend). The shared datasource has to
have the same name in both production and dev but that is it. The default
when you deploy is to not overwrite the datasource so once you set it up in
production it will be undisturbed. Second, I suggest using a specific
username and password for retrieving the data from wherever you are getting
it. I create a special readonly user that is used by RS only. This is great
for security since it is readonly and you benefit from connection polling
which you would not if the user account of the user requesting the report is
used. If you report needs to include the user in the where clause (or you
need to use a filter with the username) then user the global variable
User!UserID.
As I said, rdl does not change at all for the datasource.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<hifchan@.yahoo.com> wrote in message
news:1108586517.346073.261520@.c13g2000cwb.googlegroups.com...
> I have some existing .NET app, and so I'd like to integrate the RS w/
> them.
> Reports created by RS is very impressive, now I need to think about
> integration. Two choices for me:
> 1. URL Access
> 2. Web Services
> Option 1 is the fastest and efficient way, has the followings:
> 1) DataSource in dev and prod are different, doesn't seem like easy to
> change them w/ modifying in the project.
> 2) SessionID, UserName and Password and other parameters are exposed in
> URL unless using SSL, otherwise not secure.
> Option 2 needs more coding just like a normal .NET projects but w/o
> security concerns, still have to worry about changing DataSource stuff.
> For example for .rdl
> <DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID>
> Our existing .NET has its own web.config file works like a .ini, we put
> in all data source connection there, when move to production,
> Production Release team needs to change SQL box name, UserID and
> password inside of the web.config. Now, how do they change them in
> .rdl?
> Thanks in advance.
>|||Bruce,
You meant
<DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID> will
not matter as long as the .rdl reference the same <Name> only?|||Yes this is correct. The data source ID is just an internal id used by
report designer only. That is also the reason why the DataSourceID element
is in the report designer namespace: <rd:DataSourceID>. The report server
ignores these ids.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
<hifchan@.yahoo.com> wrote in message
news:1108657866.193950.180150@.g14g2000cwa.googlegroups.com...
> Bruce,
> You meant
> <DataSourceID>413d324e-1ddf-4c4d-8f2e-2dd50bd8d4ac</DataSourceID> will
> not matter as long as the .rdl reference the same <Name> only?
>

change Datasource at runtime

Hi

Is it possible to change the datasource dynamically in reporting services.

For example if I have a dataset named DataSet1 whose datasource1 connects to server1, how can I change the same DataSet1 to use datasource2 to points to a different server. I would like to know if this datasource change is possible out side the dataset (dynamically).
Thanks

Hi pzmrcd
I've had the same problem. I found that it was not possible without re-rendering the SRS code(XML). It is not possible in SRS since you can't use an expression to change the dataset. Also the field names of datasets may differ.

Change Datasource abuout url access

Hallo,
We have a ASP.Net app and need a way to manage the datasource.
We have one report for 5 Customer. Every customer has his own DB on our
Server. And Every customer has his own Datasource in the Reportmanager.
Now i call my report with url and will tell the reportservices to take
Connecton 1 or Connection 2 usw.
can i do this with a URL ACCESS ?
UweAbout the only way you could do that now, is with a parameter you pass into
the report...
Still there is a problem... Connections are not dynamic... So you would have
to put Stored procedures or dynamic queries which referred to linked servers
or used openquery, openrowset to move between servers...
SQL 2005 has a dynamic connection capability that will help make this
easier.
--
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
"Uwe Mielisch" <uwe@.mielisch.de> wrote in message
news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
> Hallo,
> We have a ASP.Net app and need a way to manage the datasource.
> We have one report for 5 Customer. Every customer has his own DB on our
> Server. And Every customer has his own Datasource in the Reportmanager.
> Now i call my report with url and will tell the reportservices to take
> Connecton 1 or Connection 2 usw.
> can i do this with a URL ACCESS ?
> Uwe
>|||Hallo Wayne,
Thank you. What do youn mean with
<parameter you pass into the report...>
Uwe
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> schrieb im Newsbeitrag
news:u1K2jlhiFHA.1412@.TK2MSFTNGP09.phx.gbl...
> About the only way you could do that now, is with a parameter you pass
> into the report...
> Still there is a problem... Connections are not dynamic... So you would
> have to put Stored procedures or dynamic queries which referred to linked
> servers or used openquery, openrowset to move between servers...
> SQL 2005 has a dynamic connection capability that will help make this
> easier.
> --
> 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
> "Uwe Mielisch" <uwe@.mielisch.de> wrote in message
> news:%23UE$dvUiFHA.2916@.TK2MSFTNGP14.phx.gbl...
>> Hallo,
>> We have a ASP.Net app and need a way to manage the datasource.
>> We have one report for 5 Customer. Every customer has his own DB on our
>> Server. And Every customer has his own Datasource in the Reportmanager.
>> Now i call my report with url and will tell the reportservices to take
>> Connecton 1 or Connection 2 usw.
>> can i do this with a URL ACCESS ?
>> Uwe
>

Monday, March 19, 2012

Change data source name

Hi all,

I have created my reports using MDB file. Now I have changed my DB to SQL Server.

I can go and change my Datasource loaction on my machine and the reports work fine. But I need to distribute these reports to all my clients.

And all have different server names.

I am using CRX and VB.NET.

TnxYou can change the location by using Datasource property(or its equivalent) in vb.net