Thursday, February 9, 2012

Accessing multiple recordsets in MRS

Hi all,
Can anybody tell me how to acccess multiple recordsets in mrs. Please
read the following scenario.
I have written a Stored Procedure in SQL Server, this SP returns two
recordsets, suppose the sp name is my_test_sp (lets assign some alias
for those two recordsets as recordsrt1 and recordset2). I am creating a
report which is fetching data from my_test_sp, lets call this report as
my_test_report.
When I set the dataset properties of my_test_report to access
my_test_sp, the field list it generates contais fields that are from
recordset1, it dosenot display any field from recordset2.
Now here; is there any way i can access both recordset1 and recordset2
at a same time. It ll be ok if i create more than one datasets, but
then the question will be can i connect a singal data object like table
to multiple datasets at the same time? and will there be any link
between these two datasets?
I hope I am not missing anything at the design time. Your help will be
grately appriciated.
Thanks in advace. :)
Manoj SA few design issues to consider:
1. RS can only handle one result set at a time from a Stored Procedure (as
you have seen). If you want both you would need the SP to have a parameter
that tells it which to return and then call the SP twice.
2. RS does not associated datasets with one another.
3. Subreports are how you Master-detail
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Monty" <manojshirgurkar@.gmail.com> wrote in message
news:1164179273.330677.7870@.b28g2000cwb.googlegroups.com...
> Hi all,
> Can anybody tell me how to acccess multiple recordsets in mrs. Please
> read the following scenario.
> I have written a Stored Procedure in SQL Server, this SP returns two
> recordsets, suppose the sp name is my_test_sp (lets assign some alias
> for those two recordsets as recordsrt1 and recordset2). I am creating a
> report which is fetching data from my_test_sp, lets call this report as
> my_test_report.
> When I set the dataset properties of my_test_report to access
> my_test_sp, the field list it generates contais fields that are from
> recordset1, it dosenot display any field from recordset2.
> Now here; is there any way i can access both recordset1 and recordset2
> at a same time. It ll be ok if i create more than one datasets, but
> then the question will be can i connect a singal data object like table
> to multiple datasets at the same time? and will there be any link
> between these two datasets?
> I hope I am not missing anything at the design time. Your help will be
> grately appriciated.
> Thanks in advace. :)
> Manoj S
>|||you're talking about MARS right?
MARS was a scam; it doesn't work
I still can't open two datareaders on the same connection.. and that's
what it's advertised as fixing
those cocksuckers just need to go back to ADO; things have been buggy
as hell ever since they went down this ADO.net route.. I mean; what a
joke
-Aaron
Monty wrote:
> Hi all,
> Can anybody tell me how to acccess multiple recordsets in mrs. Please
> read the following scenario.
> I have written a Stored Procedure in SQL Server, this SP returns two
> recordsets, suppose the sp name is my_test_sp (lets assign some alias
> for those two recordsets as recordsrt1 and recordset2). I am creating a
> report which is fetching data from my_test_sp, lets call this report as
> my_test_report.
> When I set the dataset properties of my_test_report to access
> my_test_sp, the field list it generates contais fields that are from
> recordset1, it dosenot display any field from recordset2.
> Now here; is there any way i can access both recordset1 and recordset2
> at a same time. It ll be ok if i create more than one datasets, but
> then the question will be can i connect a singal data object like table
> to multiple datasets at the same time? and will there be any link
> between these two datasets?
> I hope I am not missing anything at the design time. Your help will be
> grately appriciated.
> Thanks in advace. :)
> Manoj S

No comments:

Post a Comment