Showing posts with label method. Show all posts
Showing posts with label method. Show all posts

Wednesday, March 21, 2012

Problem with SetReportDataSources method

Hi,

Thanks in Advacne,

I'm using Reporting Service 2000 Web Service SetReportDataSources method to associate Datasource with Report. But I'm getting error.

"The data source 'DS_Code_002' cannot be found in this report. --> The data source 'DS_Code_002' cannot be found in this report. "

I searched lot but i didn't get solution .Some posts telling like "this is a bug in RSWS". Please help me to resolve the issue.

Code:

DataSourceReference reference = new DataSourceReference();

reference.Reference = txtDSPath.Text;

DataSource[] dataSources = new DataSource[1];

DataSource ds = new DataSource();

ds.Item = (DataSourceDefinitionOrReference) reference;

ds.Name = "Dsname";

dataSources[0] = ds;

rs.SetReportDataSources(txtReportPath.Text, dataSources);

Thanks again,

Krishna kumar.M

Hi,

After the long try myself found the answer.

if datasource name is same like the hardcoded data source name in .rdl file it is working fine

So I chnage to code as follows now it is working fine. Otherwise you have to change the name in .rdl file manually.

Code

DataSourceReference dRef= new ReportingService.ReportingServiceWS.DataSourceReference( );

dRef.Reference = txtDSPath.Text;

DataSource []ds = rs.GetReportDataSources(txtReportPath.Text);

DataSource d = new ReportingService.ReportingServiceWS.DataSource();

d.Item = (RS.DataSourceDefinitionOrReference)dRef;

d.Name= ds[0].Name; // Get the new name store it in new object

ds[0] = d;

rs.SetReportDataSources(txtReportPath.Text,ds);

Wednesday, March 7, 2012

Problem with RDA Pull method

Hi,
I am developing a mobile application for Pocket PC and using Pocket PC 2003
Emulator. I am using RDA to pull the data information on the mobile device.
When I use "EXEC sp_MyStoredProcedure {Parameters}" the RDA Pull function
works fine and creates table on the local sql ce database as long as the SP
DOES NOT use hash tables. The problem is that if SP called uses a Hash Table
then rda.pull() does not give me any error but it does not create a table on
local sql ce database.
RDA.PULL WORKS for sp_MyStoredProcedure having code like:
CREATE PROCURE sp_MyStoredProcedure
AS
BEGIN
Select * from tblUser
END
RDA.PULL DOES NOT WORK for sp_MyStoredProcedure having code like:
CREATE PROCURE sp_MyStoredProcedure
AS
BEGIN
Create Table #Users( Name varchar(100), UserID varchar(15), Password
varchar(20))
Insert into #User
Select * from tblUser Where blah blah..
Select * from #Users
END
I certainly need to get this SP with hash table work with RDA pull method.
Any help will be greatly appreciated.
Regards
~Sanjeev
post this question to microsoft.public.sqlserver.ce
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Sanjeev Yamdagni" <sanjeev@.thomaskelly.com> wrote in message
news:OELq$GVQFHA.2932@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I am developing a mobile application for Pocket PC and using Pocket PC
2003
> Emulator. I am using RDA to pull the data information on the mobile
device.
> When I use "EXEC sp_MyStoredProcedure {Parameters}" the RDA Pull function
> works fine and creates table on the local sql ce database as long as the
SP
> DOES NOT use hash tables. The problem is that if SP called uses a Hash
Table
> then rda.pull() does not give me any error but it does not create a table
on
> local sql ce database.
> RDA.PULL WORKS for sp_MyStoredProcedure having code like:
> CREATE PROCURE sp_MyStoredProcedure
> AS
> BEGIN
> Select * from tblUser
> END
>
> RDA.PULL DOES NOT WORK for sp_MyStoredProcedure having code like:
> CREATE PROCURE sp_MyStoredProcedure
> AS
> BEGIN
> Create Table #Users( Name varchar(100), UserID varchar(15), Password
> varchar(20))
> Insert into #User
> Select * from tblUser Where blah blah..
> Select * from #Users
> END
>
> I certainly need to get this SP with hash table work with RDA pull method.
> Any help will be greatly appreciated.
> Regards
> ~Sanjeev
>
>
>