Hi. I have a need to create a number of different reports via Reporting
Services. All of which are based on stored procedures, none of which require
any parameters. Most if not all of the report is calculated. I am
struggling badly to get even the most basic of the fields in place w/the
correct expressions. The only one I actually got to accept the expression
was a Date field, this is the calculation:
=SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
It, too, fails to preview, indicating the value expression for the field
contains an error. Again, all of the other report items are calculated
fields. SUMs, totals, money formats, CASE statements, CASTs, etc. Using the
report designer/report wizard to 'do it for me' only returns Date and a
couple fields that are not even in my resultset. like one of my values in
the report is 'Total Trades'...one of the fields listed as available is
'ID__Total__'
Further, in VS I've got the report open and am on the data tab, i hit the
Run option, I receive this error: An error occurred while retrieving the
parameters in the query. Could not locate entry in sysdatabases for database
'EXEC databasename'. No entry found with that name. Make sure that the name
is entered correctly.'
Clearly I am doing something very wrong with the stored procedure
definition. Like I said, all of these reports are based on procedures, can
anybody give me some suggestion/direction on the right way to call the procs?
They run w/out parameters...EXEC databasename.dbo.proc that's it.
Please advise.
-- LynnPick the command type as stored procedure and then just enter the name of
the stored procedure. When you click on the ! you should get back the data
and the fields. If you do not get the field list populated then click on the
refresh fields button (to the right of the ..., it looks like the refresh
button for IE).
Note that RS only works with the first resultset returned. It cannot handle
mutliple resultsets.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> Hi. I have a need to create a number of different reports via Reporting
> Services. All of which are based on stored procedures, none of which
> require
> any parameters. Most if not all of the report is calculated. I am
> struggling badly to get even the most basic of the fields in place w/the
> correct expressions. The only one I actually got to accept the expression
> was a Date field, this is the calculation:
> =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> It, too, fails to preview, indicating the value expression for the field
> contains an error. Again, all of the other report items are calculated
> fields. SUMs, totals, money formats, CASE statements, CASTs, etc. Using
> the
> report designer/report wizard to 'do it for me' only returns Date and a
> couple fields that are not even in my resultset. like one of my values in
> the report is 'Total Trades'...one of the fields listed as available is
> 'ID__Total__'
> Further, in VS I've got the report open and am on the data tab, i hit the
> Run option, I receive this error: An error occurred while retrieving the
> parameters in the query. Could not locate entry in sysdatabases for
> database
> 'EXEC databasename'. No entry found with that name. Make sure that the
> name
> is entered correctly.'
> Clearly I am doing something very wrong with the stored procedure
> definition. Like I said, all of these reports are based on procedures,
> can
> anybody give me some suggestion/direction on the right way to call the
> procs?
> They run w/out parameters...EXEC databasename.dbo.proc that's it.
> Please advise.
>
> -- Lynn|||oh, bruce, that is great. I can't believe it was as simple as that. one
remaining problem, though. one of my reports is like this:
Date Total Trades Symbols Traded Total $
-- -- -- --
02/07/2006 333,333 333 33,333,333,333.33
#Stocks Volume Total $
-- -- --
333,333 33,333,333 3,333,333,333.33
EndPoint Liquidity #Trades Volume Total $
-- -- -- -- --
AAAA Add 114,729 21,797,575 583,102,631.33
AAAA Opening 1 27
3,412.53
AAAA Remove 30,836 8,330,843 444,521,928.10
AAAA Route 41 4,543
103,291.31
BBBB Add 26,997 9,940,201 178,600,674.78
BBBB Opening 8,089 1,448,143 44,276,419.41
BBBB Remove 3,406 1,719,403 40,267,318.25
CCCC Add 83,781 22,443,732 746,570,071.43
CCCC Remove 35,756 12,250,359 483,329,796.97
CCCC Route 1,088 244,697 6,655,913.26
DDDD Route 2 62,500 2,539,375.00
DDDD Add 2,354 1,262,589 19,136,233.44
DDDD Remove 258 195,019 6,227,451.69
I only receive the top line in the resultset:
Date Total Trades Symbols Traded Total $
-- -- -- --
02/07/2006 333,333 333 33,333,333,333.33
I assume this is what you mean when you say it will only handle the 1st
resultset. All of my reports have multiple 'chunks' in the body. Do you
have any idea how I can achieve this report via reporting svcs?
Unfortunately, this is very important. Please do advise.
--Lynn
"Bruce L-C [MVP]" wrote:
> Pick the command type as stored procedure and then just enter the name of
> the stored procedure. When you click on the ! you should get back the data
> and the fields. If you do not get the field list populated then click on the
> refresh fields button (to the right of the ..., it looks like the refresh
> button for IE).
> Note that RS only works with the first resultset returned. It cannot handle
> mutliple resultsets.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> > Hi. I have a need to create a number of different reports via Reporting
> > Services. All of which are based on stored procedures, none of which
> > require
> > any parameters. Most if not all of the report is calculated. I am
> > struggling badly to get even the most basic of the fields in place w/the
> > correct expressions. The only one I actually got to accept the expression
> > was a Date field, this is the calculation:
> >
> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >
> > It, too, fails to preview, indicating the value expression for the field
> > contains an error. Again, all of the other report items are calculated
> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc. Using
> > the
> > report designer/report wizard to 'do it for me' only returns Date and a
> > couple fields that are not even in my resultset. like one of my values in
> > the report is 'Total Trades'...one of the fields listed as available is
> > 'ID__Total__'
> >
> > Further, in VS I've got the report open and am on the data tab, i hit the
> > Run option, I receive this error: An error occurred while retrieving the
> > parameters in the query. Could not locate entry in sysdatabases for
> > database
> > 'EXEC databasename'. No entry found with that name. Make sure that the
> > name
> > is entered correctly.'
> >
> > Clearly I am doing something very wrong with the stored procedure
> > definition. Like I said, all of these reports are based on procedures,
> > can
> > anybody give me some suggestion/direction on the right way to call the
> > procs?
> > They run w/out parameters...EXEC databasename.dbo.proc that's it.
> > Please advise.
> >
> >
> > -- Lynn
>
>|||This is three resultsets. RS does not have the ability to handle that. There
is no work around from RS side. You could create another stored procedure
that calls this one and have it return just one of the resultsets.
RS can deal with multiple datasets quite well, but each stored procedure
call can only return one.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> oh, bruce, that is great. I can't believe it was as simple as that. one
> remaining problem, though. one of my reports is like this:
> Date Total Trades Symbols Traded Total $
> -- -- -- --
> 02/07/2006 333,333 333 33,333,333,333.33
> #Stocks Volume Total $
> -- -- --
> 333,333 33,333,333 3,333,333,333.33
> EndPoint Liquidity #Trades Volume Total $
> -- -- -- -- --
> AAAA Add 114,729 21,797,575
> 583,102,631.33
> AAAA Opening 1 27
> 3,412.53
> AAAA Remove 30,836 8,330,843
> 444,521,928.10
> AAAA Route 41 4,543
> 103,291.31
> BBBB Add 26,997 9,940,201
> 178,600,674.78
> BBBB Opening 8,089 1,448,143
> 44,276,419.41
> BBBB Remove 3,406 1,719,403
> 40,267,318.25
> CCCC Add 83,781 22,443,732
> 746,570,071.43
> CCCC Remove 35,756 12,250,359
> 483,329,796.97
> CCCC Route 1,088 244,697
> 6,655,913.26
> DDDD Route 2 62,500
> 2,539,375.00
> DDDD Add 2,354 1,262,589
> 19,136,233.44
> DDDD Remove 258 195,019
> 6,227,451.69
> I only receive the top line in the resultset:
> Date Total Trades Symbols Traded Total $
> -- -- -- --
> 02/07/2006 333,333 333 33,333,333,333.33
> I assume this is what you mean when you say it will only handle the 1st
> resultset. All of my reports have multiple 'chunks' in the body. Do you
> have any idea how I can achieve this report via reporting svcs?
> Unfortunately, this is very important. Please do advise.
> --Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Pick the command type as stored procedure and then just enter the name of
>> the stored procedure. When you click on the ! you should get back the
>> data
>> and the fields. If you do not get the field list populated then click on
>> the
>> refresh fields button (to the right of the ..., it looks like the refresh
>> button for IE).
>> Note that RS only works with the first resultset returned. It cannot
>> handle
>> mutliple resultsets.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> > Hi. I have a need to create a number of different reports via
>> > Reporting
>> > Services. All of which are based on stored procedures, none of which
>> > require
>> > any parameters. Most if not all of the report is calculated. I am
>> > struggling badly to get even the most basic of the fields in place
>> > w/the
>> > correct expressions. The only one I actually got to accept the
>> > expression
>> > was a Date field, this is the calculation:
>> >
>> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >
>> > It, too, fails to preview, indicating the value expression for the
>> > field
>> > contains an error. Again, all of the other report items are calculated
>> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
>> > Using
>> > the
>> > report designer/report wizard to 'do it for me' only returns Date and a
>> > couple fields that are not even in my resultset. like one of my values
>> > in
>> > the report is 'Total Trades'...one of the fields listed as available
>> > is
>> > 'ID__Total__'
>> >
>> > Further, in VS I've got the report open and am on the data tab, i hit
>> > the
>> > Run option, I receive this error: An error occurred while retrieving
>> > the
>> > parameters in the query. Could not locate entry in sysdatabases for
>> > database
>> > 'EXEC databasename'. No entry found with that name. Make sure that the
>> > name
>> > is entered correctly.'
>> >
>> > Clearly I am doing something very wrong with the stored procedure
>> > definition. Like I said, all of these reports are based on procedures,
>> > can
>> > anybody give me some suggestion/direction on the right way to call the
>> > procs?
>> > They run w/out parameters...EXEC databasename.dbo.proc that's it.
>> > Please advise.
>> >
>> >
>> > -- Lynn
>>|||Bruce, I'm not sure I follow. Can you elaborate a little more, please, on
the second, possibly third procedure?
-- Lynn
"Bruce L-C [MVP]" wrote:
> This is three resultsets. RS does not have the ability to handle that. There
> is no work around from RS side. You could create another stored procedure
> that calls this one and have it return just one of the resultsets.
> RS can deal with multiple datasets quite well, but each stored procedure
> call can only return one.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> > oh, bruce, that is great. I can't believe it was as simple as that. one
> > remaining problem, though. one of my reports is like this:
> >
> > Date Total Trades Symbols Traded Total $
> > -- -- -- --
> > 02/07/2006 333,333 333 33,333,333,333.33
> >
> > #Stocks Volume Total $
> > -- -- --
> > 333,333 33,333,333 3,333,333,333.33
> >
> > EndPoint Liquidity #Trades Volume Total $
> > -- -- -- -- --
> > AAAA Add 114,729 21,797,575
> > 583,102,631.33
> > AAAA Opening 1 27
> > 3,412.53
> > AAAA Remove 30,836 8,330,843
> > 444,521,928.10
> > AAAA Route 41 4,543
> > 103,291.31
> > BBBB Add 26,997 9,940,201
> > 178,600,674.78
> > BBBB Opening 8,089 1,448,143
> > 44,276,419.41
> > BBBB Remove 3,406 1,719,403
> > 40,267,318.25
> > CCCC Add 83,781 22,443,732
> > 746,570,071.43
> > CCCC Remove 35,756 12,250,359
> > 483,329,796.97
> > CCCC Route 1,088 244,697
> > 6,655,913.26
> > DDDD Route 2 62,500
> > 2,539,375.00
> > DDDD Add 2,354 1,262,589
> > 19,136,233.44
> > DDDD Remove 258 195,019
> > 6,227,451.69
> >
> > I only receive the top line in the resultset:
> >
> > Date Total Trades Symbols Traded Total $
> > -- -- -- --
> > 02/07/2006 333,333 333 33,333,333,333.33
> >
> > I assume this is what you mean when you say it will only handle the 1st
> > resultset. All of my reports have multiple 'chunks' in the body. Do you
> > have any idea how I can achieve this report via reporting svcs?
> > Unfortunately, this is very important. Please do advise.
> >
> > --Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Pick the command type as stored procedure and then just enter the name of
> >> the stored procedure. When you click on the ! you should get back the
> >> data
> >> and the fields. If you do not get the field list populated then click on
> >> the
> >> refresh fields button (to the right of the ..., it looks like the refresh
> >> button for IE).
> >>
> >> Note that RS only works with the first resultset returned. It cannot
> >> handle
> >> mutliple resultsets.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> > Hi. I have a need to create a number of different reports via
> >> > Reporting
> >> > Services. All of which are based on stored procedures, none of which
> >> > require
> >> > any parameters. Most if not all of the report is calculated. I am
> >> > struggling badly to get even the most basic of the fields in place
> >> > w/the
> >> > correct expressions. The only one I actually got to accept the
> >> > expression
> >> > was a Date field, this is the calculation:
> >> >
> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >
> >> > It, too, fails to preview, indicating the value expression for the
> >> > field
> >> > contains an error. Again, all of the other report items are calculated
> >> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
> >> > Using
> >> > the
> >> > report designer/report wizard to 'do it for me' only returns Date and a
> >> > couple fields that are not even in my resultset. like one of my values
> >> > in
> >> > the report is 'Total Trades'...one of the fields listed as available
> >> > is
> >> > 'ID__Total__'
> >> >
> >> > Further, in VS I've got the report open and am on the data tab, i hit
> >> > the
> >> > Run option, I receive this error: An error occurred while retrieving
> >> > the
> >> > parameters in the query. Could not locate entry in sysdatabases for
> >> > database
> >> > 'EXEC databasename'. No entry found with that name. Make sure that the
> >> > name
> >> > is entered correctly.'
> >> >
> >> > Clearly I am doing something very wrong with the stored procedure
> >> > definition. Like I said, all of these reports are based on procedures,
> >> > can
> >> > anybody give me some suggestion/direction on the right way to call the
> >> > procs?
> >> > They run w/out parameters...EXEC databasename.dbo.proc that's it.
> >> > Please advise.
> >> >
> >> >
> >> > -- Lynn
> >>
> >>
> >>
>
>|||Configure your existing stored procedure to accept a parameter (you can make
it optional so that it doesn't break existing code).
Then call it three times in RS with a static value and create three
datasets.
For instance dataset1
yourproc 1
Dataset2
yourproc 2
etc.
Then in your stored procedure return the appropriate resultset based on the
parameter.
Downside is that your sp is being run three times.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> Bruce, I'm not sure I follow. Can you elaborate a little more, please, on
> the second, possibly third procedure?
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> This is three resultsets. RS does not have the ability to handle that.
>> There
>> is no work around from RS side. You could create another stored procedure
>> that calls this one and have it return just one of the resultsets.
>> RS can deal with multiple datasets quite well, but each stored procedure
>> call can only return one.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> > oh, bruce, that is great. I can't believe it was as simple as that.
>> > one
>> > remaining problem, though. one of my reports is like this:
>> >
>> > Date Total Trades Symbols Traded Total $
>> > -- -- -- --
>> > 02/07/2006 333,333 333 33,333,333,333.33
>> >
>> > #Stocks Volume Total $
>> > -- -- --
>> > 333,333 33,333,333 3,333,333,333.33
>> >
>> > EndPoint Liquidity #Trades Volume Total $
>> > -- -- -- -- --
>> > AAAA Add 114,729 21,797,575
>> > 583,102,631.33
>> > AAAA Opening 1 27
>> > 3,412.53
>> > AAAA Remove 30,836 8,330,843
>> > 444,521,928.10
>> > AAAA Route 41 4,543
>> > 103,291.31
>> > BBBB Add 26,997 9,940,201
>> > 178,600,674.78
>> > BBBB Opening 8,089 1,448,143
>> > 44,276,419.41
>> > BBBB Remove 3,406 1,719,403
>> > 40,267,318.25
>> > CCCC Add 83,781 22,443,732
>> > 746,570,071.43
>> > CCCC Remove 35,756 12,250,359
>> > 483,329,796.97
>> > CCCC Route 1,088 244,697
>> > 6,655,913.26
>> > DDDD Route 2 62,500
>> > 2,539,375.00
>> > DDDD Add 2,354 1,262,589
>> > 19,136,233.44
>> > DDDD Remove 258 195,019
>> > 6,227,451.69
>> >
>> > I only receive the top line in the resultset:
>> >
>> > Date Total Trades Symbols Traded Total $
>> > -- -- -- --
>> > 02/07/2006 333,333 333 33,333,333,333.33
>> >
>> > I assume this is what you mean when you say it will only handle the 1st
>> > resultset. All of my reports have multiple 'chunks' in the body. Do
>> > you
>> > have any idea how I can achieve this report via reporting svcs?
>> > Unfortunately, this is very important. Please do advise.
>> >
>> > --Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Pick the command type as stored procedure and then just enter the name
>> >> of
>> >> the stored procedure. When you click on the ! you should get back the
>> >> data
>> >> and the fields. If you do not get the field list populated then click
>> >> on
>> >> the
>> >> refresh fields button (to the right of the ..., it looks like the
>> >> refresh
>> >> button for IE).
>> >>
>> >> Note that RS only works with the first resultset returned. It cannot
>> >> handle
>> >> mutliple resultsets.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> >> > Hi. I have a need to create a number of different reports via
>> >> > Reporting
>> >> > Services. All of which are based on stored procedures, none of
>> >> > which
>> >> > require
>> >> > any parameters. Most if not all of the report is calculated. I am
>> >> > struggling badly to get even the most basic of the fields in place
>> >> > w/the
>> >> > correct expressions. The only one I actually got to accept the
>> >> > expression
>> >> > was a Date field, this is the calculation:
>> >> >
>> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >> >
>> >> > It, too, fails to preview, indicating the value expression for the
>> >> > field
>> >> > contains an error. Again, all of the other report items are
>> >> > calculated
>> >> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
>> >> > Using
>> >> > the
>> >> > report designer/report wizard to 'do it for me' only returns Date
>> >> > and a
>> >> > couple fields that are not even in my resultset. like one of my
>> >> > values
>> >> > in
>> >> > the report is 'Total Trades'...one of the fields listed as
>> >> > available
>> >> > is
>> >> > 'ID__Total__'
>> >> >
>> >> > Further, in VS I've got the report open and am on the data tab, i
>> >> > hit
>> >> > the
>> >> > Run option, I receive this error: An error occurred while
>> >> > retrieving
>> >> > the
>> >> > parameters in the query. Could not locate entry in sysdatabases for
>> >> > database
>> >> > 'EXEC databasename'. No entry found with that name. Make sure that
>> >> > the
>> >> > name
>> >> > is entered correctly.'
>> >> >
>> >> > Clearly I am doing something very wrong with the stored procedure
>> >> > definition. Like I said, all of these reports are based on
>> >> > procedures,
>> >> > can
>> >> > anybody give me some suggestion/direction on the right way to call
>> >> > the
>> >> > procs?
>> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
>> >> > it.
>> >> > Please advise.
>> >> >
>> >> >
>> >> > -- Lynn
>> >>
>> >>
>> >>
>>|||well, bruce, i'm still not sure i know what to do w/these parameters...how
will i get one parameter to do one resultset and get the other resultsets
w/parameters 2 and 3? but, i will see if i can walk through this.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Configure your existing stored procedure to accept a parameter (you can make
> it optional so that it doesn't break existing code).
> Then call it three times in RS with a static value and create three
> datasets.
> For instance dataset1
> yourproc 1
> Dataset2
> yourproc 2
> etc.
> Then in your stored procedure return the appropriate resultset based on the
> parameter.
> Downside is that your sp is being run three times.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> > Bruce, I'm not sure I follow. Can you elaborate a little more, please, on
> > the second, possibly third procedure?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> This is three resultsets. RS does not have the ability to handle that.
> >> There
> >> is no work around from RS side. You could create another stored procedure
> >> that calls this one and have it return just one of the resultsets.
> >>
> >> RS can deal with multiple datasets quite well, but each stored procedure
> >> call can only return one.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> > oh, bruce, that is great. I can't believe it was as simple as that.
> >> > one
> >> > remaining problem, though. one of my reports is like this:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > #Stocks Volume Total $
> >> > -- -- --
> >> > 333,333 33,333,333 3,333,333,333.33
> >> >
> >> > EndPoint Liquidity #Trades Volume Total $
> >> > -- -- -- -- --
> >> > AAAA Add 114,729 21,797,575
> >> > 583,102,631.33
> >> > AAAA Opening 1 27
> >> > 3,412.53
> >> > AAAA Remove 30,836 8,330,843
> >> > 444,521,928.10
> >> > AAAA Route 41 4,543
> >> > 103,291.31
> >> > BBBB Add 26,997 9,940,201
> >> > 178,600,674.78
> >> > BBBB Opening 8,089 1,448,143
> >> > 44,276,419.41
> >> > BBBB Remove 3,406 1,719,403
> >> > 40,267,318.25
> >> > CCCC Add 83,781 22,443,732
> >> > 746,570,071.43
> >> > CCCC Remove 35,756 12,250,359
> >> > 483,329,796.97
> >> > CCCC Route 1,088 244,697
> >> > 6,655,913.26
> >> > DDDD Route 2 62,500
> >> > 2,539,375.00
> >> > DDDD Add 2,354 1,262,589
> >> > 19,136,233.44
> >> > DDDD Remove 258 195,019
> >> > 6,227,451.69
> >> >
> >> > I only receive the top line in the resultset:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > I assume this is what you mean when you say it will only handle the 1st
> >> > resultset. All of my reports have multiple 'chunks' in the body. Do
> >> > you
> >> > have any idea how I can achieve this report via reporting svcs?
> >> > Unfortunately, this is very important. Please do advise.
> >> >
> >> > --Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Pick the command type as stored procedure and then just enter the name
> >> >> of
> >> >> the stored procedure. When you click on the ! you should get back the
> >> >> data
> >> >> and the fields. If you do not get the field list populated then click
> >> >> on
> >> >> the
> >> >> refresh fields button (to the right of the ..., it looks like the
> >> >> refresh
> >> >> button for IE).
> >> >>
> >> >> Note that RS only works with the first resultset returned. It cannot
> >> >> handle
> >> >> mutliple resultsets.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> > Hi. I have a need to create a number of different reports via
> >> >> > Reporting
> >> >> > Services. All of which are based on stored procedures, none of
> >> >> > which
> >> >> > require
> >> >> > any parameters. Most if not all of the report is calculated. I am
> >> >> > struggling badly to get even the most basic of the fields in place
> >> >> > w/the
> >> >> > correct expressions. The only one I actually got to accept the
> >> >> > expression
> >> >> > was a Date field, this is the calculation:
> >> >> >
> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >
> >> >> > It, too, fails to preview, indicating the value expression for the
> >> >> > field
> >> >> > contains an error. Again, all of the other report items are
> >> >> > calculated
> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
> >> >> > Using
> >> >> > the
> >> >> > report designer/report wizard to 'do it for me' only returns Date
> >> >> > and a
> >> >> > couple fields that are not even in my resultset. like one of my
> >> >> > values
> >> >> > in
> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> > available
> >> >> > is
> >> >> > 'ID__Total__'
> >> >> >
> >> >> > Further, in VS I've got the report open and am on the data tab, i
> >> >> > hit
> >> >> > the
> >> >> > Run option, I receive this error: An error occurred while
> >> >> > retrieving
> >> >> > the
> >> >> > parameters in the query. Could not locate entry in sysdatabases for
> >> >> > database
> >> >> > 'EXEC databasename'. No entry found with that name. Make sure that
> >> >> > the
> >> >> > name
> >> >> > is entered correctly.'
> >> >> >
> >> >> > Clearly I am doing something very wrong with the stored procedure
> >> >> > definition. Like I said, all of these reports are based on
> >> >> > procedures,
> >> >> > can
> >> >> > anybody give me some suggestion/direction on the right way to call
> >> >> > the
> >> >> > procs?
> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
> >> >> > it.
> >> >> > Please advise.
> >> >> >
> >> >> >
> >> >> > -- Lynn
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Hi again, Bruce. Is there any way you can give me an example of how to
change my proc to accept the 3 parameters? I know how to pass parameters to
a procedure, I just don't understand how I can do it to make my procedure gen
three different resultsets.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Configure your existing stored procedure to accept a parameter (you can make
> it optional so that it doesn't break existing code).
> Then call it three times in RS with a static value and create three
> datasets.
> For instance dataset1
> yourproc 1
> Dataset2
> yourproc 2
> etc.
> Then in your stored procedure return the appropriate resultset based on the
> parameter.
> Downside is that your sp is being run three times.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> > Bruce, I'm not sure I follow. Can you elaborate a little more, please, on
> > the second, possibly third procedure?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> This is three resultsets. RS does not have the ability to handle that.
> >> There
> >> is no work around from RS side. You could create another stored procedure
> >> that calls this one and have it return just one of the resultsets.
> >>
> >> RS can deal with multiple datasets quite well, but each stored procedure
> >> call can only return one.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> > oh, bruce, that is great. I can't believe it was as simple as that.
> >> > one
> >> > remaining problem, though. one of my reports is like this:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > #Stocks Volume Total $
> >> > -- -- --
> >> > 333,333 33,333,333 3,333,333,333.33
> >> >
> >> > EndPoint Liquidity #Trades Volume Total $
> >> > -- -- -- -- --
> >> > AAAA Add 114,729 21,797,575
> >> > 583,102,631.33
> >> > AAAA Opening 1 27
> >> > 3,412.53
> >> > AAAA Remove 30,836 8,330,843
> >> > 444,521,928.10
> >> > AAAA Route 41 4,543
> >> > 103,291.31
> >> > BBBB Add 26,997 9,940,201
> >> > 178,600,674.78
> >> > BBBB Opening 8,089 1,448,143
> >> > 44,276,419.41
> >> > BBBB Remove 3,406 1,719,403
> >> > 40,267,318.25
> >> > CCCC Add 83,781 22,443,732
> >> > 746,570,071.43
> >> > CCCC Remove 35,756 12,250,359
> >> > 483,329,796.97
> >> > CCCC Route 1,088 244,697
> >> > 6,655,913.26
> >> > DDDD Route 2 62,500
> >> > 2,539,375.00
> >> > DDDD Add 2,354 1,262,589
> >> > 19,136,233.44
> >> > DDDD Remove 258 195,019
> >> > 6,227,451.69
> >> >
> >> > I only receive the top line in the resultset:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > I assume this is what you mean when you say it will only handle the 1st
> >> > resultset. All of my reports have multiple 'chunks' in the body. Do
> >> > you
> >> > have any idea how I can achieve this report via reporting svcs?
> >> > Unfortunately, this is very important. Please do advise.
> >> >
> >> > --Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Pick the command type as stored procedure and then just enter the name
> >> >> of
> >> >> the stored procedure. When you click on the ! you should get back the
> >> >> data
> >> >> and the fields. If you do not get the field list populated then click
> >> >> on
> >> >> the
> >> >> refresh fields button (to the right of the ..., it looks like the
> >> >> refresh
> >> >> button for IE).
> >> >>
> >> >> Note that RS only works with the first resultset returned. It cannot
> >> >> handle
> >> >> mutliple resultsets.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> > Hi. I have a need to create a number of different reports via
> >> >> > Reporting
> >> >> > Services. All of which are based on stored procedures, none of
> >> >> > which
> >> >> > require
> >> >> > any parameters. Most if not all of the report is calculated. I am
> >> >> > struggling badly to get even the most basic of the fields in place
> >> >> > w/the
> >> >> > correct expressions. The only one I actually got to accept the
> >> >> > expression
> >> >> > was a Date field, this is the calculation:
> >> >> >
> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >
> >> >> > It, too, fails to preview, indicating the value expression for the
> >> >> > field
> >> >> > contains an error. Again, all of the other report items are
> >> >> > calculated
> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
> >> >> > Using
> >> >> > the
> >> >> > report designer/report wizard to 'do it for me' only returns Date
> >> >> > and a
> >> >> > couple fields that are not even in my resultset. like one of my
> >> >> > values
> >> >> > in
> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> > available
> >> >> > is
> >> >> > 'ID__Total__'
> >> >> >
> >> >> > Further, in VS I've got the report open and am on the data tab, i
> >> >> > hit
> >> >> > the
> >> >> > Run option, I receive this error: An error occurred while
> >> >> > retrieving
> >> >> > the
> >> >> > parameters in the query. Could not locate entry in sysdatabases for
> >> >> > database
> >> >> > 'EXEC databasename'. No entry found with that name. Make sure that
> >> >> > the
> >> >> > name
> >> >> > is entered correctly.'
> >> >> >
> >> >> > Clearly I am doing something very wrong with the stored procedure
> >> >> > definition. Like I said, all of these reports are based on
> >> >> > procedures,
> >> >> > can
> >> >> > anybody give me some suggestion/direction on the right way to call
> >> >> > the
> >> >> > procs?
> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
> >> >> > it.
> >> >> > Please advise.
> >> >> >
> >> >> >
> >> >> > -- Lynn
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Bruce, or somebody else, might you give me an example of how to give the proc
3 parameters, producing three resultsets in a way that RS will display them?
Or, am I giving it three parameters and calling it three times? If so, how
would i call the 3 procs in RS?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Configure your existing stored procedure to accept a parameter (you can make
> it optional so that it doesn't break existing code).
> Then call it three times in RS with a static value and create three
> datasets.
> For instance dataset1
> yourproc 1
> Dataset2
> yourproc 2
> etc.
> Then in your stored procedure return the appropriate resultset based on the
> parameter.
> Downside is that your sp is being run three times.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> > Bruce, I'm not sure I follow. Can you elaborate a little more, please, on
> > the second, possibly third procedure?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> This is three resultsets. RS does not have the ability to handle that.
> >> There
> >> is no work around from RS side. You could create another stored procedure
> >> that calls this one and have it return just one of the resultsets.
> >>
> >> RS can deal with multiple datasets quite well, but each stored procedure
> >> call can only return one.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> > oh, bruce, that is great. I can't believe it was as simple as that.
> >> > one
> >> > remaining problem, though. one of my reports is like this:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > #Stocks Volume Total $
> >> > -- -- --
> >> > 333,333 33,333,333 3,333,333,333.33
> >> >
> >> > EndPoint Liquidity #Trades Volume Total $
> >> > -- -- -- -- --
> >> > AAAA Add 114,729 21,797,575
> >> > 583,102,631.33
> >> > AAAA Opening 1 27
> >> > 3,412.53
> >> > AAAA Remove 30,836 8,330,843
> >> > 444,521,928.10
> >> > AAAA Route 41 4,543
> >> > 103,291.31
> >> > BBBB Add 26,997 9,940,201
> >> > 178,600,674.78
> >> > BBBB Opening 8,089 1,448,143
> >> > 44,276,419.41
> >> > BBBB Remove 3,406 1,719,403
> >> > 40,267,318.25
> >> > CCCC Add 83,781 22,443,732
> >> > 746,570,071.43
> >> > CCCC Remove 35,756 12,250,359
> >> > 483,329,796.97
> >> > CCCC Route 1,088 244,697
> >> > 6,655,913.26
> >> > DDDD Route 2 62,500
> >> > 2,539,375.00
> >> > DDDD Add 2,354 1,262,589
> >> > 19,136,233.44
> >> > DDDD Remove 258 195,019
> >> > 6,227,451.69
> >> >
> >> > I only receive the top line in the resultset:
> >> >
> >> > Date Total Trades Symbols Traded Total $
> >> > -- -- -- --
> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >
> >> > I assume this is what you mean when you say it will only handle the 1st
> >> > resultset. All of my reports have multiple 'chunks' in the body. Do
> >> > you
> >> > have any idea how I can achieve this report via reporting svcs?
> >> > Unfortunately, this is very important. Please do advise.
> >> >
> >> > --Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Pick the command type as stored procedure and then just enter the name
> >> >> of
> >> >> the stored procedure. When you click on the ! you should get back the
> >> >> data
> >> >> and the fields. If you do not get the field list populated then click
> >> >> on
> >> >> the
> >> >> refresh fields button (to the right of the ..., it looks like the
> >> >> refresh
> >> >> button for IE).
> >> >>
> >> >> Note that RS only works with the first resultset returned. It cannot
> >> >> handle
> >> >> mutliple resultsets.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> > Hi. I have a need to create a number of different reports via
> >> >> > Reporting
> >> >> > Services. All of which are based on stored procedures, none of
> >> >> > which
> >> >> > require
> >> >> > any parameters. Most if not all of the report is calculated. I am
> >> >> > struggling badly to get even the most basic of the fields in place
> >> >> > w/the
> >> >> > correct expressions. The only one I actually got to accept the
> >> >> > expression
> >> >> > was a Date field, this is the calculation:
> >> >> >
> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >
> >> >> > It, too, fails to preview, indicating the value expression for the
> >> >> > field
> >> >> > contains an error. Again, all of the other report items are
> >> >> > calculated
> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs, etc.
> >> >> > Using
> >> >> > the
> >> >> > report designer/report wizard to 'do it for me' only returns Date
> >> >> > and a
> >> >> > couple fields that are not even in my resultset. like one of my
> >> >> > values
> >> >> > in
> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> > available
> >> >> > is
> >> >> > 'ID__Total__'
> >> >> >
> >> >> > Further, in VS I've got the report open and am on the data tab, i
> >> >> > hit
> >> >> > the
> >> >> > Run option, I receive this error: An error occurred while
> >> >> > retrieving
> >> >> > the
> >> >> > parameters in the query. Could not locate entry in sysdatabases for
> >> >> > database
> >> >> > 'EXEC databasename'. No entry found with that name. Make sure that
> >> >> > the
> >> >> > name
> >> >> > is entered correctly.'
> >> >> >
> >> >> > Clearly I am doing something very wrong with the stored procedure
> >> >> > definition. Like I said, all of these reports are based on
> >> >> > procedures,
> >> >> > can
> >> >> > anybody give me some suggestion/direction on the right way to call
> >> >> > the
> >> >> > procs?
> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
> >> >> > it.
> >> >> > Please advise.
> >> >> >
> >> >> >
> >> >> > -- Lynn
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Yes, you are calling it three times. In RS you create three datasets. Go to
the dataset tab and there is a combo box with the name of the dataset, you
can click on that and there is a an option for a new.
In your stored procedure
if @.WHICHRESULTSET = 1
begin
--return the first resultset here
end
etc
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> Bruce, or somebody else, might you give me an example of how to give the
> proc
> 3 parameters, producing three resultsets in a way that RS will display
> them?
> Or, am I giving it three parameters and calling it three times? If so,
> how
> would i call the 3 procs in RS?
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Configure your existing stored procedure to accept a parameter (you can
>> make
>> it optional so that it doesn't break existing code).
>> Then call it three times in RS with a static value and create three
>> datasets.
>> For instance dataset1
>> yourproc 1
>> Dataset2
>> yourproc 2
>> etc.
>> Then in your stored procedure return the appropriate resultset based on
>> the
>> parameter.
>> Downside is that your sp is being run three times.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> > Bruce, I'm not sure I follow. Can you elaborate a little more, please,
>> > on
>> > the second, possibly third procedure?
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> This is three resultsets. RS does not have the ability to handle that.
>> >> There
>> >> is no work around from RS side. You could create another stored
>> >> procedure
>> >> that calls this one and have it return just one of the resultsets.
>> >>
>> >> RS can deal with multiple datasets quite well, but each stored
>> >> procedure
>> >> call can only return one.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> > oh, bruce, that is great. I can't believe it was as simple as that.
>> >> > one
>> >> > remaining problem, though. one of my reports is like this:
>> >> >
>> >> > Date Total Trades Symbols Traded Total $
>> >> > -- -- -- --
>> >> > 02/07/2006 333,333 333 33,333,333,333.33
>> >> >
>> >> > #Stocks Volume Total $
>> >> > -- -- --
>> >> > 333,333 33,333,333 3,333,333,333.33
>> >> >
>> >> > EndPoint Liquidity #Trades Volume Total $
>> >> > -- -- -- -- --
>> >> > AAAA Add 114,729 21,797,575
>> >> > 583,102,631.33
>> >> > AAAA Opening 1 27
>> >> > 3,412.53
>> >> > AAAA Remove 30,836 8,330,843
>> >> > 444,521,928.10
>> >> > AAAA Route 41 4,543
>> >> > 103,291.31
>> >> > BBBB Add 26,997 9,940,201
>> >> > 178,600,674.78
>> >> > BBBB Opening 8,089 1,448,143
>> >> > 44,276,419.41
>> >> > BBBB Remove 3,406 1,719,403
>> >> > 40,267,318.25
>> >> > CCCC Add 83,781 22,443,732
>> >> > 746,570,071.43
>> >> > CCCC Remove 35,756 12,250,359
>> >> > 483,329,796.97
>> >> > CCCC Route 1,088 244,697
>> >> > 6,655,913.26
>> >> > DDDD Route 2 62,500
>> >> > 2,539,375.00
>> >> > DDDD Add 2,354 1,262,589
>> >> > 19,136,233.44
>> >> > DDDD Remove 258 195,019
>> >> > 6,227,451.69
>> >> >
>> >> > I only receive the top line in the resultset:
>> >> >
>> >> > Date Total Trades Symbols Traded Total $
>> >> > -- -- -- --
>> >> > 02/07/2006 333,333 333 33,333,333,333.33
>> >> >
>> >> > I assume this is what you mean when you say it will only handle the
>> >> > 1st
>> >> > resultset. All of my reports have multiple 'chunks' in the body.
>> >> > Do
>> >> > you
>> >> > have any idea how I can achieve this report via reporting svcs?
>> >> > Unfortunately, this is very important. Please do advise.
>> >> >
>> >> > --Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> Pick the command type as stored procedure and then just enter the
>> >> >> name
>> >> >> of
>> >> >> the stored procedure. When you click on the ! you should get back
>> >> >> the
>> >> >> data
>> >> >> and the fields. If you do not get the field list populated then
>> >> >> click
>> >> >> on
>> >> >> the
>> >> >> refresh fields button (to the right of the ..., it looks like the
>> >> >> refresh
>> >> >> button for IE).
>> >> >>
>> >> >> Note that RS only works with the first resultset returned. It
>> >> >> cannot
>> >> >> handle
>> >> >> mutliple resultsets.
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> >> >> > Hi. I have a need to create a number of different reports via
>> >> >> > Reporting
>> >> >> > Services. All of which are based on stored procedures, none of
>> >> >> > which
>> >> >> > require
>> >> >> > any parameters. Most if not all of the report is calculated. I
>> >> >> > am
>> >> >> > struggling badly to get even the most basic of the fields in
>> >> >> > place
>> >> >> > w/the
>> >> >> > correct expressions. The only one I actually got to accept the
>> >> >> > expression
>> >> >> > was a Date field, this is the calculation:
>> >> >> >
>> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >> >> >
>> >> >> > It, too, fails to preview, indicating the value expression for
>> >> >> > the
>> >> >> > field
>> >> >> > contains an error. Again, all of the other report items are
>> >> >> > calculated
>> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs,
>> >> >> > etc.
>> >> >> > Using
>> >> >> > the
>> >> >> > report designer/report wizard to 'do it for me' only returns Date
>> >> >> > and a
>> >> >> > couple fields that are not even in my resultset. like one of my
>> >> >> > values
>> >> >> > in
>> >> >> > the report is 'Total Trades'...one of the fields listed as
>> >> >> > available
>> >> >> > is
>> >> >> > 'ID__Total__'
>> >> >> >
>> >> >> > Further, in VS I've got the report open and am on the data tab, i
>> >> >> > hit
>> >> >> > the
>> >> >> > Run option, I receive this error: An error occurred while
>> >> >> > retrieving
>> >> >> > the
>> >> >> > parameters in the query. Could not locate entry in sysdatabases
>> >> >> > for
>> >> >> > database
>> >> >> > 'EXEC databasename'. No entry found with that name. Make sure
>> >> >> > that
>> >> >> > the
>> >> >> > name
>> >> >> > is entered correctly.'
>> >> >> >
>> >> >> > Clearly I am doing something very wrong with the stored procedure
>> >> >> > definition. Like I said, all of these reports are based on
>> >> >> > procedures,
>> >> >> > can
>> >> >> > anybody give me some suggestion/direction on the right way to
>> >> >> > call
>> >> >> > the
>> >> >> > procs?
>> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
>> >> >> > it.
>> >> >> > Please advise.
>> >> >> >
>> >> >> >
>> >> >> > -- Lynn
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>|||bruce, i've added the parameters to the proc, now if you fire procname 1,
procname 2, procname 3 or procname 4, it returns each of the resultsets to me
in query analyzer.
in Rs i've got one dataset running this successfully:
EXEC db.dbo.procname 1
results are given, everthing looks good.
but, i go add dataset 2, it seems to do so successfully, but now the data is
not shown. not even the data from the first dataset. it just gives my
header, no results. i don't know how to fix this. should i be using
subreports, should i be using one proce multiple times w/multiple datasets,
i'm just not sure.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Yes, you are calling it three times. In RS you create three datasets. Go to
> the dataset tab and there is a combo box with the name of the dataset, you
> can click on that and there is a an option for a new.
> In your stored procedure
> if @.WHICHRESULTSET = 1
> begin
> --return the first resultset here
> end
> etc
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> > Bruce, or somebody else, might you give me an example of how to give the
> > proc
> > 3 parameters, producing three resultsets in a way that RS will display
> > them?
> > Or, am I giving it three parameters and calling it three times? If so,
> > how
> > would i call the 3 procs in RS?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Configure your existing stored procedure to accept a parameter (you can
> >> make
> >> it optional so that it doesn't break existing code).
> >>
> >> Then call it three times in RS with a static value and create three
> >> datasets.
> >> For instance dataset1
> >> yourproc 1
> >>
> >> Dataset2
> >> yourproc 2
> >>
> >> etc.
> >>
> >> Then in your stored procedure return the appropriate resultset based on
> >> the
> >> parameter.
> >>
> >> Downside is that your sp is being run three times.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> > Bruce, I'm not sure I follow. Can you elaborate a little more, please,
> >> > on
> >> > the second, possibly third procedure?
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> This is three resultsets. RS does not have the ability to handle that.
> >> >> There
> >> >> is no work around from RS side. You could create another stored
> >> >> procedure
> >> >> that calls this one and have it return just one of the resultsets.
> >> >>
> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> procedure
> >> >> call can only return one.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> > oh, bruce, that is great. I can't believe it was as simple as that.
> >> >> > one
> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >
> >> >> > Date Total Trades Symbols Traded Total $
> >> >> > -- -- -- --
> >> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >> >
> >> >> > #Stocks Volume Total $
> >> >> > -- -- --
> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >
> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> > -- -- -- -- --
> >> >> > AAAA Add 114,729 21,797,575
> >> >> > 583,102,631.33
> >> >> > AAAA Opening 1 27
> >> >> > 3,412.53
> >> >> > AAAA Remove 30,836 8,330,843
> >> >> > 444,521,928.10
> >> >> > AAAA Route 41 4,543
> >> >> > 103,291.31
> >> >> > BBBB Add 26,997 9,940,201
> >> >> > 178,600,674.78
> >> >> > BBBB Opening 8,089 1,448,143
> >> >> > 44,276,419.41
> >> >> > BBBB Remove 3,406 1,719,403
> >> >> > 40,267,318.25
> >> >> > CCCC Add 83,781 22,443,732
> >> >> > 746,570,071.43
> >> >> > CCCC Remove 35,756 12,250,359
> >> >> > 483,329,796.97
> >> >> > CCCC Route 1,088 244,697
> >> >> > 6,655,913.26
> >> >> > DDDD Route 2 62,500
> >> >> > 2,539,375.00
> >> >> > DDDD Add 2,354 1,262,589
> >> >> > 19,136,233.44
> >> >> > DDDD Remove 258 195,019
> >> >> > 6,227,451.69
> >> >> >
> >> >> > I only receive the top line in the resultset:
> >> >> >
> >> >> > Date Total Trades Symbols Traded Total $
> >> >> > -- -- -- --
> >> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >> >
> >> >> > I assume this is what you mean when you say it will only handle the
> >> >> > 1st
> >> >> > resultset. All of my reports have multiple 'chunks' in the body.
> >> >> > Do
> >> >> > you
> >> >> > have any idea how I can achieve this report via reporting svcs?
> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >
> >> >> > --Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Pick the command type as stored procedure and then just enter the
> >> >> >> name
> >> >> >> of
> >> >> >> the stored procedure. When you click on the ! you should get back
> >> >> >> the
> >> >> >> data
> >> >> >> and the fields. If you do not get the field list populated then
> >> >> >> click
> >> >> >> on
> >> >> >> the
> >> >> >> refresh fields button (to the right of the ..., it looks like the
> >> >> >> refresh
> >> >> >> button for IE).
> >> >> >>
> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> cannot
> >> >> >> handle
> >> >> >> mutliple resultsets.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> > Hi. I have a need to create a number of different reports via
> >> >> >> > Reporting
> >> >> >> > Services. All of which are based on stored procedures, none of
> >> >> >> > which
> >> >> >> > require
> >> >> >> > any parameters. Most if not all of the report is calculated. I
> >> >> >> > am
> >> >> >> > struggling badly to get even the most basic of the fields in
> >> >> >> > place
> >> >> >> > w/the
> >> >> >> > correct expressions. The only one I actually got to accept the
> >> >> >> > expression
> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >
> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >
> >> >> >> > It, too, fails to preview, indicating the value expression for
> >> >> >> > the
> >> >> >> > field
> >> >> >> > contains an error. Again, all of the other report items are
> >> >> >> > calculated
> >> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs,
> >> >> >> > etc.
> >> >> >> > Using
> >> >> >> > the
> >> >> >> > report designer/report wizard to 'do it for me' only returns Date
> >> >> >> > and a
> >> >> >> > couple fields that are not even in my resultset. like one of my
> >> >> >> > values
> >> >> >> > in
> >> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> >> > available
> >> >> >> > is
> >> >> >> > 'ID__Total__'
> >> >> >> >
> >> >> >> > Further, in VS I've got the report open and am on the data tab, i
> >> >> >> > hit
> >> >> >> > the
> >> >> >> > Run option, I receive this error: An error occurred while
> >> >> >> > retrieving
> >> >> >> > the
> >> >> >> > parameters in the query. Could not locate entry in sysdatabases
> >> >> >> > for
> >> >> >> > database
> >> >> >> > 'EXEC databasename'. No entry found with that name. Make sure
> >> >> >> > that
> >> >> >> > the
> >> >> >> > name
> >> >> >> > is entered correctly.'
> >> >> >> >
> >> >> >> > Clearly I am doing something very wrong with the stored procedure
> >> >> >> > definition. Like I said, all of these reports are based on
> >> >> >> > procedures,
> >> >> >> > can
> >> >> >> > anybody give me some suggestion/direction on the right way to
> >> >> >> > call
> >> >> >> > the
> >> >> >> > procs?
> >> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
> >> >> >> > it.
> >> >> >> > Please advise.
> >> >> >> >
> >> >> >> >
> >> >> >> > -- Lynn
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||And, if I blow away the 2nd dataset and just give my 1st one parameters, it
almost works. EXEC db.dbo.procname 1 for chunk one of the results, works
just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in Data
tab it returns an error: SQL Syntax Errors Encountered...The designer does
not graphically support the EXEC SQL Construct' but, i hit 'OK' and my
results are still returned to me. On 'Preview' tab, however, I get no
data/results at all.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Yes, you are calling it three times. In RS you create three datasets. Go to
> the dataset tab and there is a combo box with the name of the dataset, you
> can click on that and there is a an option for a new.
> In your stored procedure
> if @.WHICHRESULTSET = 1
> begin
> --return the first resultset here
> end
> etc
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> > Bruce, or somebody else, might you give me an example of how to give the
> > proc
> > 3 parameters, producing three resultsets in a way that RS will display
> > them?
> > Or, am I giving it three parameters and calling it three times? If so,
> > how
> > would i call the 3 procs in RS?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Configure your existing stored procedure to accept a parameter (you can
> >> make
> >> it optional so that it doesn't break existing code).
> >>
> >> Then call it three times in RS with a static value and create three
> >> datasets.
> >> For instance dataset1
> >> yourproc 1
> >>
> >> Dataset2
> >> yourproc 2
> >>
> >> etc.
> >>
> >> Then in your stored procedure return the appropriate resultset based on
> >> the
> >> parameter.
> >>
> >> Downside is that your sp is being run three times.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> > Bruce, I'm not sure I follow. Can you elaborate a little more, please,
> >> > on
> >> > the second, possibly third procedure?
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> This is three resultsets. RS does not have the ability to handle that.
> >> >> There
> >> >> is no work around from RS side. You could create another stored
> >> >> procedure
> >> >> that calls this one and have it return just one of the resultsets.
> >> >>
> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> procedure
> >> >> call can only return one.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> > oh, bruce, that is great. I can't believe it was as simple as that.
> >> >> > one
> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >
> >> >> > Date Total Trades Symbols Traded Total $
> >> >> > -- -- -- --
> >> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >> >
> >> >> > #Stocks Volume Total $
> >> >> > -- -- --
> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >
> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> > -- -- -- -- --
> >> >> > AAAA Add 114,729 21,797,575
> >> >> > 583,102,631.33
> >> >> > AAAA Opening 1 27
> >> >> > 3,412.53
> >> >> > AAAA Remove 30,836 8,330,843
> >> >> > 444,521,928.10
> >> >> > AAAA Route 41 4,543
> >> >> > 103,291.31
> >> >> > BBBB Add 26,997 9,940,201
> >> >> > 178,600,674.78
> >> >> > BBBB Opening 8,089 1,448,143
> >> >> > 44,276,419.41
> >> >> > BBBB Remove 3,406 1,719,403
> >> >> > 40,267,318.25
> >> >> > CCCC Add 83,781 22,443,732
> >> >> > 746,570,071.43
> >> >> > CCCC Remove 35,756 12,250,359
> >> >> > 483,329,796.97
> >> >> > CCCC Route 1,088 244,697
> >> >> > 6,655,913.26
> >> >> > DDDD Route 2 62,500
> >> >> > 2,539,375.00
> >> >> > DDDD Add 2,354 1,262,589
> >> >> > 19,136,233.44
> >> >> > DDDD Remove 258 195,019
> >> >> > 6,227,451.69
> >> >> >
> >> >> > I only receive the top line in the resultset:
> >> >> >
> >> >> > Date Total Trades Symbols Traded Total $
> >> >> > -- -- -- --
> >> >> > 02/07/2006 333,333 333 33,333,333,333.33
> >> >> >
> >> >> > I assume this is what you mean when you say it will only handle the
> >> >> > 1st
> >> >> > resultset. All of my reports have multiple 'chunks' in the body.
> >> >> > Do
> >> >> > you
> >> >> > have any idea how I can achieve this report via reporting svcs?
> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >
> >> >> > --Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Pick the command type as stored procedure and then just enter the
> >> >> >> name
> >> >> >> of
> >> >> >> the stored procedure. When you click on the ! you should get back
> >> >> >> the
> >> >> >> data
> >> >> >> and the fields. If you do not get the field list populated then
> >> >> >> click
> >> >> >> on
> >> >> >> the
> >> >> >> refresh fields button (to the right of the ..., it looks like the
> >> >> >> refresh
> >> >> >> button for IE).
> >> >> >>
> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> cannot
> >> >> >> handle
> >> >> >> mutliple resultsets.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> > Hi. I have a need to create a number of different reports via
> >> >> >> > Reporting
> >> >> >> > Services. All of which are based on stored procedures, none of
> >> >> >> > which
> >> >> >> > require
> >> >> >> > any parameters. Most if not all of the report is calculated. I
> >> >> >> > am
> >> >> >> > struggling badly to get even the most basic of the fields in
> >> >> >> > place
> >> >> >> > w/the
> >> >> >> > correct expressions. The only one I actually got to accept the
> >> >> >> > expression
> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >
> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >
> >> >> >> > It, too, fails to preview, indicating the value expression for
> >> >> >> > the
> >> >> >> > field
> >> >> >> > contains an error. Again, all of the other report items are
> >> >> >> > calculated
> >> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs,
> >> >> >> > etc.
> >> >> >> > Using
> >> >> >> > the
> >> >> >> > report designer/report wizard to 'do it for me' only returns Date
> >> >> >> > and a
> >> >> >> > couple fields that are not even in my resultset. like one of my
> >> >> >> > values
> >> >> >> > in
> >> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> >> > available
> >> >> >> > is
> >> >> >> > 'ID__Total__'
> >> >> >> >
> >> >> >> > Further, in VS I've got the report open and am on the data tab, i
> >> >> >> > hit
> >> >> >> > the
> >> >> >> > Run option, I receive this error: An error occurred while
> >> >> >> > retrieving
> >> >> >> > the
> >> >> >> > parameters in the query. Could not locate entry in sysdatabases
> >> >> >> > for
> >> >> >> > database
> >> >> >> > 'EXEC databasename'. No entry found with that name. Make sure
> >> >> >> > that
> >> >> >> > the
> >> >> >> > name
> >> >> >> > is entered correctly.'
> >> >> >> >
> >> >> >> > Clearly I am doing something very wrong with the stored procedure
> >> >> >> > definition. Like I said, all of these reports are based on
> >> >> >> > procedures,
> >> >> >> > can
> >> >> >> > anybody give me some suggestion/direction on the right way to
> >> >> >> > call
> >> >> >> > the
> >> >> >> > procs?
> >> >> >> > They run w/out parameters...EXEC databasename.dbo.proc that's
> >> >> >> > it.
> >> >> >> > Please advise.
> >> >> >> >
> >> >> >> >
> >> >> >> > -- Lynn
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||If you are going against SQL Server do not run your stored procedure this
way. Pick command type of stored procedure. RS will detect the parameters.
If going against ODBC or OLEDB driver (which uses ? format for parameters)
then pick text as the command type and do this:
myproc ?
Create multiple datasets and for each one you should call the stored
procedure for each one.
Bruce Loehle-Conger
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> And, if I blow away the 2nd dataset and just give my 1st one parameters,
> it
> almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> works
> just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in Data
> tab it returns an error: SQL Syntax Errors Encountered...The designer
> does
> not graphically support the EXEC SQL Construct' but, i hit 'OK' and my
> results are still returned to me. On 'Preview' tab, however, I get no
> data/results at all.
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Yes, you are calling it three times. In RS you create three datasets. Go
>> to
>> the dataset tab and there is a combo box with the name of the dataset,
>> you
>> can click on that and there is a an option for a new.
>> In your stored procedure
>> if @.WHICHRESULTSET = 1
>> begin
>> --return the first resultset here
>> end
>> etc
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> > Bruce, or somebody else, might you give me an example of how to give
>> > the
>> > proc
>> > 3 parameters, producing three resultsets in a way that RS will display
>> > them?
>> > Or, am I giving it three parameters and calling it three times? If so,
>> > how
>> > would i call the 3 procs in RS?
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Configure your existing stored procedure to accept a parameter (you
>> >> can
>> >> make
>> >> it optional so that it doesn't break existing code).
>> >>
>> >> Then call it three times in RS with a static value and create three
>> >> datasets.
>> >> For instance dataset1
>> >> yourproc 1
>> >>
>> >> Dataset2
>> >> yourproc 2
>> >>
>> >> etc.
>> >>
>> >> Then in your stored procedure return the appropriate resultset based
>> >> on
>> >> the
>> >> parameter.
>> >>
>> >> Downside is that your sp is being run three times.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
>> >> > please,
>> >> > on
>> >> > the second, possibly third procedure?
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> This is three resultsets. RS does not have the ability to handle
>> >> >> that.
>> >> >> There
>> >> >> is no work around from RS side. You could create another stored
>> >> >> procedure
>> >> >> that calls this one and have it return just one of the resultsets.
>> >> >>
>> >> >> RS can deal with multiple datasets quite well, but each stored
>> >> >> procedure
>> >> >> call can only return one.
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> >> > oh, bruce, that is great. I can't believe it was as simple as
>> >> >> > that.
>> >> >> > one
>> >> >> > remaining problem, though. one of my reports is like this:
>> >> >> >
>> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> > -- -- -- --
>> >> >> > 02/07/2006 333,333 333
>> >> >> > 33,333,333,333.33
>> >> >> >
>> >> >> > #Stocks Volume Total $
>> >> >> > -- -- --
>> >> >> > 333,333 33,333,333 3,333,333,333.33
>> >> >> >
>> >> >> > EndPoint Liquidity #Trades Volume Total $
>> >> >> > -- -- -- -- --
>> >> >> > AAAA Add 114,729 21,797,575
>> >> >> > 583,102,631.33
>> >> >> > AAAA Opening 1 27
>> >> >> > 3,412.53
>> >> >> > AAAA Remove 30,836 8,330,843
>> >> >> > 444,521,928.10
>> >> >> > AAAA Route 41 4,543
>> >> >> > 103,291.31
>> >> >> > BBBB Add 26,997 9,940,201
>> >> >> > 178,600,674.78
>> >> >> > BBBB Opening 8,089 1,448,143
>> >> >> > 44,276,419.41
>> >> >> > BBBB Remove 3,406 1,719,403
>> >> >> > 40,267,318.25
>> >> >> > CCCC Add 83,781 22,443,732
>> >> >> > 746,570,071.43
>> >> >> > CCCC Remove 35,756 12,250,359
>> >> >> > 483,329,796.97
>> >> >> > CCCC Route 1,088 244,697
>> >> >> > 6,655,913.26
>> >> >> > DDDD Route 2 62,500
>> >> >> > 2,539,375.00
>> >> >> > DDDD Add 2,354 1,262,589
>> >> >> > 19,136,233.44
>> >> >> > DDDD Remove 258 195,019
>> >> >> > 6,227,451.69
>> >> >> >
>> >> >> > I only receive the top line in the resultset:
>> >> >> >
>> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> > -- -- -- --
>> >> >> > 02/07/2006 333,333 333
>> >> >> > 33,333,333,333.33
>> >> >> >
>> >> >> > I assume this is what you mean when you say it will only handle
>> >> >> > the
>> >> >> > 1st
>> >> >> > resultset. All of my reports have multiple 'chunks' in the
>> >> >> > body.
>> >> >> > Do
>> >> >> > you
>> >> >> > have any idea how I can achieve this report via reporting svcs?
>> >> >> > Unfortunately, this is very important. Please do advise.
>> >> >> >
>> >> >> > --Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> Pick the command type as stored procedure and then just enter
>> >> >> >> the
>> >> >> >> name
>> >> >> >> of
>> >> >> >> the stored procedure. When you click on the ! you should get
>> >> >> >> back
>> >> >> >> the
>> >> >> >> data
>> >> >> >> and the fields. If you do not get the field list populated then
>> >> >> >> click
>> >> >> >> on
>> >> >> >> the
>> >> >> >> refresh fields button (to the right of the ..., it looks like
>> >> >> >> the
>> >> >> >> refresh
>> >> >> >> button for IE).
>> >> >> >>
>> >> >> >> Note that RS only works with the first resultset returned. It
>> >> >> >> cannot
>> >> >> >> handle
>> >> >> >> mutliple resultsets.
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> >> >> >> > Hi. I have a need to create a number of different reports via
>> >> >> >> > Reporting
>> >> >> >> > Services. All of which are based on stored procedures, none
>> >> >> >> > of
>> >> >> >> > which
>> >> >> >> > require
>> >> >> >> > any parameters. Most if not all of the report is calculated.
>> >> >> >> > I
>> >> >> >> > am
>> >> >> >> > struggling badly to get even the most basic of the fields in
>> >> >> >> > place
>> >> >> >> > w/the
>> >> >> >> > correct expressions. The only one I actually got to accept
>> >> >> >> > the
>> >> >> >> > expression
>> >> >> >> > was a Date field, this is the calculation:
>> >> >> >> >
>> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >> >> >> >
>> >> >> >> > It, too, fails to preview, indicating the value expression for
>> >> >> >> > the
>> >> >> >> > field
>> >> >> >> > contains an error. Again, all of the other report items are
>> >> >> >> > calculated
>> >> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs,
>> >> >> >> > etc.
>> >> >> >> > Using
>> >> >> >> > the
>> >> >> >> > report designer/report wizard to 'do it for me' only returns
>> >> >> >> > Date
>> >> >> >> > and a
>> >> >> >> > couple fields that are not even in my resultset. like one of
>> >> >> >> > my
>> >> >> >> > values
>> >> >> >> > in
>> >> >> >> > the report is 'Total Trades'...one of the fields listed as
>> >> >> >> > available
>> >> >> >> > is
>> >> >> >> > 'ID__Total__'
>> >> >> >> >
>> >> >> >> > Further, in VS I've got the report open and am on the data
>> >> >> >> > tab, i
>> >> >> >> > hit
>> >> >> >> > the
>> >> >> >> > Run option, I receive this error: An error occurred while
>> >> >> >> > retrieving
>> >> >> >> > the
>> >> >> >> > parameters in the query. Could not locate entry in
>> >> >> >> > sysdatabases
>> >> >> >> > for
>> >> >> >> > database
>> >> >> >> > 'EXEC databasename'. No entry found with that name. Make sure
>> >> >> >> > that
>> >> >> >> > the
>> >> >> >> > name
>> >> >> >> > is entered correctly.'
>> >> >> >> >
>> >> >> >> > Clearly I am doing something very wrong with the stored
>> >> >> >> > procedure
>> >> >> >> > definition. Like I said, all of these reports are based on
>> >> >> >> > procedures,
>> >> >> >> > can
>> >> >> >> > anybody give me some suggestion/direction on the right way to
>> >> >> >> > call
>> >> >> >> > the
>> >> >> >> > procs?
>> >> >> >> > They run w/out parameters...EXEC databasename.dbo.proc
>> >> >> >> > that's
>> >> >> >> > it.
>> >> >> >> > Please advise.
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > -- Lynn
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>|||i'm sorry, bruce, but where do i define the parameters? rs is not detecting
them. in my 1st dataset i've got cmd type stored procedure and the proc name
is in the query string. i assumed i would put the 1st parameter in on the
parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so i
gave it @.ch and the value of 1, but when i attempted to run it, it threw me a
'define query parameters box asking me to put the '1' in it.
-- Lynn
"Bruce L-C [MVP]" wrote:
> If you are going against SQL Server do not run your stored procedure this
> way. Pick command type of stored procedure. RS will detect the parameters.
> If going against ODBC or OLEDB driver (which uses ? format for parameters)
> then pick text as the command type and do this:
> myproc ?
> Create multiple datasets and for each one you should call the stored
> procedure for each one.
> Bruce Loehle-Conger
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> > And, if I blow away the 2nd dataset and just give my 1st one parameters,
> > it
> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> > works
> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in Data
> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> > does
> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and my
> > results are still returned to me. On 'Preview' tab, however, I get no
> > data/results at all.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Yes, you are calling it three times. In RS you create three datasets. Go
> >> to
> >> the dataset tab and there is a combo box with the name of the dataset,
> >> you
> >> can click on that and there is a an option for a new.
> >>
> >> In your stored procedure
> >>
> >> if @.WHICHRESULTSET = 1
> >> begin
> >> --return the first resultset here
> >> end
> >> etc
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> > Bruce, or somebody else, might you give me an example of how to give
> >> > the
> >> > proc
> >> > 3 parameters, producing three resultsets in a way that RS will display
> >> > them?
> >> > Or, am I giving it three parameters and calling it three times? If so,
> >> > how
> >> > would i call the 3 procs in RS?
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> can
> >> >> make
> >> >> it optional so that it doesn't break existing code).
> >> >>
> >> >> Then call it three times in RS with a static value and create three
> >> >> datasets.
> >> >> For instance dataset1
> >> >> yourproc 1
> >> >>
> >> >> Dataset2
> >> >> yourproc 2
> >> >>
> >> >> etc.
> >> >>
> >> >> Then in your stored procedure return the appropriate resultset based
> >> >> on
> >> >> the
> >> >> parameter.
> >> >>
> >> >> Downside is that your sp is being run three times.
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> > please,
> >> >> > on
> >> >> > the second, possibly third procedure?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> that.
> >> >> >> There
> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> procedure
> >> >> >> that calls this one and have it return just one of the resultsets.
> >> >> >>
> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> procedure
> >> >> >> call can only return one.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> > that.
> >> >> >> > one
> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >
> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> > -- -- -- --
> >> >> >> > 02/07/2006 333,333 333
> >> >> >> > 33,333,333,333.33
> >> >> >> >
> >> >> >> > #Stocks Volume Total $
> >> >> >> > -- -- --
> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >
> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> > -- -- -- -- --
> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> > 583,102,631.33
> >> >> >> > AAAA Opening 1 27
> >> >> >> > 3,412.53
> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> > 444,521,928.10
> >> >> >> > AAAA Route 41 4,543
> >> >> >> > 103,291.31
> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> > 178,600,674.78
> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> > 44,276,419.41
> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> > 40,267,318.25
> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> > 746,570,071.43
> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> > 483,329,796.97
> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> > 6,655,913.26
> >> >> >> > DDDD Route 2 62,500
> >> >> >> > 2,539,375.00
> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> > 19,136,233.44
> >> >> >> > DDDD Remove 258 195,019
> >> >> >> > 6,227,451.69
> >> >> >> >
> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >
> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> > -- -- -- --
> >> >> >> > 02/07/2006 333,333 333
> >> >> >> > 33,333,333,333.33
> >> >> >> >
> >> >> >> > I assume this is what you mean when you say it will only handle
> >> >> >> > the
> >> >> >> > 1st
> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> > body.
> >> >> >> > Do
> >> >> >> > you
> >> >> >> > have any idea how I can achieve this report via reporting svcs?
> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >
> >> >> >> > --Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> the
> >> >> >> >> name
> >> >> >> >> of
> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> back
> >> >> >> >> the
> >> >> >> >> data
> >> >> >> >> and the fields. If you do not get the field list populated then
> >> >> >> >> click
> >> >> >> >> on
> >> >> >> >> the
> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> the
> >> >> >> >> refresh
> >> >> >> >> button for IE).
> >> >> >> >>
> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> cannot
> >> >> >> >> handle
> >> >> >> >> mutliple resultsets.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> > Hi. I have a need to create a number of different reports via
> >> >> >> >> > Reporting
> >> >> >> >> > Services. All of which are based on stored procedures, none
> >> >> >> >> > of
> >> >> >> >> > which
> >> >> >> >> > require
> >> >> >> >> > any parameters. Most if not all of the report is calculated.
> >> >> >> >> > I
> >> >> >> >> > am
> >> >> >> >> > struggling badly to get even the most basic of the fields in
> >> >> >> >> > place
> >> >> >> >> > w/the
> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> > the
> >> >> >> >> > expression
> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >
> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >
> >> >> >> >> > It, too, fails to preview, indicating the value expression for
> >> >> >> >> > the
> >> >> >> >> > field
> >> >> >> >> > contains an error. Again, all of the other report items are
> >> >> >> >> > calculated
> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements, CASTs,
> >> >> >> >> > etc.
> >> >> >> >> > Using
> >> >> >> >> > the
> >> >> >> >> > report designer/report wizard to 'do it for me' only returns
> >> >> >> >> > Date
> >> >> >> >> > and a
> >> >> >> >> > couple fields that are not even in my resultset. like one of
> >> >> >> >> > my
> >> >> >> >> > values
> >> >> >> >> > in
> >> >> >> >> > the report is 'Total Trades'...one of the fields listed as
> >> >> >> >> > available
> >> >> >> >> > is
> >> >> >> >> > 'ID__Total__'
> >> >> >> >> >
> >> >> >> >> > Further, in VS I've got the report open and am on the data
> >> >> >> >> > tab, i
> >> >> >> >> > hit
> >> >> >> >> > the
> >> >> >> >> > Run option, I receive this error: An error occurred while
> >> >> >> >> > retrieving
> >> >> >> >> > the
> >> >> >> >> > parameters in the query. Could not locate entry in
> >> >> >> >> > sysdatabases
> >> >> >> >> > for
> >> >> >> >> > database
> >> >> >> >> > 'EXEC databasename'. No entry found with that name. Make sure
> >> >> >> >> > that
> >> >> >> >> > the
> >> >> >> >> > name
> >> >> >> >> > is entered correctly.'
> >> >> >> >> >
> >> >> >> >> > Clearly I am doing something very wrong with the stored
> >> >> >> >> > procedure
> >> >> >> >> > definition. Like I said, all of these reports are based on
> >> >> >> >> > procedures,
> >> >> >> >> > can
> >> >> >> >> > anybody give me some suggestion/direction on the right way to
> >> >> >> >> > call
> >> >> >> >> > the
> >> >> >> >> > procs?
> >> >> >> >> > They run w/out parameters...EXEC databasename.dbo.proc
> >> >> >> >> > that's
> >> >> >> >> > it.
> >> >> >> >> > Please advise.
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > -- Lynn
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>|||Are you going against SQL Server?
If so, then just select tored procedure for the command type and just put in
the name of the stored procedure. Do not put exec in from of it or anything
else. It should detect the parameter and prompt you for it. It should also
create a report parameter as well for you.
Try creating a new dataset and do this from the start. If you continue to
have problems create a new stored procedure just for testing .
create procedure dbo.testproc
@.PARAM1 int
as
select 'Parameter passed in = ' + @.PARAM1 as Message
return
Get the above procedure to work for you so you know how to call a stored
procedure they way I am telling you (do not use exec).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> i'm sorry, bruce, but where do i define the parameters? rs is not
> detecting
> them. in my 1st dataset i've got cmd type stored procedure and the proc
> name
> is in the query string. i assumed i would put the 1st parameter in on the
> parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> i
> gave it @.ch and the value of 1, but when i attempted to run it, it threw
> me a
> 'define query parameters box asking me to put the '1' in it.
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> If you are going against SQL Server do not run your stored procedure this
>> way. Pick command type of stored procedure. RS will detect the
>> parameters.
>> If going against ODBC or OLEDB driver (which uses ? format for
>> parameters)
>> then pick text as the command type and do this:
>> myproc ?
>> Create multiple datasets and for each one you should call the stored
>> procedure for each one.
>> Bruce Loehle-Conger
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> > And, if I blow away the 2nd dataset and just give my 1st one
>> > parameters,
>> > it
>> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
>> > works
>> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
>> > Data
>> > tab it returns an error: SQL Syntax Errors Encountered...The designer
>> > does
>> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
>> > my
>> > results are still returned to me. On 'Preview' tab, however, I get no
>> > data/results at all.
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Yes, you are calling it three times. In RS you create three datasets.
>> >> Go
>> >> to
>> >> the dataset tab and there is a combo box with the name of the dataset,
>> >> you
>> >> can click on that and there is a an option for a new.
>> >>
>> >> In your stored procedure
>> >>
>> >> if @.WHICHRESULTSET = 1
>> >> begin
>> >> --return the first resultset here
>> >> end
>> >> etc
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> >> > Bruce, or somebody else, might you give me an example of how to give
>> >> > the
>> >> > proc
>> >> > 3 parameters, producing three resultsets in a way that RS will
>> >> > display
>> >> > them?
>> >> > Or, am I giving it three parameters and calling it three times? If
>> >> > so,
>> >> > how
>> >> > would i call the 3 procs in RS?
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> Configure your existing stored procedure to accept a parameter (you
>> >> >> can
>> >> >> make
>> >> >> it optional so that it doesn't break existing code).
>> >> >>
>> >> >> Then call it three times in RS with a static value and create three
>> >> >> datasets.
>> >> >> For instance dataset1
>> >> >> yourproc 1
>> >> >>
>> >> >> Dataset2
>> >> >> yourproc 2
>> >> >>
>> >> >> etc.
>> >> >>
>> >> >> Then in your stored procedure return the appropriate resultset
>> >> >> based
>> >> >> on
>> >> >> the
>> >> >> parameter.
>> >> >>
>> >> >> Downside is that your sp is being run three times.
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
>> >> >> > please,
>> >> >> > on
>> >> >> > the second, possibly third procedure?
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> This is three resultsets. RS does not have the ability to handle
>> >> >> >> that.
>> >> >> >> There
>> >> >> >> is no work around from RS side. You could create another stored
>> >> >> >> procedure
>> >> >> >> that calls this one and have it return just one of the
>> >> >> >> resultsets.
>> >> >> >>
>> >> >> >> RS can deal with multiple datasets quite well, but each stored
>> >> >> >> procedure
>> >> >> >> call can only return one.
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
>> >> >> >> > that.
>> >> >> >> > one
>> >> >> >> > remaining problem, though. one of my reports is like this:
>> >> >> >> >
>> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> > -- -- -- --
>> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> > 33,333,333,333.33
>> >> >> >> >
>> >> >> >> > #Stocks Volume Total $
>> >> >> >> > -- -- --
>> >> >> >> > 333,333 33,333,333 3,333,333,333.33
>> >> >> >> >
>> >> >> >> > EndPoint Liquidity #Trades Volume Total $
>> >> >> >> > -- -- -- -- --
>> >> >> >> > AAAA Add 114,729 21,797,575
>> >> >> >> > 583,102,631.33
>> >> >> >> > AAAA Opening 1 27
>> >> >> >> > 3,412.53
>> >> >> >> > AAAA Remove 30,836 8,330,843
>> >> >> >> > 444,521,928.10
>> >> >> >> > AAAA Route 41 4,543
>> >> >> >> > 103,291.31
>> >> >> >> > BBBB Add 26,997 9,940,201
>> >> >> >> > 178,600,674.78
>> >> >> >> > BBBB Opening 8,089 1,448,143
>> >> >> >> > 44,276,419.41
>> >> >> >> > BBBB Remove 3,406 1,719,403
>> >> >> >> > 40,267,318.25
>> >> >> >> > CCCC Add 83,781 22,443,732
>> >> >> >> > 746,570,071.43
>> >> >> >> > CCCC Remove 35,756 12,250,359
>> >> >> >> > 483,329,796.97
>> >> >> >> > CCCC Route 1,088 244,697
>> >> >> >> > 6,655,913.26
>> >> >> >> > DDDD Route 2 62,500
>> >> >> >> > 2,539,375.00
>> >> >> >> > DDDD Add 2,354 1,262,589
>> >> >> >> > 19,136,233.44
>> >> >> >> > DDDD Remove 258 195,019
>> >> >> >> > 6,227,451.69
>> >> >> >> >
>> >> >> >> > I only receive the top line in the resultset:
>> >> >> >> >
>> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> > -- -- -- --
>> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> > 33,333,333,333.33
>> >> >> >> >
>> >> >> >> > I assume this is what you mean when you say it will only
>> >> >> >> > handle
>> >> >> >> > the
>> >> >> >> > 1st
>> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
>> >> >> >> > body.
>> >> >> >> > Do
>> >> >> >> > you
>> >> >> >> > have any idea how I can achieve this report via reporting
>> >> >> >> > svcs?
>> >> >> >> > Unfortunately, this is very important. Please do advise.
>> >> >> >> >
>> >> >> >> > --Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> Pick the command type as stored procedure and then just enter
>> >> >> >> >> the
>> >> >> >> >> name
>> >> >> >> >> of
>> >> >> >> >> the stored procedure. When you click on the ! you should get
>> >> >> >> >> back
>> >> >> >> >> the
>> >> >> >> >> data
>> >> >> >> >> and the fields. If you do not get the field list populated
>> >> >> >> >> then
>> >> >> >> >> click
>> >> >> >> >> on
>> >> >> >> >> the
>> >> >> >> >> refresh fields button (to the right of the ..., it looks like
>> >> >> >> >> the
>> >> >> >> >> refresh
>> >> >> >> >> button for IE).
>> >> >> >> >>
>> >> >> >> >> Note that RS only works with the first resultset returned. It
>> >> >> >> >> cannot
>> >> >> >> >> handle
>> >> >> >> >> mutliple resultsets.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> >> >> >> >> > Hi. I have a need to create a number of different reports
>> >> >> >> >> > via
>> >> >> >> >> > Reporting
>> >> >> >> >> > Services. All of which are based on stored procedures,
>> >> >> >> >> > none
>> >> >> >> >> > of
>> >> >> >> >> > which
>> >> >> >> >> > require
>> >> >> >> >> > any parameters. Most if not all of the report is
>> >> >> >> >> > calculated.
>> >> >> >> >> > I
>> >> >> >> >> > am
>> >> >> >> >> > struggling badly to get even the most basic of the fields
>> >> >> >> >> > in
>> >> >> >> >> > place
>> >> >> >> >> > w/the
>> >> >> >> >> > correct expressions. The only one I actually got to accept
>> >> >> >> >> > the
>> >> >> >> >> > expression
>> >> >> >> >> > was a Date field, this is the calculation:
>> >> >> >> >> >
>> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >> >> >> >> >
>> >> >> >> >> > It, too, fails to preview, indicating the value expression
>> >> >> >> >> > for
>> >> >> >> >> > the
>> >> >> >> >> > field
>> >> >> >> >> > contains an error. Again, all of the other report items
>> >> >> >> >> > are
>> >> >> >> >> > calculated
>> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,
>> >> >> >> >> > CASTs,
>> >> >> >> >> > etc.
>> >> >> >> >> > Using
>> >> >> >> >> > the
>> >> >> >> >> > report designer/report wizard to 'do it for me' only
>> >> >> >> >> > returns
>> >> >> >> >> > Date
>> >> >> >> >> > and a
>> >> >> >> >> > couple fields that are not even in my resultset. like one
>> >> >> >> >> > of
>> >> >> >> >> > my
>> >> >> >> >> > values
>> >> >> >> >> > in
>> >> >> >> >> > the report is 'Total Trades'...one of the fields listed as
>> >> >> >> >> > available
>> >> >> >> >> > is
>> >> >> >> >> > 'ID__Total__'
>> >> >> >> >> >
>> >> >> >> >> > Further, in VS I've got the report open and am on the data
>> >> >> >> >> > tab, i
>> >> >> >> >> > hit
>> >> >> >> >> > the
>> >> >> >> >> > Run option, I receive this error: An error occurred while
>> >> >> >> >> > retrieving
>> >> >> >> >> > the
>> >> >> >> >> > parameters in the query. Could not locate entry in
>> >> >> >> >> > sysdatabases
>> >> >> >> >> > for
>> >> >> >> >> > database
>> >> >> >> >> > 'EXEC databasename'. No entry found with that name. Make
>> >> >> >> >> > sure
>> >> >> >> >> > that
>> >> >> >> >> > the
>> >> >> >> >> > name
>> >> >> >> >> > is entered correctly.'
>> >> >> >> >> >
>> >> >> >> >> > Clearly I am doing something very wrong with the stored
>> >> >> >> >> > procedure
>> >> >> >> >> > definition. Like I said, all of these reports are based on
>> >> >> >> >> > procedures,
>> >> >> >> >> > can
>> >> >> >> >> > anybody give me some suggestion/direction on the right way
>> >> >> >> >> > to
>> >> >> >> >> > call
>> >> >> >> >> > the
>> >> >> >> >> > procs?
>> >> >> >> >> > They run w/out parameters...EXEC databasename.dbo.proc
>> >> >> >> >> > that's
>> >> >> >> >> > it.
>> >> >> >> >> > Please advise.
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > -- Lynn
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>|||yes, it's sql2k, i am somewhat of a RS newbie, but I spent last week setting
reports up for all my sql jobs, just to kind of practice in the RS arena.
everything went flawlessly. i even set up one of the company reports just
fine, but it was a proc with only a single resultset. everything else is
multiple resultsets, i'm just having a very difficult time. but, i will give
this a shot, bruce. thank you, bruce
-- Lynn
"Bruce L-C [MVP]" wrote:
> Are you going against SQL Server?
> If so, then just select tored procedure for the command type and just put in
> the name of the stored procedure. Do not put exec in from of it or anything
> else. It should detect the parameter and prompt you for it. It should also
> create a report parameter as well for you.
> Try creating a new dataset and do this from the start. If you continue to
> have problems create a new stored procedure just for testing .
> create procedure dbo.testproc
> @.PARAM1 int
> as
> select 'Parameter passed in = ' + @.PARAM1 as Message
> return
> Get the above procedure to work for you so you know how to call a stored
> procedure they way I am telling you (do not use exec).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> > i'm sorry, bruce, but where do i define the parameters? rs is not
> > detecting
> > them. in my 1st dataset i've got cmd type stored procedure and the proc
> > name
> > is in the query string. i assumed i would put the 1st parameter in on the
> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> > i
> > gave it @.ch and the value of 1, but when i attempted to run it, it threw
> > me a
> > 'define query parameters box asking me to put the '1' in it.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> If you are going against SQL Server do not run your stored procedure this
> >> way. Pick command type of stored procedure. RS will detect the
> >> parameters.
> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> parameters)
> >> then pick text as the command type and do this:
> >> myproc ?
> >>
> >> Create multiple datasets and for each one you should call the stored
> >> procedure for each one.
> >>
> >> Bruce Loehle-Conger
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> > parameters,
> >> > it
> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> >> > works
> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
> >> > Data
> >> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> >> > does
> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
> >> > my
> >> > results are still returned to me. On 'Preview' tab, however, I get no
> >> > data/results at all.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Yes, you are calling it three times. In RS you create three datasets.
> >> >> Go
> >> >> to
> >> >> the dataset tab and there is a combo box with the name of the dataset,
> >> >> you
> >> >> can click on that and there is a an option for a new.
> >> >>
> >> >> In your stored procedure
> >> >>
> >> >> if @.WHICHRESULTSET = 1
> >> >> begin
> >> >> --return the first resultset here
> >> >> end
> >> >> etc
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> > Bruce, or somebody else, might you give me an example of how to give
> >> >> > the
> >> >> > proc
> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> > display
> >> >> > them?
> >> >> > Or, am I giving it three parameters and calling it three times? If
> >> >> > so,
> >> >> > how
> >> >> > would i call the 3 procs in RS?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> >> can
> >> >> >> make
> >> >> >> it optional so that it doesn't break existing code).
> >> >> >>
> >> >> >> Then call it three times in RS with a static value and create three
> >> >> >> datasets.
> >> >> >> For instance dataset1
> >> >> >> yourproc 1
> >> >> >>
> >> >> >> Dataset2
> >> >> >> yourproc 2
> >> >> >>
> >> >> >> etc.
> >> >> >>
> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> based
> >> >> >> on
> >> >> >> the
> >> >> >> parameter.
> >> >> >>
> >> >> >> Downside is that your sp is being run three times.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> >> > please,
> >> >> >> > on
> >> >> >> > the second, possibly third procedure?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> >> that.
> >> >> >> >> There
> >> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> >> procedure
> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> resultsets.
> >> >> >> >>
> >> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> >> procedure
> >> >> >> >> call can only return one.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> >> > that.
> >> >> >> >> > one
> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> > -- -- --
> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> >> > -- -- -- -- --
> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> > 583,102,631.33
> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> > 3,412.53
> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> > 444,521,928.10
> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> > 103,291.31
> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> > 178,600,674.78
> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> > 44,276,419.41
> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> > 40,267,318.25
> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> > 746,570,071.43
> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> > 483,329,796.97
> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> > 6,655,913.26
> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> > 2,539,375.00
> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> > 19,136,233.44
> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> > 6,227,451.69
> >> >> >> >> >
> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> > handle
> >> >> >> >> > the
> >> >> >> >> > 1st
> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> >> > body.
> >> >> >> >> > Do
> >> >> >> >> > you
> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> > svcs?
> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >
> >> >> >> >> > --Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> >> the
> >> >> >> >> >> name
> >> >> >> >> >> of
> >> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> >> back
> >> >> >> >> >> the
> >> >> >> >> >> data
> >> >> >> >> >> and the fields. If you do not get the field list populated
> >> >> >> >> >> then
> >> >> >> >> >> click
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> >> the
> >> >> >> >> >> refresh
> >> >> >> >> >> button for IE).
> >> >> >> >> >>
> >> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> >> cannot
> >> >> >> >> >> handle
> >> >> >> >> >> mutliple resultsets.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> >> > Hi. I have a need to create a number of different reports
> >> >> >> >> >> > via
> >> >> >> >> >> > Reporting
> >> >> >> >> >> > Services. All of which are based on stored procedures,
> >> >> >> >> >> > none
> >> >> >> >> >> > of
> >> >> >> >> >> > which
> >> >> >> >> >> > require
> >> >> >> >> >> > any parameters. Most if not all of the report is
> >> >> >> >> >> > calculated.
> >> >> >> >> >> > I
> >> >> >> >> >> > am
> >> >> >> >> >> > struggling badly to get even the most basic of the fields
> >> >> >> >> >> > in
> >> >> >> >> >> > place
> >> >> >> >> >> > w/the
> >> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> >> > the
> >> >> >> >> >> > expression
> >> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >> >
> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >> >
> >> >> >> >> >> > It, too, fails to preview, indicating the value expression
> >> >> >> >> >> > for
> >> >> >> >> >> > the
> >> >> >> >> >> > field
> >> >> >> >> >> > contains an error. Again, all of the other report items
> >> >> >> >> >> > are
> >> >> >> >> >> > calculated
> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||i am not sure how to display each resultset/dataset in the same report
-- Lynn
"Bruce L-C [MVP]" wrote:
> Are you going against SQL Server?
> If so, then just select tored procedure for the command type and just put in
> the name of the stored procedure. Do not put exec in from of it or anything
> else. It should detect the parameter and prompt you for it. It should also
> create a report parameter as well for you.
> Try creating a new dataset and do this from the start. If you continue to
> have problems create a new stored procedure just for testing .
> create procedure dbo.testproc
> @.PARAM1 int
> as
> select 'Parameter passed in = ' + @.PARAM1 as Message
> return
> Get the above procedure to work for you so you know how to call a stored
> procedure they way I am telling you (do not use exec).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> > i'm sorry, bruce, but where do i define the parameters? rs is not
> > detecting
> > them. in my 1st dataset i've got cmd type stored procedure and the proc
> > name
> > is in the query string. i assumed i would put the 1st parameter in on the
> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> > i
> > gave it @.ch and the value of 1, but when i attempted to run it, it threw
> > me a
> > 'define query parameters box asking me to put the '1' in it.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> If you are going against SQL Server do not run your stored procedure this
> >> way. Pick command type of stored procedure. RS will detect the
> >> parameters.
> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> parameters)
> >> then pick text as the command type and do this:
> >> myproc ?
> >>
> >> Create multiple datasets and for each one you should call the stored
> >> procedure for each one.
> >>
> >> Bruce Loehle-Conger
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> > parameters,
> >> > it
> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> >> > works
> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
> >> > Data
> >> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> >> > does
> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
> >> > my
> >> > results are still returned to me. On 'Preview' tab, however, I get no
> >> > data/results at all.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Yes, you are calling it three times. In RS you create three datasets.
> >> >> Go
> >> >> to
> >> >> the dataset tab and there is a combo box with the name of the dataset,
> >> >> you
> >> >> can click on that and there is a an option for a new.
> >> >>
> >> >> In your stored procedure
> >> >>
> >> >> if @.WHICHRESULTSET = 1
> >> >> begin
> >> >> --return the first resultset here
> >> >> end
> >> >> etc
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> > Bruce, or somebody else, might you give me an example of how to give
> >> >> > the
> >> >> > proc
> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> > display
> >> >> > them?
> >> >> > Or, am I giving it three parameters and calling it three times? If
> >> >> > so,
> >> >> > how
> >> >> > would i call the 3 procs in RS?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> >> can
> >> >> >> make
> >> >> >> it optional so that it doesn't break existing code).
> >> >> >>
> >> >> >> Then call it three times in RS with a static value and create three
> >> >> >> datasets.
> >> >> >> For instance dataset1
> >> >> >> yourproc 1
> >> >> >>
> >> >> >> Dataset2
> >> >> >> yourproc 2
> >> >> >>
> >> >> >> etc.
> >> >> >>
> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> based
> >> >> >> on
> >> >> >> the
> >> >> >> parameter.
> >> >> >>
> >> >> >> Downside is that your sp is being run three times.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> >> > please,
> >> >> >> > on
> >> >> >> > the second, possibly third procedure?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> >> that.
> >> >> >> >> There
> >> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> >> procedure
> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> resultsets.
> >> >> >> >>
> >> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> >> procedure
> >> >> >> >> call can only return one.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> >> > that.
> >> >> >> >> > one
> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> > -- -- --
> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> >> > -- -- -- -- --
> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> > 583,102,631.33
> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> > 3,412.53
> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> > 444,521,928.10
> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> > 103,291.31
> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> > 178,600,674.78
> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> > 44,276,419.41
> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> > 40,267,318.25
> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> > 746,570,071.43
> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> > 483,329,796.97
> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> > 6,655,913.26
> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> > 2,539,375.00
> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> > 19,136,233.44
> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> > 6,227,451.69
> >> >> >> >> >
> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> > handle
> >> >> >> >> > the
> >> >> >> >> > 1st
> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> >> > body.
> >> >> >> >> > Do
> >> >> >> >> > you
> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> > svcs?
> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >
> >> >> >> >> > --Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> >> the
> >> >> >> >> >> name
> >> >> >> >> >> of
> >> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> >> back
> >> >> >> >> >> the
> >> >> >> >> >> data
> >> >> >> >> >> and the fields. If you do not get the field list populated
> >> >> >> >> >> then
> >> >> >> >> >> click
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> >> the
> >> >> >> >> >> refresh
> >> >> >> >> >> button for IE).
> >> >> >> >> >>
> >> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> >> cannot
> >> >> >> >> >> handle
> >> >> >> >> >> mutliple resultsets.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> >> > Hi. I have a need to create a number of different reports
> >> >> >> >> >> > via
> >> >> >> >> >> > Reporting
> >> >> >> >> >> > Services. All of which are based on stored procedures,
> >> >> >> >> >> > none
> >> >> >> >> >> > of
> >> >> >> >> >> > which
> >> >> >> >> >> > require
> >> >> >> >> >> > any parameters. Most if not all of the report is
> >> >> >> >> >> > calculated.
> >> >> >> >> >> > I
> >> >> >> >> >> > am
> >> >> >> >> >> > struggling badly to get even the most basic of the fields
> >> >> >> >> >> > in
> >> >> >> >> >> > place
> >> >> >> >> >> > w/the
> >> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> >> > the
> >> >> >> >> >> > expression
> >> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >> >
> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >> >
> >> >> >> >> >> > It, too, fails to preview, indicating the value expression
> >> >> >> >> >> > for
> >> >> >> >> >> > the
> >> >> >> >> >> > field
> >> >> >> >> >> > contains an error. Again, all of the other report items
> >> >> >> >> >> > are
> >> >> >> >> >> > calculated
> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||removing everything but the proc name in the query string in dataset fails
w/this:
Could not generate a list of fields for the query.
Check the query syntax or click Refresh Fields on the query toolbar.
Line 1: Incorrect syntax near 'usp_procname'.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Are you going against SQL Server?
> If so, then just select tored procedure for the command type and just put in
> the name of the stored procedure. Do not put exec in from of it or anything
> else. It should detect the parameter and prompt you for it. It should also
> create a report parameter as well for you.
> Try creating a new dataset and do this from the start. If you continue to
> have problems create a new stored procedure just for testing .
> create procedure dbo.testproc
> @.PARAM1 int
> as
> select 'Parameter passed in = ' + @.PARAM1 as Message
> return
> Get the above procedure to work for you so you know how to call a stored
> procedure they way I am telling you (do not use exec).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> > i'm sorry, bruce, but where do i define the parameters? rs is not
> > detecting
> > them. in my 1st dataset i've got cmd type stored procedure and the proc
> > name
> > is in the query string. i assumed i would put the 1st parameter in on the
> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> > i
> > gave it @.ch and the value of 1, but when i attempted to run it, it threw
> > me a
> > 'define query parameters box asking me to put the '1' in it.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> If you are going against SQL Server do not run your stored procedure this
> >> way. Pick command type of stored procedure. RS will detect the
> >> parameters.
> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> parameters)
> >> then pick text as the command type and do this:
> >> myproc ?
> >>
> >> Create multiple datasets and for each one you should call the stored
> >> procedure for each one.
> >>
> >> Bruce Loehle-Conger
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> > parameters,
> >> > it
> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> >> > works
> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
> >> > Data
> >> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> >> > does
> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
> >> > my
> >> > results are still returned to me. On 'Preview' tab, however, I get no
> >> > data/results at all.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Yes, you are calling it three times. In RS you create three datasets.
> >> >> Go
> >> >> to
> >> >> the dataset tab and there is a combo box with the name of the dataset,
> >> >> you
> >> >> can click on that and there is a an option for a new.
> >> >>
> >> >> In your stored procedure
> >> >>
> >> >> if @.WHICHRESULTSET = 1
> >> >> begin
> >> >> --return the first resultset here
> >> >> end
> >> >> etc
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> > Bruce, or somebody else, might you give me an example of how to give
> >> >> > the
> >> >> > proc
> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> > display
> >> >> > them?
> >> >> > Or, am I giving it three parameters and calling it three times? If
> >> >> > so,
> >> >> > how
> >> >> > would i call the 3 procs in RS?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> >> can
> >> >> >> make
> >> >> >> it optional so that it doesn't break existing code).
> >> >> >>
> >> >> >> Then call it three times in RS with a static value and create three
> >> >> >> datasets.
> >> >> >> For instance dataset1
> >> >> >> yourproc 1
> >> >> >>
> >> >> >> Dataset2
> >> >> >> yourproc 2
> >> >> >>
> >> >> >> etc.
> >> >> >>
> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> based
> >> >> >> on
> >> >> >> the
> >> >> >> parameter.
> >> >> >>
> >> >> >> Downside is that your sp is being run three times.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> >> > please,
> >> >> >> > on
> >> >> >> > the second, possibly third procedure?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> >> that.
> >> >> >> >> There
> >> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> >> procedure
> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> resultsets.
> >> >> >> >>
> >> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> >> procedure
> >> >> >> >> call can only return one.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> >> > that.
> >> >> >> >> > one
> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> > -- -- --
> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> >> > -- -- -- -- --
> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> > 583,102,631.33
> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> > 3,412.53
> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> > 444,521,928.10
> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> > 103,291.31
> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> > 178,600,674.78
> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> > 44,276,419.41
> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> > 40,267,318.25
> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> > 746,570,071.43
> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> > 483,329,796.97
> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> > 6,655,913.26
> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> > 2,539,375.00
> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> > 19,136,233.44
> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> > 6,227,451.69
> >> >> >> >> >
> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> > handle
> >> >> >> >> > the
> >> >> >> >> > 1st
> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> >> > body.
> >> >> >> >> > Do
> >> >> >> >> > you
> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> > svcs?
> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >
> >> >> >> >> > --Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> >> the
> >> >> >> >> >> name
> >> >> >> >> >> of
> >> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> >> back
> >> >> >> >> >> the
> >> >> >> >> >> data
> >> >> >> >> >> and the fields. If you do not get the field list populated
> >> >> >> >> >> then
> >> >> >> >> >> click
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> >> the
> >> >> >> >> >> refresh
> >> >> >> >> >> button for IE).
> >> >> >> >> >>
> >> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> >> cannot
> >> >> >> >> >> handle
> >> >> >> >> >> mutliple resultsets.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> >> > Hi. I have a need to create a number of different reports
> >> >> >> >> >> > via
> >> >> >> >> >> > Reporting
> >> >> >> >> >> > Services. All of which are based on stored procedures,
> >> >> >> >> >> > none
> >> >> >> >> >> > of
> >> >> >> >> >> > which
> >> >> >> >> >> > require
> >> >> >> >> >> > any parameters. Most if not all of the report is
> >> >> >> >> >> > calculated.
> >> >> >> >> >> > I
> >> >> >> >> >> > am
> >> >> >> >> >> > struggling badly to get even the most basic of the fields
> >> >> >> >> >> > in
> >> >> >> >> >> > place
> >> >> >> >> >> > w/the
> >> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> >> > the
> >> >> >> >> >> > expression
> >> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >> >
> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >> >
> >> >> >> >> >> > It, too, fails to preview, indicating the value expression
> >> >> >> >> >> > for
> >> >> >> >> >> > the
> >> >> >> >> >> > field
> >> >> >> >> >> > contains an error. Again, all of the other report items
> >> >> >> >> >> > are
> >> >> >> >> >> > calculated
> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||my bad, bruce, that was because i had text in cmd type. having changed it to
stored procedure, it pops up the 'define query parameters' box, asking me to
put something in. how do i pass those in dynamically?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Are you going against SQL Server?
> If so, then just select tored procedure for the command type and just put in
> the name of the stored procedure. Do not put exec in from of it or anything
> else. It should detect the parameter and prompt you for it. It should also
> create a report parameter as well for you.
> Try creating a new dataset and do this from the start. If you continue to
> have problems create a new stored procedure just for testing .
> create procedure dbo.testproc
> @.PARAM1 int
> as
> select 'Parameter passed in = ' + @.PARAM1 as Message
> return
> Get the above procedure to work for you so you know how to call a stored
> procedure they way I am telling you (do not use exec).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> > i'm sorry, bruce, but where do i define the parameters? rs is not
> > detecting
> > them. in my 1st dataset i've got cmd type stored procedure and the proc
> > name
> > is in the query string. i assumed i would put the 1st parameter in on the
> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> > i
> > gave it @.ch and the value of 1, but when i attempted to run it, it threw
> > me a
> > 'define query parameters box asking me to put the '1' in it.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> If you are going against SQL Server do not run your stored procedure this
> >> way. Pick command type of stored procedure. RS will detect the
> >> parameters.
> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> parameters)
> >> then pick text as the command type and do this:
> >> myproc ?
> >>
> >> Create multiple datasets and for each one you should call the stored
> >> procedure for each one.
> >>
> >> Bruce Loehle-Conger
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> > parameters,
> >> > it
> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> >> > works
> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
> >> > Data
> >> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> >> > does
> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
> >> > my
> >> > results are still returned to me. On 'Preview' tab, however, I get no
> >> > data/results at all.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Yes, you are calling it three times. In RS you create three datasets.
> >> >> Go
> >> >> to
> >> >> the dataset tab and there is a combo box with the name of the dataset,
> >> >> you
> >> >> can click on that and there is a an option for a new.
> >> >>
> >> >> In your stored procedure
> >> >>
> >> >> if @.WHICHRESULTSET = 1
> >> >> begin
> >> >> --return the first resultset here
> >> >> end
> >> >> etc
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> > Bruce, or somebody else, might you give me an example of how to give
> >> >> > the
> >> >> > proc
> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> > display
> >> >> > them?
> >> >> > Or, am I giving it three parameters and calling it three times? If
> >> >> > so,
> >> >> > how
> >> >> > would i call the 3 procs in RS?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> >> can
> >> >> >> make
> >> >> >> it optional so that it doesn't break existing code).
> >> >> >>
> >> >> >> Then call it three times in RS with a static value and create three
> >> >> >> datasets.
> >> >> >> For instance dataset1
> >> >> >> yourproc 1
> >> >> >>
> >> >> >> Dataset2
> >> >> >> yourproc 2
> >> >> >>
> >> >> >> etc.
> >> >> >>
> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> based
> >> >> >> on
> >> >> >> the
> >> >> >> parameter.
> >> >> >>
> >> >> >> Downside is that your sp is being run three times.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> >> > please,
> >> >> >> > on
> >> >> >> > the second, possibly third procedure?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> >> that.
> >> >> >> >> There
> >> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> >> procedure
> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> resultsets.
> >> >> >> >>
> >> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> >> procedure
> >> >> >> >> call can only return one.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> >> > that.
> >> >> >> >> > one
> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> > -- -- --
> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> >> > -- -- -- -- --
> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> > 583,102,631.33
> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> > 3,412.53
> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> > 444,521,928.10
> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> > 103,291.31
> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> > 178,600,674.78
> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> > 44,276,419.41
> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> > 40,267,318.25
> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> > 746,570,071.43
> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> > 483,329,796.97
> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> > 6,655,913.26
> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> > 2,539,375.00
> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> > 19,136,233.44
> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> > 6,227,451.69
> >> >> >> >> >
> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> > handle
> >> >> >> >> > the
> >> >> >> >> > 1st
> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> >> > body.
> >> >> >> >> > Do
> >> >> >> >> > you
> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> > svcs?
> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >
> >> >> >> >> > --Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> >> the
> >> >> >> >> >> name
> >> >> >> >> >> of
> >> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> >> back
> >> >> >> >> >> the
> >> >> >> >> >> data
> >> >> >> >> >> and the fields. If you do not get the field list populated
> >> >> >> >> >> then
> >> >> >> >> >> click
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> >> the
> >> >> >> >> >> refresh
> >> >> >> >> >> button for IE).
> >> >> >> >> >>
> >> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> >> cannot
> >> >> >> >> >> handle
> >> >> >> >> >> mutliple resultsets.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> >> > Hi. I have a need to create a number of different reports
> >> >> >> >> >> > via
> >> >> >> >> >> > Reporting
> >> >> >> >> >> > Services. All of which are based on stored procedures,
> >> >> >> >> >> > none
> >> >> >> >> >> > of
> >> >> >> >> >> > which
> >> >> >> >> >> > require
> >> >> >> >> >> > any parameters. Most if not all of the report is
> >> >> >> >> >> > calculated.
> >> >> >> >> >> > I
> >> >> >> >> >> > am
> >> >> >> >> >> > struggling badly to get even the most basic of the fields
> >> >> >> >> >> > in
> >> >> >> >> >> > place
> >> >> >> >> >> > w/the
> >> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> >> > the
> >> >> >> >> >> > expression
> >> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >> >
> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >> >
> >> >> >> >> >> > It, too, fails to preview, indicating the value expression
> >> >> >> >> >> > for
> >> >> >> >> >> > the
> >> >> >> >> >> > field
> >> >> >> >> >> > contains an error. Again, all of the other report items
> >> >> >> >> >> > are
> >> >> >> >> >> > calculated
> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||last one for a while, bruce, i promise. i've got all 4 datasets in there,
each asks me for a parameter, i put 1,2,3 and 4 into each, getting my 'whole
report' in four small subsets of data. how do i get this to happen on the
report page automatically without needing user input?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Are you going against SQL Server?
> If so, then just select tored procedure for the command type and just put in
> the name of the stored procedure. Do not put exec in from of it or anything
> else. It should detect the parameter and prompt you for it. It should also
> create a report parameter as well for you.
> Try creating a new dataset and do this from the start. If you continue to
> have problems create a new stored procedure just for testing .
> create procedure dbo.testproc
> @.PARAM1 int
> as
> select 'Parameter passed in = ' + @.PARAM1 as Message
> return
> Get the above procedure to work for you so you know how to call a stored
> procedure they way I am telling you (do not use exec).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> > i'm sorry, bruce, but where do i define the parameters? rs is not
> > detecting
> > them. in my 1st dataset i've got cmd type stored procedure and the proc
> > name
> > is in the query string. i assumed i would put the 1st parameter in on the
> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets, so
> > i
> > gave it @.ch and the value of 1, but when i attempted to run it, it threw
> > me a
> > 'define query parameters box asking me to put the '1' in it.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> If you are going against SQL Server do not run your stored procedure this
> >> way. Pick command type of stored procedure. RS will detect the
> >> parameters.
> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> parameters)
> >> then pick text as the command type and do this:
> >> myproc ?
> >>
> >> Create multiple datasets and for each one you should call the stored
> >> procedure for each one.
> >>
> >> Bruce Loehle-Conger
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> > parameters,
> >> > it
> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the results,
> >> > works
> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN in
> >> > Data
> >> > tab it returns an error: SQL Syntax Errors Encountered...The designer
> >> > does
> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK' and
> >> > my
> >> > results are still returned to me. On 'Preview' tab, however, I get no
> >> > data/results at all.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Yes, you are calling it three times. In RS you create three datasets.
> >> >> Go
> >> >> to
> >> >> the dataset tab and there is a combo box with the name of the dataset,
> >> >> you
> >> >> can click on that and there is a an option for a new.
> >> >>
> >> >> In your stored procedure
> >> >>
> >> >> if @.WHICHRESULTSET = 1
> >> >> begin
> >> >> --return the first resultset here
> >> >> end
> >> >> etc
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> > Bruce, or somebody else, might you give me an example of how to give
> >> >> > the
> >> >> > proc
> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> > display
> >> >> > them?
> >> >> > Or, am I giving it three parameters and calling it three times? If
> >> >> > so,
> >> >> > how
> >> >> > would i call the 3 procs in RS?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Configure your existing stored procedure to accept a parameter (you
> >> >> >> can
> >> >> >> make
> >> >> >> it optional so that it doesn't break existing code).
> >> >> >>
> >> >> >> Then call it three times in RS with a static value and create three
> >> >> >> datasets.
> >> >> >> For instance dataset1
> >> >> >> yourproc 1
> >> >> >>
> >> >> >> Dataset2
> >> >> >> yourproc 2
> >> >> >>
> >> >> >> etc.
> >> >> >>
> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> based
> >> >> >> on
> >> >> >> the
> >> >> >> parameter.
> >> >> >>
> >> >> >> Downside is that your sp is being run three times.
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little more,
> >> >> >> > please,
> >> >> >> > on
> >> >> >> > the second, possibly third procedure?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> This is three resultsets. RS does not have the ability to handle
> >> >> >> >> that.
> >> >> >> >> There
> >> >> >> >> is no work around from RS side. You could create another stored
> >> >> >> >> procedure
> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> resultsets.
> >> >> >> >>
> >> >> >> >> RS can deal with multiple datasets quite well, but each stored
> >> >> >> >> procedure
> >> >> >> >> call can only return one.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple as
> >> >> >> >> > that.
> >> >> >> >> > one
> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> > -- -- --
> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > EndPoint Liquidity #Trades Volume Total $
> >> >> >> >> > -- -- -- -- --
> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> > 583,102,631.33
> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> > 3,412.53
> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> > 444,521,928.10
> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> > 103,291.31
> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> > 178,600,674.78
> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> > 44,276,419.41
> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> > 40,267,318.25
> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> > 746,570,071.43
> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> > 483,329,796.97
> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> > 6,655,913.26
> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> > 2,539,375.00
> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> > 19,136,233.44
> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> > 6,227,451.69
> >> >> >> >> >
> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >
> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> > -- -- -- --
> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >
> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> > handle
> >> >> >> >> > the
> >> >> >> >> > 1st
> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in the
> >> >> >> >> > body.
> >> >> >> >> > Do
> >> >> >> >> > you
> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> > svcs?
> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >
> >> >> >> >> > --Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Pick the command type as stored procedure and then just enter
> >> >> >> >> >> the
> >> >> >> >> >> name
> >> >> >> >> >> of
> >> >> >> >> >> the stored procedure. When you click on the ! you should get
> >> >> >> >> >> back
> >> >> >> >> >> the
> >> >> >> >> >> data
> >> >> >> >> >> and the fields. If you do not get the field list populated
> >> >> >> >> >> then
> >> >> >> >> >> click
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> refresh fields button (to the right of the ..., it looks like
> >> >> >> >> >> the
> >> >> >> >> >> refresh
> >> >> >> >> >> button for IE).
> >> >> >> >> >>
> >> >> >> >> >> Note that RS only works with the first resultset returned. It
> >> >> >> >> >> cannot
> >> >> >> >> >> handle
> >> >> >> >> >> mutliple resultsets.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
> >> >> >> >> >> > Hi. I have a need to create a number of different reports
> >> >> >> >> >> > via
> >> >> >> >> >> > Reporting
> >> >> >> >> >> > Services. All of which are based on stored procedures,
> >> >> >> >> >> > none
> >> >> >> >> >> > of
> >> >> >> >> >> > which
> >> >> >> >> >> > require
> >> >> >> >> >> > any parameters. Most if not all of the report is
> >> >> >> >> >> > calculated.
> >> >> >> >> >> > I
> >> >> >> >> >> > am
> >> >> >> >> >> > struggling badly to get even the most basic of the fields
> >> >> >> >> >> > in
> >> >> >> >> >> > place
> >> >> >> >> >> > w/the
> >> >> >> >> >> > correct expressions. The only one I actually got to accept
> >> >> >> >> >> > the
> >> >> >> >> >> > expression
> >> >> >> >> >> > was a Date field, this is the calculation:
> >> >> >> >> >> >
> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
> >> >> >> >> >> >
> >> >> >> >> >> > It, too, fails to preview, indicating the value expression
> >> >> >> >> >> > for
> >> >> >> >> >> > the
> >> >> >> >> >> > field
> >> >> >> >> >> > contains an error. Again, all of the other report items
> >> >> >> >> >> > are
> >> >> >> >> >> > calculated
> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||Query parameters and report parameters seem to be the same thing but they
are not. RS automatically creates a report parameter for each query
parameter but instead you can map the query parameter to a constant. Click
on the ... for the dataset, go to the parameters tab. On the right you will
see it mapping to the report parameter, click on that and select expression.
In expression put = 1 (assuming it is an integert expression) for the first
dataset, =2 etc. Then go to report layout, report menu-> report parameters
and then delete the report parameters created for you.
You are very very close to the solution.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> last one for a while, bruce, i promise. i've got all 4 datasets in there,
> each asks me for a parameter, i put 1,2,3 and 4 into each, getting my
> 'whole
> report' in four small subsets of data. how do i get this to happen on the
> report page automatically without needing user input?
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Are you going against SQL Server?
>> If so, then just select tored procedure for the command type and just put
>> in
>> the name of the stored procedure. Do not put exec in from of it or
>> anything
>> else. It should detect the parameter and prompt you for it. It should
>> also
>> create a report parameter as well for you.
>> Try creating a new dataset and do this from the start. If you continue to
>> have problems create a new stored procedure just for testing .
>> create procedure dbo.testproc
>> @.PARAM1 int
>> as
>> select 'Parameter passed in = ' + @.PARAM1 as Message
>> return
>> Get the above procedure to work for you so you know how to call a stored
>> procedure they way I am telling you (do not use exec).
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
>> > i'm sorry, bruce, but where do i define the parameters? rs is not
>> > detecting
>> > them. in my 1st dataset i've got cmd type stored procedure and the
>> > proc
>> > name
>> > is in the query string. i assumed i would put the 1st parameter in on
>> > the
>> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets,
>> > so
>> > i
>> > gave it @.ch and the value of 1, but when i attempted to run it, it
>> > threw
>> > me a
>> > 'define query parameters box asking me to put the '1' in it.
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> If you are going against SQL Server do not run your stored procedure
>> >> this
>> >> way. Pick command type of stored procedure. RS will detect the
>> >> parameters.
>> >> If going against ODBC or OLEDB driver (which uses ? format for
>> >> parameters)
>> >> then pick text as the command type and do this:
>> >> myproc ?
>> >>
>> >> Create multiple datasets and for each one you should call the stored
>> >> procedure for each one.
>> >>
>> >> Bruce Loehle-Conger
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> >> > And, if I blow away the 2nd dataset and just give my 1st one
>> >> > parameters,
>> >> > it
>> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
>> >> > results,
>> >> > works
>> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN
>> >> > in
>> >> > Data
>> >> > tab it returns an error: SQL Syntax Errors Encountered...The
>> >> > designer
>> >> > does
>> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK'
>> >> > and
>> >> > my
>> >> > results are still returned to me. On 'Preview' tab, however, I get
>> >> > no
>> >> > data/results at all.
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> Yes, you are calling it three times. In RS you create three
>> >> >> datasets.
>> >> >> Go
>> >> >> to
>> >> >> the dataset tab and there is a combo box with the name of the
>> >> >> dataset,
>> >> >> you
>> >> >> can click on that and there is a an option for a new.
>> >> >>
>> >> >> In your stored procedure
>> >> >>
>> >> >> if @.WHICHRESULTSET = 1
>> >> >> begin
>> >> >> --return the first resultset here
>> >> >> end
>> >> >> etc
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> >> >> > Bruce, or somebody else, might you give me an example of how to
>> >> >> > give
>> >> >> > the
>> >> >> > proc
>> >> >> > 3 parameters, producing three resultsets in a way that RS will
>> >> >> > display
>> >> >> > them?
>> >> >> > Or, am I giving it three parameters and calling it three times?
>> >> >> > If
>> >> >> > so,
>> >> >> > how
>> >> >> > would i call the 3 procs in RS?
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> Configure your existing stored procedure to accept a parameter
>> >> >> >> (you
>> >> >> >> can
>> >> >> >> make
>> >> >> >> it optional so that it doesn't break existing code).
>> >> >> >>
>> >> >> >> Then call it three times in RS with a static value and create
>> >> >> >> three
>> >> >> >> datasets.
>> >> >> >> For instance dataset1
>> >> >> >> yourproc 1
>> >> >> >>
>> >> >> >> Dataset2
>> >> >> >> yourproc 2
>> >> >> >>
>> >> >> >> etc.
>> >> >> >>
>> >> >> >> Then in your stored procedure return the appropriate resultset
>> >> >> >> based
>> >> >> >> on
>> >> >> >> the
>> >> >> >> parameter.
>> >> >> >>
>> >> >> >> Downside is that your sp is being run three times.
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little
>> >> >> >> > more,
>> >> >> >> > please,
>> >> >> >> > on
>> >> >> >> > the second, possibly third procedure?
>> >> >> >> > -- Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> This is three resultsets. RS does not have the ability to
>> >> >> >> >> handle
>> >> >> >> >> that.
>> >> >> >> >> There
>> >> >> >> >> is no work around from RS side. You could create another
>> >> >> >> >> stored
>> >> >> >> >> procedure
>> >> >> >> >> that calls this one and have it return just one of the
>> >> >> >> >> resultsets.
>> >> >> >> >>
>> >> >> >> >> RS can deal with multiple datasets quite well, but each
>> >> >> >> >> stored
>> >> >> >> >> procedure
>> >> >> >> >> call can only return one.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple
>> >> >> >> >> > as
>> >> >> >> >> > that.
>> >> >> >> >> > one
>> >> >> >> >> > remaining problem, though. one of my reports is like this:
>> >> >> >> >> >
>> >> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> >> > -- -- -- --
>> >> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> >> > 33,333,333,333.33
>> >> >> >> >> >
>> >> >> >> >> > #Stocks Volume Total $
>> >> >> >> >> > -- -- --
>> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
>> >> >> >> >> >
>> >> >> >> >> > EndPoint Liquidity #Trades Volume
>> >> >> >> >> > Total $
>> >> >> >> >> > -- -- -- -- --
>> >> >> >> >> > AAAA Add 114,729 21,797,575
>> >> >> >> >> > 583,102,631.33
>> >> >> >> >> > AAAA Opening 1 27
>> >> >> >> >> > 3,412.53
>> >> >> >> >> > AAAA Remove 30,836 8,330,843
>> >> >> >> >> > 444,521,928.10
>> >> >> >> >> > AAAA Route 41 4,543
>> >> >> >> >> > 103,291.31
>> >> >> >> >> > BBBB Add 26,997 9,940,201
>> >> >> >> >> > 178,600,674.78
>> >> >> >> >> > BBBB Opening 8,089 1,448,143
>> >> >> >> >> > 44,276,419.41
>> >> >> >> >> > BBBB Remove 3,406 1,719,403
>> >> >> >> >> > 40,267,318.25
>> >> >> >> >> > CCCC Add 83,781 22,443,732
>> >> >> >> >> > 746,570,071.43
>> >> >> >> >> > CCCC Remove 35,756 12,250,359
>> >> >> >> >> > 483,329,796.97
>> >> >> >> >> > CCCC Route 1,088 244,697
>> >> >> >> >> > 6,655,913.26
>> >> >> >> >> > DDDD Route 2 62,500
>> >> >> >> >> > 2,539,375.00
>> >> >> >> >> > DDDD Add 2,354 1,262,589
>> >> >> >> >> > 19,136,233.44
>> >> >> >> >> > DDDD Remove 258 195,019
>> >> >> >> >> > 6,227,451.69
>> >> >> >> >> >
>> >> >> >> >> > I only receive the top line in the resultset:
>> >> >> >> >> >
>> >> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> >> > -- -- -- --
>> >> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> >> > 33,333,333,333.33
>> >> >> >> >> >
>> >> >> >> >> > I assume this is what you mean when you say it will only
>> >> >> >> >> > handle
>> >> >> >> >> > the
>> >> >> >> >> > 1st
>> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in
>> >> >> >> >> > the
>> >> >> >> >> > body.
>> >> >> >> >> > Do
>> >> >> >> >> > you
>> >> >> >> >> > have any idea how I can achieve this report via reporting
>> >> >> >> >> > svcs?
>> >> >> >> >> > Unfortunately, this is very important. Please do advise.
>> >> >> >> >> >
>> >> >> >> >> > --Lynn
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> Pick the command type as stored procedure and then just
>> >> >> >> >> >> enter
>> >> >> >> >> >> the
>> >> >> >> >> >> name
>> >> >> >> >> >> of
>> >> >> >> >> >> the stored procedure. When you click on the ! you should
>> >> >> >> >> >> get
>> >> >> >> >> >> back
>> >> >> >> >> >> the
>> >> >> >> >> >> data
>> >> >> >> >> >> and the fields. If you do not get the field list populated
>> >> >> >> >> >> then
>> >> >> >> >> >> click
>> >> >> >> >> >> on
>> >> >> >> >> >> the
>> >> >> >> >> >> refresh fields button (to the right of the ..., it looks
>> >> >> >> >> >> like
>> >> >> >> >> >> the
>> >> >> >> >> >> refresh
>> >> >> >> >> >> button for IE).
>> >> >> >> >> >>
>> >> >> >> >> >> Note that RS only works with the first resultset returned.
>> >> >> >> >> >> It
>> >> >> >> >> >> cannot
>> >> >> >> >> >> handle
>> >> >> >> >> >> mutliple resultsets.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> >>
>> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> >> news:EF6A6CBC-083B-4537-83D9-D763A8ABA056@.microsoft.com...
>> >> >> >> >> >> > Hi. I have a need to create a number of different
>> >> >> >> >> >> > reports
>> >> >> >> >> >> > via
>> >> >> >> >> >> > Reporting
>> >> >> >> >> >> > Services. All of which are based on stored procedures,
>> >> >> >> >> >> > none
>> >> >> >> >> >> > of
>> >> >> >> >> >> > which
>> >> >> >> >> >> > require
>> >> >> >> >> >> > any parameters. Most if not all of the report is
>> >> >> >> >> >> > calculated.
>> >> >> >> >> >> > I
>> >> >> >> >> >> > am
>> >> >> >> >> >> > struggling badly to get even the most basic of the
>> >> >> >> >> >> > fields
>> >> >> >> >> >> > in
>> >> >> >> >> >> > place
>> >> >> >> >> >> > w/the
>> >> >> >> >> >> > correct expressions. The only one I actually got to
>> >> >> >> >> >> > accept
>> >> >> >> >> >> > the
>> >> >> >> >> >> > expression
>> >> >> >> >> >> > was a Date field, this is the calculation:
>> >> >> >> >> >> >
>> >> >> >> >> >> > =SELECT CONVERT(char(10),dateadd(dd,-0,GetDate()),1)
>> >> >> >> >> >> >
>> >> >> >> >> >> > It, too, fails to preview, indicating the value
>> >> >> >> >> >> > expression
>> >> >> >> >> >> > for
>> >> >> >> >> >> > the
>> >> >> >> >> >> > field
>> >> >> >> >> >> > contains an error. Again, all of the other report items
>> >> >> >> >> >> > are
>> >> >> >> >> >> > calculated
>> >> >> >> >> >> > fields. SUMs, totals, money formats, CASE statements,|||oh my goodness this is frustrating me....i did what you said, bruce, and it
almost worked. the preview report shows me three values which correspond, i
believe, to the only three fields in my report. see, they're all calculated
fields. the output of the rpt is this:
Build complete -- 0 errors, 0 warnings
The data set â'DataSet3â' contains a definition for the field
â'Futures_Volumeâ'. This field is missing from the returned result set from the
data source.
The data set â'DataSet4â' contains a definition for the field
â'Futures_Volumeâ'. This field is missing from the returned result set from the
data source.
The data set â'DataSet2â' contains a definition for the field
â'Futures_Volumeâ'. This field is missing from the returned result set from the
data source.
Preview complete -- 0 errors, 3 warnings
Now, I created the4 datasets, the parameter for each is simply 1, 2, 3 and
4. The report, or the query, is not auto-generating my other fields as it
did for three that I do see. The 'Futures_Volume' is one of the fields that
was auto-generated for me, and it is in the 1st dataset. Is it that I just
need to manually add in the other fields? Please do let me know what you
think.
and thank you, bruce, for helping me through this. i truly do appreciate
it. i know i am close...and i got the other reports for my server jobs and
one of the other company reports to work. it's just these multi-resultset
reports are fighting me.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Query parameters and report parameters seem to be the same thing but they
> are not. RS automatically creates a report parameter for each query
> parameter but instead you can map the query parameter to a constant. Click
> on the ... for the dataset, go to the parameters tab. On the right you will
> see it mapping to the report parameter, click on that and select expression.
> In expression put = 1 (assuming it is an integert expression) for the first
> dataset, =2 etc. Then go to report layout, report menu-> report parameters
> and then delete the report parameters created for you.
> You are very very close to the solution.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> > last one for a while, bruce, i promise. i've got all 4 datasets in there,
> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting my
> > 'whole
> > report' in four small subsets of data. how do i get this to happen on the
> > report page automatically without needing user input?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Are you going against SQL Server?
> >>
> >> If so, then just select tored procedure for the command type and just put
> >> in
> >> the name of the stored procedure. Do not put exec in from of it or
> >> anything
> >> else. It should detect the parameter and prompt you for it. It should
> >> also
> >> create a report parameter as well for you.
> >>
> >> Try creating a new dataset and do this from the start. If you continue to
> >> have problems create a new stored procedure just for testing .
> >>
> >> create procedure dbo.testproc
> >> @.PARAM1 int
> >> as
> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> return
> >>
> >> Get the above procedure to work for you so you know how to call a stored
> >> procedure they way I am telling you (do not use exec).
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> > i'm sorry, bruce, but where do i define the parameters? rs is not
> >> > detecting
> >> > them. in my 1st dataset i've got cmd type stored procedure and the
> >> > proc
> >> > name
> >> > is in the query string. i assumed i would put the 1st parameter in on
> >> > the
> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other datasets,
> >> > so
> >> > i
> >> > gave it @.ch and the value of 1, but when i attempted to run it, it
> >> > threw
> >> > me a
> >> > 'define query parameters box asking me to put the '1' in it.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> If you are going against SQL Server do not run your stored procedure
> >> >> this
> >> >> way. Pick command type of stored procedure. RS will detect the
> >> >> parameters.
> >> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> >> parameters)
> >> >> then pick text as the command type and do this:
> >> >> myproc ?
> >> >>
> >> >> Create multiple datasets and for each one you should call the stored
> >> >> procedure for each one.
> >> >>
> >> >> Bruce Loehle-Conger
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> >> > parameters,
> >> >> > it
> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
> >> >> > results,
> >> >> > works
> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit RUN
> >> >> > in
> >> >> > Data
> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
> >> >> > designer
> >> >> > does
> >> >> > not graphically support the EXEC SQL Construct' but, i hit 'OK'
> >> >> > and
> >> >> > my
> >> >> > results are still returned to me. On 'Preview' tab, however, I get
> >> >> > no
> >> >> > data/results at all.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Yes, you are calling it three times. In RS you create three
> >> >> >> datasets.
> >> >> >> Go
> >> >> >> to
> >> >> >> the dataset tab and there is a combo box with the name of the
> >> >> >> dataset,
> >> >> >> you
> >> >> >> can click on that and there is a an option for a new.
> >> >> >>
> >> >> >> In your stored procedure
> >> >> >>
> >> >> >> if @.WHICHRESULTSET = 1
> >> >> >> begin
> >> >> >> --return the first resultset here
> >> >> >> end
> >> >> >> etc
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> >> > Bruce, or somebody else, might you give me an example of how to
> >> >> >> > give
> >> >> >> > the
> >> >> >> > proc
> >> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> >> > display
> >> >> >> > them?
> >> >> >> > Or, am I giving it three parameters and calling it three times?
> >> >> >> > If
> >> >> >> > so,
> >> >> >> > how
> >> >> >> > would i call the 3 procs in RS?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Configure your existing stored procedure to accept a parameter
> >> >> >> >> (you
> >> >> >> >> can
> >> >> >> >> make
> >> >> >> >> it optional so that it doesn't break existing code).
> >> >> >> >>
> >> >> >> >> Then call it three times in RS with a static value and create
> >> >> >> >> three
> >> >> >> >> datasets.
> >> >> >> >> For instance dataset1
> >> >> >> >> yourproc 1
> >> >> >> >>
> >> >> >> >> Dataset2
> >> >> >> >> yourproc 2
> >> >> >> >>
> >> >> >> >> etc.
> >> >> >> >>
> >> >> >> >> Then in your stored procedure return the appropriate resultset
> >> >> >> >> based
> >> >> >> >> on
> >> >> >> >> the
> >> >> >> >> parameter.
> >> >> >> >>
> >> >> >> >> Downside is that your sp is being run three times.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little
> >> >> >> >> > more,
> >> >> >> >> > please,
> >> >> >> >> > on
> >> >> >> >> > the second, possibly third procedure?
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> This is three resultsets. RS does not have the ability to
> >> >> >> >> >> handle
> >> >> >> >> >> that.
> >> >> >> >> >> There
> >> >> >> >> >> is no work around from RS side. You could create another
> >> >> >> >> >> stored
> >> >> >> >> >> procedure
> >> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> >> resultsets.
> >> >> >> >> >>
> >> >> >> >> >> RS can deal with multiple datasets quite well, but each
> >> >> >> >> >> stored
> >> >> >> >> >> procedure
> >> >> >> >> >> call can only return one.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> >> > oh, bruce, that is great. I can't believe it was as simple
> >> >> >> >> >> > as
> >> >> >> >> >> > that.
> >> >> >> >> >> > one
> >> >> >> >> >> > remaining problem, though. one of my reports is like this:
> >> >> >> >> >> >
> >> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> >> > -- -- -- --
> >> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >> >
> >> >> >> >> >> > #Stocks Volume Total $
> >> >> >> >> >> > -- -- --
> >> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
> >> >> >> >> >> >
> >> >> >> >> >> > EndPoint Liquidity #Trades Volume
> >> >> >> >> >> > Total $
> >> >> >> >> >> > -- -- -- -- --
> >> >> >> >> >> > AAAA Add 114,729 21,797,575
> >> >> >> >> >> > 583,102,631.33
> >> >> >> >> >> > AAAA Opening 1 27
> >> >> >> >> >> > 3,412.53
> >> >> >> >> >> > AAAA Remove 30,836 8,330,843
> >> >> >> >> >> > 444,521,928.10
> >> >> >> >> >> > AAAA Route 41 4,543
> >> >> >> >> >> > 103,291.31
> >> >> >> >> >> > BBBB Add 26,997 9,940,201
> >> >> >> >> >> > 178,600,674.78
> >> >> >> >> >> > BBBB Opening 8,089 1,448,143
> >> >> >> >> >> > 44,276,419.41
> >> >> >> >> >> > BBBB Remove 3,406 1,719,403
> >> >> >> >> >> > 40,267,318.25
> >> >> >> >> >> > CCCC Add 83,781 22,443,732
> >> >> >> >> >> > 746,570,071.43
> >> >> >> >> >> > CCCC Remove 35,756 12,250,359
> >> >> >> >> >> > 483,329,796.97
> >> >> >> >> >> > CCCC Route 1,088 244,697
> >> >> >> >> >> > 6,655,913.26
> >> >> >> >> >> > DDDD Route 2 62,500
> >> >> >> >> >> > 2,539,375.00
> >> >> >> >> >> > DDDD Add 2,354 1,262,589
> >> >> >> >> >> > 19,136,233.44
> >> >> >> >> >> > DDDD Remove 258 195,019
> >> >> >> >> >> > 6,227,451.69
> >> >> >> >> >> >
> >> >> >> >> >> > I only receive the top line in the resultset:
> >> >> >> >> >> >
> >> >> >> >> >> > Date Total Trades Symbols Traded Total $
> >> >> >> >> >> > -- -- -- --
> >> >> >> >> >> > 02/07/2006 333,333 333
> >> >> >> >> >> > 33,333,333,333.33
> >> >> >> >> >> >
> >> >> >> >> >> > I assume this is what you mean when you say it will only
> >> >> >> >> >> > handle
> >> >> >> >> >> > the
> >> >> >> >> >> > 1st
> >> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in
> >> >> >> >> >> > the
> >> >> >> >> >> > body.
> >> >> >> >> >> > Do
> >> >> >> >> >> > you
> >> >> >> >> >> > have any idea how I can achieve this report via reporting
> >> >> >> >> >> > svcs?
> >> >> >> >> >> > Unfortunately, this is very important. Please do advise.
> >> >> >> >> >> >
> >> >> >> >> >> > --Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Pick the command type as stored procedure and then just
> >> >> >> >> >> >> enter
> >> >> >> >> >> >> the
> >> >> >> >> >> >> name
> >> >> >> >> >> >> of
> >> >> >> >> >> >> the stored procedure. When you click on the ! you should
> >> >> >> >> >> >> get
> >> >> >> >> >> >> back|||For each of your datasets make sure there is a field list. Sometimes you
have to click on the refresh fields button (to the right of the ...).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> oh my goodness this is frustrating me....i did what you said, bruce, and
> it
> almost worked. the preview report shows me three values which correspond,
> i
> believe, to the only three fields in my report. see, they're all
> calculated
> fields. the output of the rpt is this:
> Build complete -- 0 errors, 0 warnings
> The data set 'DataSet3' contains a definition for the field
> 'Futures_Volume'. This field is missing from the returned result set from
> the
> data source.
> The data set 'DataSet4' contains a definition for the field
> 'Futures_Volume'. This field is missing from the returned result set from
> the
> data source.
> The data set 'DataSet2' contains a definition for the field
> 'Futures_Volume'. This field is missing from the returned result set from
> the
> data source.
> Preview complete -- 0 errors, 3 warnings
> Now, I created the4 datasets, the parameter for each is simply 1, 2, 3 and
> 4. The report, or the query, is not auto-generating my other fields as it
> did for three that I do see. The 'Futures_Volume' is one of the fields
> that
> was auto-generated for me, and it is in the 1st dataset. Is it that I
> just
> need to manually add in the other fields? Please do let me know what you
> think.
> and thank you, bruce, for helping me through this. i truly do appreciate
> it. i know i am close...and i got the other reports for my server jobs
> and
> one of the other company reports to work. it's just these multi-resultset
> reports are fighting me.
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Query parameters and report parameters seem to be the same thing but they
>> are not. RS automatically creates a report parameter for each query
>> parameter but instead you can map the query parameter to a constant.
>> Click
>> on the ... for the dataset, go to the parameters tab. On the right you
>> will
>> see it mapping to the report parameter, click on that and select
>> expression.
>> In expression put = 1 (assuming it is an integert expression) for the
>> first
>> dataset, =2 etc. Then go to report layout, report menu-> report
>> parameters
>> and then delete the report parameters created for you.
>> You are very very close to the solution.
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
>> > last one for a while, bruce, i promise. i've got all 4 datasets in
>> > there,
>> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting my
>> > 'whole
>> > report' in four small subsets of data. how do i get this to happen on
>> > the
>> > report page automatically without needing user input?
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Are you going against SQL Server?
>> >>
>> >> If so, then just select tored procedure for the command type and just
>> >> put
>> >> in
>> >> the name of the stored procedure. Do not put exec in from of it or
>> >> anything
>> >> else. It should detect the parameter and prompt you for it. It should
>> >> also
>> >> create a report parameter as well for you.
>> >>
>> >> Try creating a new dataset and do this from the start. If you continue
>> >> to
>> >> have problems create a new stored procedure just for testing .
>> >>
>> >> create procedure dbo.testproc
>> >> @.PARAM1 int
>> >> as
>> >> select 'Parameter passed in = ' + @.PARAM1 as Message
>> >> return
>> >>
>> >> Get the above procedure to work for you so you know how to call a
>> >> stored
>> >> procedure they way I am telling you (do not use exec).
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
>> >> > i'm sorry, bruce, but where do i define the parameters? rs is not
>> >> > detecting
>> >> > them. in my 1st dataset i've got cmd type stored procedure and the
>> >> > proc
>> >> > name
>> >> > is in the query string. i assumed i would put the 1st parameter in
>> >> > on
>> >> > the
>> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
>> >> > datasets,
>> >> > so
>> >> > i
>> >> > gave it @.ch and the value of 1, but when i attempted to run it, it
>> >> > threw
>> >> > me a
>> >> > 'define query parameters box asking me to put the '1' in it.
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> If you are going against SQL Server do not run your stored
>> >> >> procedure
>> >> >> this
>> >> >> way. Pick command type of stored procedure. RS will detect the
>> >> >> parameters.
>> >> >> If going against ODBC or OLEDB driver (which uses ? format for
>> >> >> parameters)
>> >> >> then pick text as the command type and do this:
>> >> >> myproc ?
>> >> >>
>> >> >> Create multiple datasets and for each one you should call the
>> >> >> stored
>> >> >> procedure for each one.
>> >> >>
>> >> >> Bruce Loehle-Conger
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
>> >> >> > parameters,
>> >> >> > it
>> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
>> >> >> > results,
>> >> >> > works
>> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit
>> >> >> > RUN
>> >> >> > in
>> >> >> > Data
>> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
>> >> >> > designer
>> >> >> > does
>> >> >> > not graphically support the EXEC SQL Construct' but, i hit
>> >> >> > 'OK'
>> >> >> > and
>> >> >> > my
>> >> >> > results are still returned to me. On 'Preview' tab, however, I
>> >> >> > get
>> >> >> > no
>> >> >> > data/results at all.
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> Yes, you are calling it three times. In RS you create three
>> >> >> >> datasets.
>> >> >> >> Go
>> >> >> >> to
>> >> >> >> the dataset tab and there is a combo box with the name of the
>> >> >> >> dataset,
>> >> >> >> you
>> >> >> >> can click on that and there is a an option for a new.
>> >> >> >>
>> >> >> >> In your stored procedure
>> >> >> >>
>> >> >> >> if @.WHICHRESULTSET = 1
>> >> >> >> begin
>> >> >> >> --return the first resultset here
>> >> >> >> end
>> >> >> >> etc
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> >> >> >> > Bruce, or somebody else, might you give me an example of how
>> >> >> >> > to
>> >> >> >> > give
>> >> >> >> > the
>> >> >> >> > proc
>> >> >> >> > 3 parameters, producing three resultsets in a way that RS will
>> >> >> >> > display
>> >> >> >> > them?
>> >> >> >> > Or, am I giving it three parameters and calling it three
>> >> >> >> > times?
>> >> >> >> > If
>> >> >> >> > so,
>> >> >> >> > how
>> >> >> >> > would i call the 3 procs in RS?
>> >> >> >> > -- Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> Configure your existing stored procedure to accept a
>> >> >> >> >> parameter
>> >> >> >> >> (you
>> >> >> >> >> can
>> >> >> >> >> make
>> >> >> >> >> it optional so that it doesn't break existing code).
>> >> >> >> >>
>> >> >> >> >> Then call it three times in RS with a static value and create
>> >> >> >> >> three
>> >> >> >> >> datasets.
>> >> >> >> >> For instance dataset1
>> >> >> >> >> yourproc 1
>> >> >> >> >>
>> >> >> >> >> Dataset2
>> >> >> >> >> yourproc 2
>> >> >> >> >>
>> >> >> >> >> etc.
>> >> >> >> >>
>> >> >> >> >> Then in your stored procedure return the appropriate
>> >> >> >> >> resultset
>> >> >> >> >> based
>> >> >> >> >> on
>> >> >> >> >> the
>> >> >> >> >> parameter.
>> >> >> >> >>
>> >> >> >> >> Downside is that your sp is being run three times.
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> >> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little
>> >> >> >> >> > more,
>> >> >> >> >> > please,
>> >> >> >> >> > on
>> >> >> >> >> > the second, possibly third procedure?
>> >> >> >> >> > -- Lynn
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> This is three resultsets. RS does not have the ability to
>> >> >> >> >> >> handle
>> >> >> >> >> >> that.
>> >> >> >> >> >> There
>> >> >> >> >> >> is no work around from RS side. You could create another
>> >> >> >> >> >> stored
>> >> >> >> >> >> procedure
>> >> >> >> >> >> that calls this one and have it return just one of the
>> >> >> >> >> >> resultsets.
>> >> >> >> >> >>
>> >> >> >> >> >> RS can deal with multiple datasets quite well, but each
>> >> >> >> >> >> stored
>> >> >> >> >> >> procedure
>> >> >> >> >> >> call can only return one.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> >>
>> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> >> >> >> >> > oh, bruce, that is great. I can't believe it was as
>> >> >> >> >> >> > simple
>> >> >> >> >> >> > as
>> >> >> >> >> >> > that.
>> >> >> >> >> >> > one
>> >> >> >> >> >> > remaining problem, though. one of my reports is like
>> >> >> >> >> >> > this:
>> >> >> >> >> >> >
>> >> >> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> >> >> > -- -- -- --
>> >> >> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> >> >> > 33,333,333,333.33
>> >> >> >> >> >> >
>> >> >> >> >> >> > #Stocks Volume Total $
>> >> >> >> >> >> > -- -- --
>> >> >> >> >> >> > 333,333 33,333,333 3,333,333,333.33
>> >> >> >> >> >> >
>> >> >> >> >> >> > EndPoint Liquidity #Trades Volume
>> >> >> >> >> >> > Total $
>> >> >> >> >> >> > -- -- -- -- --
>> >> >> >> >> >> > AAAA Add 114,729 21,797,575
>> >> >> >> >> >> > 583,102,631.33
>> >> >> >> >> >> > AAAA Opening 1 27
>> >> >> >> >> >> > 3,412.53
>> >> >> >> >> >> > AAAA Remove 30,836 8,330,843
>> >> >> >> >> >> > 444,521,928.10
>> >> >> >> >> >> > AAAA Route 41 4,543
>> >> >> >> >> >> > 103,291.31
>> >> >> >> >> >> > BBBB Add 26,997 9,940,201
>> >> >> >> >> >> > 178,600,674.78
>> >> >> >> >> >> > BBBB Opening 8,089 1,448,143
>> >> >> >> >> >> > 44,276,419.41
>> >> >> >> >> >> > BBBB Remove 3,406 1,719,403
>> >> >> >> >> >> > 40,267,318.25
>> >> >> >> >> >> > CCCC Add 83,781 22,443,732
>> >> >> >> >> >> > 746,570,071.43
>> >> >> >> >> >> > CCCC Remove 35,756 12,250,359
>> >> >> >> >> >> > 483,329,796.97
>> >> >> >> >> >> > CCCC Route 1,088 244,697
>> >> >> >> >> >> > 6,655,913.26
>> >> >> >> >> >> > DDDD Route 2 62,500
>> >> >> >> >> >> > 2,539,375.00
>> >> >> >> >> >> > DDDD Add 2,354 1,262,589
>> >> >> >> >> >> > 19,136,233.44
>> >> >> >> >> >> > DDDD Remove 258 195,019
>> >> >> >> >> >> > 6,227,451.69
>> >> >> >> >> >> >
>> >> >> >> >> >> > I only receive the top line in the resultset:
>> >> >> >> >> >> >
>> >> >> >> >> >> > Date Total Trades Symbols Traded Total $
>> >> >> >> >> >> > -- -- -- --
>> >> >> >> >> >> > 02/07/2006 333,333 333
>> >> >> >> >> >> > 33,333,333,333.33
>> >> >> >> >> >> >
>> >> >> >> >> >> > I assume this is what you mean when you say it will only
>> >> >> >> >> >> > handle
>> >> >> >> >> >> > the
>> >> >> >> >> >> > 1st
>> >> >> >> >> >> > resultset. All of my reports have multiple 'chunks' in
>> >> >> >> >> >> > the
>> >> >> >> >> >> > body.
>> >> >> >> >> >> > Do
>> >> >> >> >> >> > you
>> >> >> >> >> >> > have any idea how I can achieve this report via
>> >> >> >> >> >> > reporting
>> >> >> >> >> >> > svcs?
>> >> >> >> >> >> > Unfortunately, this is very important. Please do
>> >> >> >> >> >> > advise.
>> >> >> >> >> >> >
>> >> >> >> >> >> > --Lynn
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >> >
>> >> >> >> >> >> >> Pick the command type as stored procedure and then just
>> >> >> >> >> >> >> enter
>> >> >> >> >> >> >> the
>> >> >> >> >> >> >> name
>> >> >> >> >> >> >> of
>> >> >> >> >> >> >> the stored procedure. When you click on the ! you
>> >> >> >> >> >> >> should
>> >> >> >> >> >> >> get
>> >> >> >> >> >> >> back|||Bruce, every time I refresh the fields, it pops the 1st three back in the
list. They're the first three in the report, and i guess they're the only
ones in that first resultset. So, I go into dataset 2, 3 and 4, all the same
3 fields are listed. i remove them per dataset, hit refresh, and the same 3
come back.
-- Lynn
"Bruce L-C [MVP]" wrote:
> For each of your datasets make sure there is a field list. Sometimes you
> have to click on the refresh fields button (to the right of the ...).
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> > oh my goodness this is frustrating me....i did what you said, bruce, and
> > it
> > almost worked. the preview report shows me three values which correspond,
> > i
> > believe, to the only three fields in my report. see, they're all
> > calculated
> > fields. the output of the rpt is this:
> >
> > Build complete -- 0 errors, 0 warnings
> > The data set 'DataSet3' contains a definition for the field
> > 'Futures_Volume'. This field is missing from the returned result set from
> > the
> > data source.
> > The data set 'DataSet4' contains a definition for the field
> > 'Futures_Volume'. This field is missing from the returned result set from
> > the
> > data source.
> > The data set 'DataSet2' contains a definition for the field
> > 'Futures_Volume'. This field is missing from the returned result set from
> > the
> > data source.
> > Preview complete -- 0 errors, 3 warnings
> >
> > Now, I created the4 datasets, the parameter for each is simply 1, 2, 3 and
> > 4. The report, or the query, is not auto-generating my other fields as it
> > did for three that I do see. The 'Futures_Volume' is one of the fields
> > that
> > was auto-generated for me, and it is in the 1st dataset. Is it that I
> > just
> > need to manually add in the other fields? Please do let me know what you
> > think.
> >
> > and thank you, bruce, for helping me through this. i truly do appreciate
> > it. i know i am close...and i got the other reports for my server jobs
> > and
> > one of the other company reports to work. it's just these multi-resultset
> > reports are fighting me.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Query parameters and report parameters seem to be the same thing but they
> >> are not. RS automatically creates a report parameter for each query
> >> parameter but instead you can map the query parameter to a constant.
> >> Click
> >> on the ... for the dataset, go to the parameters tab. On the right you
> >> will
> >> see it mapping to the report parameter, click on that and select
> >> expression.
> >> In expression put = 1 (assuming it is an integert expression) for the
> >> first
> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> parameters
> >> and then delete the report parameters created for you.
> >>
> >> You are very very close to the solution.
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> > last one for a while, bruce, i promise. i've got all 4 datasets in
> >> > there,
> >> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting my
> >> > 'whole
> >> > report' in four small subsets of data. how do i get this to happen on
> >> > the
> >> > report page automatically without needing user input?
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Are you going against SQL Server?
> >> >>
> >> >> If so, then just select tored procedure for the command type and just
> >> >> put
> >> >> in
> >> >> the name of the stored procedure. Do not put exec in from of it or
> >> >> anything
> >> >> else. It should detect the parameter and prompt you for it. It should
> >> >> also
> >> >> create a report parameter as well for you.
> >> >>
> >> >> Try creating a new dataset and do this from the start. If you continue
> >> >> to
> >> >> have problems create a new stored procedure just for testing .
> >> >>
> >> >> create procedure dbo.testproc
> >> >> @.PARAM1 int
> >> >> as
> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> return
> >> >>
> >> >> Get the above procedure to work for you so you know how to call a
> >> >> stored
> >> >> procedure they way I am telling you (do not use exec).
> >> >>
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is not
> >> >> > detecting
> >> >> > them. in my 1st dataset i've got cmd type stored procedure and the
> >> >> > proc
> >> >> > name
> >> >> > is in the query string. i assumed i would put the 1st parameter in
> >> >> > on
> >> >> > the
> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> > datasets,
> >> >> > so
> >> >> > i
> >> >> > gave it @.ch and the value of 1, but when i attempted to run it, it
> >> >> > threw
> >> >> > me a
> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> procedure
> >> >> >> this
> >> >> >> way. Pick command type of stored procedure. RS will detect the
> >> >> >> parameters.
> >> >> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> >> >> parameters)
> >> >> >> then pick text as the command type and do this:
> >> >> >> myproc ?
> >> >> >>
> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> stored
> >> >> >> procedure for each one.
> >> >> >>
> >> >> >> Bruce Loehle-Conger
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> >> >> > parameters,
> >> >> >> > it
> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
> >> >> >> > results,
> >> >> >> > works
> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit
> >> >> >> > RUN
> >> >> >> > in
> >> >> >> > Data
> >> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
> >> >> >> > designer
> >> >> >> > does
> >> >> >> > not graphically support the EXEC SQL Construct' but, i hit
> >> >> >> > 'OK'
> >> >> >> > and
> >> >> >> > my
> >> >> >> > results are still returned to me. On 'Preview' tab, however, I
> >> >> >> > get
> >> >> >> > no
> >> >> >> > data/results at all.
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Yes, you are calling it three times. In RS you create three
> >> >> >> >> datasets.
> >> >> >> >> Go
> >> >> >> >> to
> >> >> >> >> the dataset tab and there is a combo box with the name of the
> >> >> >> >> dataset,
> >> >> >> >> you
> >> >> >> >> can click on that and there is a an option for a new.
> >> >> >> >>
> >> >> >> >> In your stored procedure
> >> >> >> >>
> >> >> >> >> if @.WHICHRESULTSET = 1
> >> >> >> >> begin
> >> >> >> >> --return the first resultset here
> >> >> >> >> end
> >> >> >> >> etc
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> >> >> > Bruce, or somebody else, might you give me an example of how
> >> >> >> >> > to
> >> >> >> >> > give
> >> >> >> >> > the
> >> >> >> >> > proc
> >> >> >> >> > 3 parameters, producing three resultsets in a way that RS will
> >> >> >> >> > display
> >> >> >> >> > them?
> >> >> >> >> > Or, am I giving it three parameters and calling it three
> >> >> >> >> > times?
> >> >> >> >> > If
> >> >> >> >> > so,
> >> >> >> >> > how
> >> >> >> >> > would i call the 3 procs in RS?
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Configure your existing stored procedure to accept a
> >> >> >> >> >> parameter
> >> >> >> >> >> (you
> >> >> >> >> >> can
> >> >> >> >> >> make
> >> >> >> >> >> it optional so that it doesn't break existing code).
> >> >> >> >> >>
> >> >> >> >> >> Then call it three times in RS with a static value and create
> >> >> >> >> >> three
> >> >> >> >> >> datasets.
> >> >> >> >> >> For instance dataset1
> >> >> >> >> >> yourproc 1
> >> >> >> >> >>
> >> >> >> >> >> Dataset2
> >> >> >> >> >> yourproc 2
> >> >> >> >> >>
> >> >> >> >> >> etc.
> >> >> >> >> >>
> >> >> >> >> >> Then in your stored procedure return the appropriate
> >> >> >> >> >> resultset
> >> >> >> >> >> based
> >> >> >> >> >> on
> >> >> >> >> >> the
> >> >> >> >> >> parameter.
> >> >> >> >> >>
> >> >> >> >> >> Downside is that your sp is being run three times.
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
> >> >> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a little
> >> >> >> >> >> > more,
> >> >> >> >> >> > please,
> >> >> >> >> >> > on
> >> >> >> >> >> > the second, possibly third procedure?
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> This is three resultsets. RS does not have the ability to
> >> >> >> >> >> >> handle
> >> >> >> >> >> >> that.
> >> >> >> >> >> >> There
> >> >> >> >> >> >> is no work around from RS side. You could create another
> >> >> >> >> >> >> stored
> >> >> >> >> >> >> procedure
> >> >> >> >> >> >> that calls this one and have it return just one of the
> >> >> >> >> >> >> resultsets.
> >> >> >> >> >> >>
> >> >> >> >> >> >> RS can deal with multiple datasets quite well, but each
> >> >> >> >> >> >> stored
> >> >> >> >> >> >> procedure
> >> >> >> >> >> >> call can only return one.
> >> >> >> >> >> >>
> >> >> >> >> >> >>
> >> >> >> >> >> >> --
> >> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >> >>
> >> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
> >> >> >> >> >> >> > oh, bruce, that is great. I can't believe it was as
> >> >> >> >> >> >> > simple
> >> >> >> >> >> >> > as
> >> >> >> >> >> >> > that.
> >> >> >> >> >> >> > one
> >> >> >> >> >> >> > remaining problem, though. one of my reports is like|||Ok, what is happening is that it is detecting the first resultset. What you
can do it is add the fields manually. In the field list add a new field and
name it correctly for what will be coming back. (Right mouse click in the
field list).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> Bruce, every time I refresh the fields, it pops the 1st three back in the
> list. They're the first three in the report, and i guess they're the only
> ones in that first resultset. So, I go into dataset 2, 3 and 4, all the
> same
> 3 fields are listed. i remove them per dataset, hit refresh, and the same
> 3
> come back.
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> For each of your datasets make sure there is a field list. Sometimes you
>> have to click on the refresh fields button (to the right of the ...).
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
>> > oh my goodness this is frustrating me....i did what you said, bruce,
>> > and
>> > it
>> > almost worked. the preview report shows me three values which
>> > correspond,
>> > i
>> > believe, to the only three fields in my report. see, they're all
>> > calculated
>> > fields. the output of the rpt is this:
>> >
>> > Build complete -- 0 errors, 0 warnings
>> > The data set 'DataSet3' contains a definition for the field
>> > 'Futures_Volume'. This field is missing from the returned result set
>> > from
>> > the
>> > data source.
>> > The data set 'DataSet4' contains a definition for the field
>> > 'Futures_Volume'. This field is missing from the returned result set
>> > from
>> > the
>> > data source.
>> > The data set 'DataSet2' contains a definition for the field
>> > 'Futures_Volume'. This field is missing from the returned result set
>> > from
>> > the
>> > data source.
>> > Preview complete -- 0 errors, 3 warnings
>> >
>> > Now, I created the4 datasets, the parameter for each is simply 1, 2, 3
>> > and
>> > 4. The report, or the query, is not auto-generating my other fields as
>> > it
>> > did for three that I do see. The 'Futures_Volume' is one of the fields
>> > that
>> > was auto-generated for me, and it is in the 1st dataset. Is it that I
>> > just
>> > need to manually add in the other fields? Please do let me know what
>> > you
>> > think.
>> >
>> > and thank you, bruce, for helping me through this. i truly do
>> > appreciate
>> > it. i know i am close...and i got the other reports for my server jobs
>> > and
>> > one of the other company reports to work. it's just these
>> > multi-resultset
>> > reports are fighting me.
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Query parameters and report parameters seem to be the same thing but
>> >> they
>> >> are not. RS automatically creates a report parameter for each query
>> >> parameter but instead you can map the query parameter to a constant.
>> >> Click
>> >> on the ... for the dataset, go to the parameters tab. On the right you
>> >> will
>> >> see it mapping to the report parameter, click on that and select
>> >> expression.
>> >> In expression put = 1 (assuming it is an integert expression) for the
>> >> first
>> >> dataset, =2 etc. Then go to report layout, report menu-> report
>> >> parameters
>> >> and then delete the report parameters created for you.
>> >>
>> >> You are very very close to the solution.
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
>> >> > last one for a while, bruce, i promise. i've got all 4 datasets in
>> >> > there,
>> >> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting
>> >> > my
>> >> > 'whole
>> >> > report' in four small subsets of data. how do i get this to happen
>> >> > on
>> >> > the
>> >> > report page automatically without needing user input?
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> Are you going against SQL Server?
>> >> >>
>> >> >> If so, then just select tored procedure for the command type and
>> >> >> just
>> >> >> put
>> >> >> in
>> >> >> the name of the stored procedure. Do not put exec in from of it or
>> >> >> anything
>> >> >> else. It should detect the parameter and prompt you for it. It
>> >> >> should
>> >> >> also
>> >> >> create a report parameter as well for you.
>> >> >>
>> >> >> Try creating a new dataset and do this from the start. If you
>> >> >> continue
>> >> >> to
>> >> >> have problems create a new stored procedure just for testing .
>> >> >>
>> >> >> create procedure dbo.testproc
>> >> >> @.PARAM1 int
>> >> >> as
>> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
>> >> >> return
>> >> >>
>> >> >> Get the above procedure to work for you so you know how to call a
>> >> >> stored
>> >> >> procedure they way I am telling you (do not use exec).
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
>> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
>> >> >> > not
>> >> >> > detecting
>> >> >> > them. in my 1st dataset i've got cmd type stored procedure and
>> >> >> > the
>> >> >> > proc
>> >> >> > name
>> >> >> > is in the query string. i assumed i would put the 1st parameter
>> >> >> > in
>> >> >> > on
>> >> >> > the
>> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
>> >> >> > datasets,
>> >> >> > so
>> >> >> > i
>> >> >> > gave it @.ch and the value of 1, but when i attempted to run it,
>> >> >> > it
>> >> >> > threw
>> >> >> > me a
>> >> >> > 'define query parameters box asking me to put the '1' in it.
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> If you are going against SQL Server do not run your stored
>> >> >> >> procedure
>> >> >> >> this
>> >> >> >> way. Pick command type of stored procedure. RS will detect the
>> >> >> >> parameters.
>> >> >> >> If going against ODBC or OLEDB driver (which uses ? format for
>> >> >> >> parameters)
>> >> >> >> then pick text as the command type and do this:
>> >> >> >> myproc ?
>> >> >> >>
>> >> >> >> Create multiple datasets and for each one you should call the
>> >> >> >> stored
>> >> >> >> procedure for each one.
>> >> >> >>
>> >> >> >> Bruce Loehle-Conger
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
>> >> >> >> > parameters,
>> >> >> >> > it
>> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
>> >> >> >> > results,
>> >> >> >> > works
>> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit
>> >> >> >> > RUN
>> >> >> >> > in
>> >> >> >> > Data
>> >> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
>> >> >> >> > designer
>> >> >> >> > does
>> >> >> >> > not graphically support the EXEC SQL Construct' but, i hit
>> >> >> >> > 'OK'
>> >> >> >> > and
>> >> >> >> > my
>> >> >> >> > results are still returned to me. On 'Preview' tab, however,
>> >> >> >> > I
>> >> >> >> > get
>> >> >> >> > no
>> >> >> >> > data/results at all.
>> >> >> >> > -- Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> Yes, you are calling it three times. In RS you create three
>> >> >> >> >> datasets.
>> >> >> >> >> Go
>> >> >> >> >> to
>> >> >> >> >> the dataset tab and there is a combo box with the name of the
>> >> >> >> >> dataset,
>> >> >> >> >> you
>> >> >> >> >> can click on that and there is a an option for a new.
>> >> >> >> >>
>> >> >> >> >> In your stored procedure
>> >> >> >> >>
>> >> >> >> >> if @.WHICHRESULTSET = 1
>> >> >> >> >> begin
>> >> >> >> >> --return the first resultset here
>> >> >> >> >> end
>> >> >> >> >> etc
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> >> >> >> >> > Bruce, or somebody else, might you give me an example of
>> >> >> >> >> > how
>> >> >> >> >> > to
>> >> >> >> >> > give
>> >> >> >> >> > the
>> >> >> >> >> > proc
>> >> >> >> >> > 3 parameters, producing three resultsets in a way that RS
>> >> >> >> >> > will
>> >> >> >> >> > display
>> >> >> >> >> > them?
>> >> >> >> >> > Or, am I giving it three parameters and calling it three
>> >> >> >> >> > times?
>> >> >> >> >> > If
>> >> >> >> >> > so,
>> >> >> >> >> > how
>> >> >> >> >> > would i call the 3 procs in RS?
>> >> >> >> >> > -- Lynn
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> Configure your existing stored procedure to accept a
>> >> >> >> >> >> parameter
>> >> >> >> >> >> (you
>> >> >> >> >> >> can
>> >> >> >> >> >> make
>> >> >> >> >> >> it optional so that it doesn't break existing code).
>> >> >> >> >> >>
>> >> >> >> >> >> Then call it three times in RS with a static value and
>> >> >> >> >> >> create
>> >> >> >> >> >> three
>> >> >> >> >> >> datasets.
>> >> >> >> >> >> For instance dataset1
>> >> >> >> >> >> yourproc 1
>> >> >> >> >> >>
>> >> >> >> >> >> Dataset2
>> >> >> >> >> >> yourproc 2
>> >> >> >> >> >>
>> >> >> >> >> >> etc.
>> >> >> >> >> >>
>> >> >> >> >> >> Then in your stored procedure return the appropriate
>> >> >> >> >> >> resultset
>> >> >> >> >> >> based
>> >> >> >> >> >> on
>> >> >> >> >> >> the
>> >> >> >> >> >> parameter.
>> >> >> >> >> >>
>> >> >> >> >> >> Downside is that your sp is being run three times.
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> >>
>> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> >> news:E8E34B6C-A36A-4576-BE8C-AB61866EEC80@.microsoft.com...
>> >> >> >> >> >> > Bruce, I'm not sure I follow. Can you elaborate a
>> >> >> >> >> >> > little
>> >> >> >> >> >> > more,
>> >> >> >> >> >> > please,
>> >> >> >> >> >> > on
>> >> >> >> >> >> > the second, possibly third procedure?
>> >> >> >> >> >> > -- Lynn
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >> >
>> >> >> >> >> >> >> This is three resultsets. RS does not have the ability
>> >> >> >> >> >> >> to
>> >> >> >> >> >> >> handle
>> >> >> >> >> >> >> that.
>> >> >> >> >> >> >> There
>> >> >> >> >> >> >> is no work around from RS side. You could create
>> >> >> >> >> >> >> another
>> >> >> >> >> >> >> stored
>> >> >> >> >> >> >> procedure
>> >> >> >> >> >> >> that calls this one and have it return just one of the
>> >> >> >> >> >> >> resultsets.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> RS can deal with multiple datasets quite well, but each
>> >> >> >> >> >> >> stored
>> >> >> >> >> >> >> procedure
>> >> >> >> >> >> >> call can only return one.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> --
>> >> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in
>> >> >> >> >> >> >> message
>> >> >> >> >> >> >> news:E1AFA910-1FF4-4DC8-A3F0-FC1EADE8DFD5@.microsoft.com...
>> >> >> >> >> >> >> > oh, bruce, that is great. I can't believe it was as
>> >> >> >> >> >> >> > simple
>> >> >> >> >> >> >> > as
>> >> >> >> >> >> >> > that.
>> >> >> >> >> >> >> > one
>> >> >> >> >> >> >> > remaining problem, though. one of my reports is like|||yep, i had tried this last week, but it failed w/ a cpl different errors. i
will try it again right now.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Ok, what is happening is that it is detecting the first resultset. What you
> can do it is add the fields manually. In the field list add a new field and
> name it correctly for what will be coming back. (Right mouse click in the
> field list).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> > Bruce, every time I refresh the fields, it pops the 1st three back in the
> > list. They're the first three in the report, and i guess they're the only
> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all the
> > same
> > 3 fields are listed. i remove them per dataset, hit refresh, and the same
> > 3
> > come back.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> For each of your datasets make sure there is a field list. Sometimes you
> >> have to click on the refresh fields button (to the right of the ...).
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> > oh my goodness this is frustrating me....i did what you said, bruce,
> >> > and
> >> > it
> >> > almost worked. the preview report shows me three values which
> >> > correspond,
> >> > i
> >> > believe, to the only three fields in my report. see, they're all
> >> > calculated
> >> > fields. the output of the rpt is this:
> >> >
> >> > Build complete -- 0 errors, 0 warnings
> >> > The data set 'DataSet3' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > The data set 'DataSet4' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > The data set 'DataSet2' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > Preview complete -- 0 errors, 3 warnings
> >> >
> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2, 3
> >> > and
> >> > 4. The report, or the query, is not auto-generating my other fields as
> >> > it
> >> > did for three that I do see. The 'Futures_Volume' is one of the fields
> >> > that
> >> > was auto-generated for me, and it is in the 1st dataset. Is it that I
> >> > just
> >> > need to manually add in the other fields? Please do let me know what
> >> > you
> >> > think.
> >> >
> >> > and thank you, bruce, for helping me through this. i truly do
> >> > appreciate
> >> > it. i know i am close...and i got the other reports for my server jobs
> >> > and
> >> > one of the other company reports to work. it's just these
> >> > multi-resultset
> >> > reports are fighting me.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Query parameters and report parameters seem to be the same thing but
> >> >> they
> >> >> are not. RS automatically creates a report parameter for each query
> >> >> parameter but instead you can map the query parameter to a constant.
> >> >> Click
> >> >> on the ... for the dataset, go to the parameters tab. On the right you
> >> >> will
> >> >> see it mapping to the report parameter, click on that and select
> >> >> expression.
> >> >> In expression put = 1 (assuming it is an integert expression) for the
> >> >> first
> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> parameters
> >> >> and then delete the report parameters created for you.
> >> >>
> >> >> You are very very close to the solution.
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets in
> >> >> > there,
> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting
> >> >> > my
> >> >> > 'whole
> >> >> > report' in four small subsets of data. how do i get this to happen
> >> >> > on
> >> >> > the
> >> >> > report page automatically without needing user input?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Are you going against SQL Server?
> >> >> >>
> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> just
> >> >> >> put
> >> >> >> in
> >> >> >> the name of the stored procedure. Do not put exec in from of it or
> >> >> >> anything
> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> should
> >> >> >> also
> >> >> >> create a report parameter as well for you.
> >> >> >>
> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> continue
> >> >> >> to
> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >>
> >> >> >> create procedure dbo.testproc
> >> >> >> @.PARAM1 int
> >> >> >> as
> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> return
> >> >> >>
> >> >> >> Get the above procedure to work for you so you know how to call a
> >> >> >> stored
> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> > not
> >> >> >> > detecting
> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure and
> >> >> >> > the
> >> >> >> > proc
> >> >> >> > name
> >> >> >> > is in the query string. i assumed i would put the 1st parameter
> >> >> >> > in
> >> >> >> > on
> >> >> >> > the
> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> > datasets,
> >> >> >> > so
> >> >> >> > i
> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run it,
> >> >> >> > it
> >> >> >> > threw
> >> >> >> > me a
> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> procedure
> >> >> >> >> this
> >> >> >> >> way. Pick command type of stored procedure. RS will detect the
> >> >> >> >> parameters.
> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> >> >> >> parameters)
> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> myproc ?
> >> >> >> >>
> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> stored
> >> >> >> >> procedure for each one.
> >> >> >> >>
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> >> >> >> > parameters,
> >> >> >> >> > it
> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
> >> >> >> >> > results,
> >> >> >> >> > works
> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit
> >> >> >> >> > RUN
> >> >> >> >> > in
> >> >> >> >> > Data
> >> >> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
> >> >> >> >> > designer
> >> >> >> >> > does
> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i hit
> >> >> >> >> > 'OK'
> >> >> >> >> > and
> >> >> >> >> > my
> >> >> >> >> > results are still returned to me. On 'Preview' tab, however,
> >> >> >> >> > I
> >> >> >> >> > get
> >> >> >> >> > no
> >> >> >> >> > data/results at all.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Yes, you are calling it three times. In RS you create three
> >> >> >> >> >> datasets.
> >> >> >> >> >> Go
> >> >> >> >> >> to
> >> >> >> >> >> the dataset tab and there is a combo box with the name of the
> >> >> >> >> >> dataset,
> >> >> >> >> >> you
> >> >> >> >> >> can click on that and there is a an option for a new.
> >> >> >> >> >>
> >> >> >> >> >> In your stored procedure
> >> >> >> >> >>
> >> >> >> >> >> if @.WHICHRESULTSET = 1
> >> >> >> >> >> begin
> >> >> >> >> >> --return the first resultset here
> >> >> >> >> >> end
> >> >> >> >> >> etc
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> >> >> >> > Bruce, or somebody else, might you give me an example of
> >> >> >> >> >> > how
> >> >> >> >> >> > to
> >> >> >> >> >> > give
> >> >> >> >> >> > the
> >> >> >> >> >> > proc
> >> >> >> >> >> > 3 parameters, producing three resultsets in a way that RS
> >> >> >> >> >> > will
> >> >> >> >> >> > display
> >> >> >> >> >> > them?
> >> >> >> >> >> > Or, am I giving it three parameters and calling it three
> >> >> >> >> >> > times?
> >> >> >> >> >> > If
> >> >> >> >> >> > so,
> >> >> >> >> >> > how
> >> >> >> >> >> > would i call the 3 procs in RS?
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Configure your existing stored procedure to accept a
> >> >> >> >> >> >> parameter
> >> >> >> >> >> >> (you
> >> >> >> >> >> >> can
> >> >> >> >> >> >> make
> >> >> >> >> >> >> it optional so that it doesn't break existing code).
> >> >> >> >> >> >>
> >> >> >> >> >> >> Then call it three times in RS with a static value and
> >> >> >> >> >> >> create
> >> >> >> >> >> >> three
> >> >> >> >> >> >> datasets.
> >> >> >> >> >> >> For instance dataset1
> >> >> >> >> >> >> yourproc 1
> >> >> >> >> >> >>
> >> >> >> >> >> >> Dataset2
> >> >> >> >> >> >> yourproc 2
> >> >> >> >> >> >>
> >> >> >> >> >> >> etc.
> >> >> >> >> >> >>
> >> >> >> >> >> >> Then in your stored procedure return the appropriate
> >> >> >> >> >> >> resultset
> >> >> >> >> >> >> based
> >> >> >> >> >> >> on
> >> >> >> >> >> >> the
> >> >> >> >> >> >> parameter.|||Bruce, i apologize, this is going on and on. I attempt to add the fields
in...just as they are in dataset1, except with new values, and it fails with
this:
'The properties for the currently selected item are not valid. Please
correct all errors before continuing.'
Now, all of these values are calculated...Volume (sum of another value), #
of Trades (count of another value), etc...but the same thing applies to
dataset 1, and those fields are listed as database fields, not calculated
fields. please can you tell me what the right way to do this is?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Ok, what is happening is that it is detecting the first resultset. What you
> can do it is add the fields manually. In the field list add a new field and
> name it correctly for what will be coming back. (Right mouse click in the
> field list).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> > Bruce, every time I refresh the fields, it pops the 1st three back in the
> > list. They're the first three in the report, and i guess they're the only
> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all the
> > same
> > 3 fields are listed. i remove them per dataset, hit refresh, and the same
> > 3
> > come back.
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> For each of your datasets make sure there is a field list. Sometimes you
> >> have to click on the refresh fields button (to the right of the ...).
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> > oh my goodness this is frustrating me....i did what you said, bruce,
> >> > and
> >> > it
> >> > almost worked. the preview report shows me three values which
> >> > correspond,
> >> > i
> >> > believe, to the only three fields in my report. see, they're all
> >> > calculated
> >> > fields. the output of the rpt is this:
> >> >
> >> > Build complete -- 0 errors, 0 warnings
> >> > The data set 'DataSet3' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > The data set 'DataSet4' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > The data set 'DataSet2' contains a definition for the field
> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> > from
> >> > the
> >> > data source.
> >> > Preview complete -- 0 errors, 3 warnings
> >> >
> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2, 3
> >> > and
> >> > 4. The report, or the query, is not auto-generating my other fields as
> >> > it
> >> > did for three that I do see. The 'Futures_Volume' is one of the fields
> >> > that
> >> > was auto-generated for me, and it is in the 1st dataset. Is it that I
> >> > just
> >> > need to manually add in the other fields? Please do let me know what
> >> > you
> >> > think.
> >> >
> >> > and thank you, bruce, for helping me through this. i truly do
> >> > appreciate
> >> > it. i know i am close...and i got the other reports for my server jobs
> >> > and
> >> > one of the other company reports to work. it's just these
> >> > multi-resultset
> >> > reports are fighting me.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> Query parameters and report parameters seem to be the same thing but
> >> >> they
> >> >> are not. RS automatically creates a report parameter for each query
> >> >> parameter but instead you can map the query parameter to a constant.
> >> >> Click
> >> >> on the ... for the dataset, go to the parameters tab. On the right you
> >> >> will
> >> >> see it mapping to the report parameter, click on that and select
> >> >> expression.
> >> >> In expression put = 1 (assuming it is an integert expression) for the
> >> >> first
> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> parameters
> >> >> and then delete the report parameters created for you.
> >> >>
> >> >> You are very very close to the solution.
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets in
> >> >> > there,
> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each, getting
> >> >> > my
> >> >> > 'whole
> >> >> > report' in four small subsets of data. how do i get this to happen
> >> >> > on
> >> >> > the
> >> >> > report page automatically without needing user input?
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Are you going against SQL Server?
> >> >> >>
> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> just
> >> >> >> put
> >> >> >> in
> >> >> >> the name of the stored procedure. Do not put exec in from of it or
> >> >> >> anything
> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> should
> >> >> >> also
> >> >> >> create a report parameter as well for you.
> >> >> >>
> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> continue
> >> >> >> to
> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >>
> >> >> >> create procedure dbo.testproc
> >> >> >> @.PARAM1 int
> >> >> >> as
> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> return
> >> >> >>
> >> >> >> Get the above procedure to work for you so you know how to call a
> >> >> >> stored
> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> > not
> >> >> >> > detecting
> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure and
> >> >> >> > the
> >> >> >> > proc
> >> >> >> > name
> >> >> >> > is in the query string. i assumed i would put the 1st parameter
> >> >> >> > in
> >> >> >> > on
> >> >> >> > the
> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> > datasets,
> >> >> >> > so
> >> >> >> > i
> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run it,
> >> >> >> > it
> >> >> >> > threw
> >> >> >> > me a
> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> procedure
> >> >> >> >> this
> >> >> >> >> way. Pick command type of stored procedure. RS will detect the
> >> >> >> >> parameters.
> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format for
> >> >> >> >> parameters)
> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> myproc ?
> >> >> >> >>
> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> stored
> >> >> >> >> procedure for each one.
> >> >> >> >>
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st one
> >> >> >> >> > parameters,
> >> >> >> >> > it
> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of the
> >> >> >> >> > results,
> >> >> >> >> > works
> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I hit
> >> >> >> >> > RUN
> >> >> >> >> > in
> >> >> >> >> > Data
> >> >> >> >> > tab it returns an error: SQL Syntax Errors Encountered...The
> >> >> >> >> > designer
> >> >> >> >> > does
> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i hit
> >> >> >> >> > 'OK'
> >> >> >> >> > and
> >> >> >> >> > my
> >> >> >> >> > results are still returned to me. On 'Preview' tab, however,
> >> >> >> >> > I
> >> >> >> >> > get
> >> >> >> >> > no
> >> >> >> >> > data/results at all.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> Yes, you are calling it three times. In RS you create three
> >> >> >> >> >> datasets.
> >> >> >> >> >> Go
> >> >> >> >> >> to
> >> >> >> >> >> the dataset tab and there is a combo box with the name of the
> >> >> >> >> >> dataset,
> >> >> >> >> >> you
> >> >> >> >> >> can click on that and there is a an option for a new.
> >> >> >> >> >>
> >> >> >> >> >> In your stored procedure
> >> >> >> >> >>
> >> >> >> >> >> if @.WHICHRESULTSET = 1
> >> >> >> >> >> begin
> >> >> >> >> >> --return the first resultset here
> >> >> >> >> >> end
> >> >> >> >> >> etc
> >> >> >> >> >>
> >> >> >> >> >>
> >> >> >> >> >> --
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
> >> >> >> >> >> > Bruce, or somebody else, might you give me an example of
> >> >> >> >> >> > how
> >> >> >> >> >> > to
> >> >> >> >> >> > give
> >> >> >> >> >> > the
> >> >> >> >> >> > proc
> >> >> >> >> >> > 3 parameters, producing three resultsets in a way that RS
> >> >> >> >> >> > will
> >> >> >> >> >> > display
> >> >> >> >> >> > them?
> >> >> >> >> >> > Or, am I giving it three parameters and calling it three
> >> >> >> >> >> > times?
> >> >> >> >> >> > If
> >> >> >> >> >> > so,
> >> >> >> >> >> > how
> >> >> >> >> >> > would i call the 3 procs in RS?
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Configure your existing stored procedure to accept a
> >> >> >> >> >> >> parameter
> >> >> >> >> >> >> (you
> >> >> >> >> >> >> can
> >> >> >> >> >> >> make
> >> >> >> >> >> >> it optional so that it doesn't break existing code).
> >> >> >> >> >> >>
> >> >> >> >> >> >> Then call it three times in RS with a static value and
> >> >> >> >> >> >> create
> >> >> >> >> >> >> three
> >> >> >> >> >> >> datasets.
> >> >> >> >> >> >> For instance dataset1
> >> >> >> >> >> >> yourproc 1
> >> >> >> >> >> >>
> >> >> >> >> >> >> Dataset2
> >> >> >> >> >> >> yourproc 2
> >> >> >> >> >> >>
> >> >> >> >> >> >> etc.
> >> >> >> >> >> >>
> >> >> >> >> >> >> Then in your stored procedure return the appropriate
> >> >> >> >> >> >> resultset
> >> >> >> >> >> >> based
> >> >> >> >> >> >> on
> >> >> >> >> >> >> the
> >> >> >> >> >> >> parameter.|||Just because they are calculated in the stored procedure does not mean they
are calculated when you manually add them to the field list. You put the
name same as the name of the field being returned and mark them as database
field. If you name them appropriately and say they are are database fields
it will work.
So, let's say you are in dataset2 which is called the stored procedure with
a parameter value of 2. When you click the execute the data comes back. Plus
you can see the name of the fields in the dataset (but not in the field
list). Add then appropriate field names to the field list.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
> Bruce, i apologize, this is going on and on. I attempt to add the fields
> in...just as they are in dataset1, except with new values, and it fails
> with
> this:
> 'The properties for the currently selected item are not valid. Please
> correct all errors before continuing.'
> Now, all of these values are calculated...Volume (sum of another value), #
> of Trades (count of another value), etc...but the same thing applies to
> dataset 1, and those fields are listed as database fields, not calculated
> fields. please can you tell me what the right way to do this is?
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Ok, what is happening is that it is detecting the first resultset. What
>> you
>> can do it is add the fields manually. In the field list add a new field
>> and
>> name it correctly for what will be coming back. (Right mouse click in the
>> field list).
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
>> > Bruce, every time I refresh the fields, it pops the 1st three back in
>> > the
>> > list. They're the first three in the report, and i guess they're the
>> > only
>> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
>> > the
>> > same
>> > 3 fields are listed. i remove them per dataset, hit refresh, and the
>> > same
>> > 3
>> > come back.
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> For each of your datasets make sure there is a field list. Sometimes
>> >> you
>> >> have to click on the refresh fields button (to the right of the ...).
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
>> >> > oh my goodness this is frustrating me....i did what you said,
>> >> > bruce,
>> >> > and
>> >> > it
>> >> > almost worked. the preview report shows me three values which
>> >> > correspond,
>> >> > i
>> >> > believe, to the only three fields in my report. see, they're all
>> >> > calculated
>> >> > fields. the output of the rpt is this:
>> >> >
>> >> > Build complete -- 0 errors, 0 warnings
>> >> > The data set 'DataSet3' contains a definition for the field
>> >> > 'Futures_Volume'. This field is missing from the returned result set
>> >> > from
>> >> > the
>> >> > data source.
>> >> > The data set 'DataSet4' contains a definition for the field
>> >> > 'Futures_Volume'. This field is missing from the returned result set
>> >> > from
>> >> > the
>> >> > data source.
>> >> > The data set 'DataSet2' contains a definition for the field
>> >> > 'Futures_Volume'. This field is missing from the returned result set
>> >> > from
>> >> > the
>> >> > data source.
>> >> > Preview complete -- 0 errors, 3 warnings
>> >> >
>> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2,
>> >> > 3
>> >> > and
>> >> > 4. The report, or the query, is not auto-generating my other fields
>> >> > as
>> >> > it
>> >> > did for three that I do see. The 'Futures_Volume' is one of the
>> >> > fields
>> >> > that
>> >> > was auto-generated for me, and it is in the 1st dataset. Is it that
>> >> > I
>> >> > just
>> >> > need to manually add in the other fields? Please do let me know
>> >> > what
>> >> > you
>> >> > think.
>> >> >
>> >> > and thank you, bruce, for helping me through this. i truly do
>> >> > appreciate
>> >> > it. i know i am close...and i got the other reports for my server
>> >> > jobs
>> >> > and
>> >> > one of the other company reports to work. it's just these
>> >> > multi-resultset
>> >> > reports are fighting me.
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> Query parameters and report parameters seem to be the same thing
>> >> >> but
>> >> >> they
>> >> >> are not. RS automatically creates a report parameter for each query
>> >> >> parameter but instead you can map the query parameter to a
>> >> >> constant.
>> >> >> Click
>> >> >> on the ... for the dataset, go to the parameters tab. On the right
>> >> >> you
>> >> >> will
>> >> >> see it mapping to the report parameter, click on that and select
>> >> >> expression.
>> >> >> In expression put = 1 (assuming it is an integert expression) for
>> >> >> the
>> >> >> first
>> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
>> >> >> parameters
>> >> >> and then delete the report parameters created for you.
>> >> >>
>> >> >> You are very very close to the solution.
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
>> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets
>> >> >> > in
>> >> >> > there,
>> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
>> >> >> > getting
>> >> >> > my
>> >> >> > 'whole
>> >> >> > report' in four small subsets of data. how do i get this to
>> >> >> > happen
>> >> >> > on
>> >> >> > the
>> >> >> > report page automatically without needing user input?
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> Are you going against SQL Server?
>> >> >> >>
>> >> >> >> If so, then just select tored procedure for the command type and
>> >> >> >> just
>> >> >> >> put
>> >> >> >> in
>> >> >> >> the name of the stored procedure. Do not put exec in from of it
>> >> >> >> or
>> >> >> >> anything
>> >> >> >> else. It should detect the parameter and prompt you for it. It
>> >> >> >> should
>> >> >> >> also
>> >> >> >> create a report parameter as well for you.
>> >> >> >>
>> >> >> >> Try creating a new dataset and do this from the start. If you
>> >> >> >> continue
>> >> >> >> to
>> >> >> >> have problems create a new stored procedure just for testing .
>> >> >> >>
>> >> >> >> create procedure dbo.testproc
>> >> >> >> @.PARAM1 int
>> >> >> >> as
>> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
>> >> >> >> return
>> >> >> >>
>> >> >> >> Get the above procedure to work for you so you know how to call
>> >> >> >> a
>> >> >> >> stored
>> >> >> >> procedure they way I am telling you (do not use exec).
>> >> >> >>
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
>> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
>> >> >> >> > not
>> >> >> >> > detecting
>> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
>> >> >> >> > and
>> >> >> >> > the
>> >> >> >> > proc
>> >> >> >> > name
>> >> >> >> > is in the query string. i assumed i would put the 1st
>> >> >> >> > parameter
>> >> >> >> > in
>> >> >> >> > on
>> >> >> >> > the
>> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
>> >> >> >> > datasets,
>> >> >> >> > so
>> >> >> >> > i
>> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
>> >> >> >> > it,
>> >> >> >> > it
>> >> >> >> > threw
>> >> >> >> > me a
>> >> >> >> > 'define query parameters box asking me to put the '1' in it.
>> >> >> >> > -- Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> If you are going against SQL Server do not run your stored
>> >> >> >> >> procedure
>> >> >> >> >> this
>> >> >> >> >> way. Pick command type of stored procedure. RS will detect
>> >> >> >> >> the
>> >> >> >> >> parameters.
>> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
>> >> >> >> >> for
>> >> >> >> >> parameters)
>> >> >> >> >> then pick text as the command type and do this:
>> >> >> >> >> myproc ?
>> >> >> >> >>
>> >> >> >> >> Create multiple datasets and for each one you should call the
>> >> >> >> >> stored
>> >> >> >> >> procedure for each one.
>> >> >> >> >>
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
>> >> >> >> >> > one
>> >> >> >> >> > parameters,
>> >> >> >> >> > it
>> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
>> >> >> >> >> > the
>> >> >> >> >> > results,
>> >> >> >> >> > works
>> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I
>> >> >> >> >> > hit
>> >> >> >> >> > RUN
>> >> >> >> >> > in
>> >> >> >> >> > Data
>> >> >> >> >> > tab it returns an error: SQL Syntax Errors
>> >> >> >> >> > Encountered...The
>> >> >> >> >> > designer
>> >> >> >> >> > does
>> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i
>> >> >> >> >> > hit
>> >> >> >> >> > 'OK'
>> >> >> >> >> > and
>> >> >> >> >> > my
>> >> >> >> >> > results are still returned to me. On 'Preview' tab,
>> >> >> >> >> > however,
>> >> >> >> >> > I
>> >> >> >> >> > get
>> >> >> >> >> > no
>> >> >> >> >> > data/results at all.
>> >> >> >> >> > -- Lynn
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> Yes, you are calling it three times. In RS you create
>> >> >> >> >> >> three
>> >> >> >> >> >> datasets.
>> >> >> >> >> >> Go
>> >> >> >> >> >> to
>> >> >> >> >> >> the dataset tab and there is a combo box with the name of
>> >> >> >> >> >> the
>> >> >> >> >> >> dataset,
>> >> >> >> >> >> you
>> >> >> >> >> >> can click on that and there is a an option for a new.
>> >> >> >> >> >>
>> >> >> >> >> >> In your stored procedure
>> >> >> >> >> >>
>> >> >> >> >> >> if @.WHICHRESULTSET = 1
>> >> >> >> >> >> begin
>> >> >> >> >> >> --return the first resultset here
>> >> >> >> >> >> end
>> >> >> >> >> >> etc
>> >> >> >> >> >>
>> >> >> >> >> >>
>> >> >> >> >> >> --
>> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> >>
>> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> >> news:81E3A442-6694-442D-B151-F083E4750ADB@.microsoft.com...
>> >> >> >> >> >> > Bruce, or somebody else, might you give me an example of
>> >> >> >> >> >> > how
>> >> >> >> >> >> > to
>> >> >> >> >> >> > give
>> >> >> >> >> >> > the
>> >> >> >> >> >> > proc
>> >> >> >> >> >> > 3 parameters, producing three resultsets in a way that
>> >> >> >> >> >> > RS
>> >> >> >> >> >> > will
>> >> >> >> >> >> > display
>> >> >> >> >> >> > them?
>> >> >> >> >> >> > Or, am I giving it three parameters and calling it three
>> >> >> >> >> >> > times?
>> >> >> >> >> >> > If
>> >> >> >> >> >> > so,
>> >> >> >> >> >> > how
>> >> >> >> >> >> > would i call the 3 procs in RS?
>> >> >> >> >> >> > -- Lynn
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >> >
>> >> >> >> >> >> >> Configure your existing stored procedure to accept a
>> >> >> >> >> >> >> parameter
>> >> >> >> >> >> >> (you
>> >> >> >> >> >> >> can
>> >> >> >> >> >> >> make
>> >> >> >> >> >> >> it optional so that it doesn't break existing code).
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Then call it three times in RS with a static value and
>> >> >> >> >> >> >> create
>> >> >> >> >> >> >> three
>> >> >> >> >> >> >> datasets.
>> >> >> >> >> >> >> For instance dataset1
>> >> >> >> >> >> >> yourproc 1
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Dataset2
>> >> >> >> >> >> >> yourproc 2
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> etc.
>> >> >> >> >> >> >>
>> >> >> >> >> >> >> Then in your stored procedure return the appropriate
>> >> >> >> >> >> >> resultset
>> >> >> >> >> >> >> based
>> >> >> >> >> >> >> on
>> >> >> >> >> >> >> the
>> >> >> >> >> >> >> parameter.|||i'm sorry, bruce, possibly this is too burdensome for you. i'm just not
getting beyond this. i delete the fields, add the new ones, the thing runs
when i hit the run...but i hit refresh and the old fields come back, the new
ones i just added are gone. even if i save everything when they're
there...they just keep blowing out.
-- Lynn
"Bruce L-C [MVP]" wrote:
> Just because they are calculated in the stored procedure does not mean they
> are calculated when you manually add them to the field list. You put the
> name same as the name of the field being returned and mark them as database
> field. If you name them appropriately and say they are are database fields
> it will work.
> So, let's say you are in dataset2 which is called the stored procedure with
> a parameter value of 2. When you click the execute the data comes back. Plus
> you can see the name of the fields in the dataset (but not in the field
> list). Add then appropriate field names to the field list.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
> > Bruce, i apologize, this is going on and on. I attempt to add the fields
> > in...just as they are in dataset1, except with new values, and it fails
> > with
> > this:
> >
> > 'The properties for the currently selected item are not valid. Please
> > correct all errors before continuing.'
> >
> > Now, all of these values are calculated...Volume (sum of another value), #
> > of Trades (count of another value), etc...but the same thing applies to
> > dataset 1, and those fields are listed as database fields, not calculated
> > fields. please can you tell me what the right way to do this is?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Ok, what is happening is that it is detecting the first resultset. What
> >> you
> >> can do it is add the fields manually. In the field list add a new field
> >> and
> >> name it correctly for what will be coming back. (Right mouse click in the
> >> field list).
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> >> > Bruce, every time I refresh the fields, it pops the 1st three back in
> >> > the
> >> > list. They're the first three in the report, and i guess they're the
> >> > only
> >> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
> >> > the
> >> > same
> >> > 3 fields are listed. i remove them per dataset, hit refresh, and the
> >> > same
> >> > 3
> >> > come back.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> For each of your datasets make sure there is a field list. Sometimes
> >> >> you
> >> >> have to click on the refresh fields button (to the right of the ...).
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> >> > oh my goodness this is frustrating me....i did what you said,
> >> >> > bruce,
> >> >> > and
> >> >> > it
> >> >> > almost worked. the preview report shows me three values which
> >> >> > correspond,
> >> >> > i
> >> >> > believe, to the only three fields in my report. see, they're all
> >> >> > calculated
> >> >> > fields. the output of the rpt is this:
> >> >> >
> >> >> > Build complete -- 0 errors, 0 warnings
> >> >> > The data set 'DataSet3' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet4' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet2' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > Preview complete -- 0 errors, 3 warnings
> >> >> >
> >> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2,
> >> >> > 3
> >> >> > and
> >> >> > 4. The report, or the query, is not auto-generating my other fields
> >> >> > as
> >> >> > it
> >> >> > did for three that I do see. The 'Futures_Volume' is one of the
> >> >> > fields
> >> >> > that
> >> >> > was auto-generated for me, and it is in the 1st dataset. Is it that
> >> >> > I
> >> >> > just
> >> >> > need to manually add in the other fields? Please do let me know
> >> >> > what
> >> >> > you
> >> >> > think.
> >> >> >
> >> >> > and thank you, bruce, for helping me through this. i truly do
> >> >> > appreciate
> >> >> > it. i know i am close...and i got the other reports for my server
> >> >> > jobs
> >> >> > and
> >> >> > one of the other company reports to work. it's just these
> >> >> > multi-resultset
> >> >> > reports are fighting me.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Query parameters and report parameters seem to be the same thing
> >> >> >> but
> >> >> >> they
> >> >> >> are not. RS automatically creates a report parameter for each query
> >> >> >> parameter but instead you can map the query parameter to a
> >> >> >> constant.
> >> >> >> Click
> >> >> >> on the ... for the dataset, go to the parameters tab. On the right
> >> >> >> you
> >> >> >> will
> >> >> >> see it mapping to the report parameter, click on that and select
> >> >> >> expression.
> >> >> >> In expression put = 1 (assuming it is an integert expression) for
> >> >> >> the
> >> >> >> first
> >> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> >> parameters
> >> >> >> and then delete the report parameters created for you.
> >> >> >>
> >> >> >> You are very very close to the solution.
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets
> >> >> >> > in
> >> >> >> > there,
> >> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
> >> >> >> > getting
> >> >> >> > my
> >> >> >> > 'whole
> >> >> >> > report' in four small subsets of data. how do i get this to
> >> >> >> > happen
> >> >> >> > on
> >> >> >> > the
> >> >> >> > report page automatically without needing user input?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Are you going against SQL Server?
> >> >> >> >>
> >> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> >> just
> >> >> >> >> put
> >> >> >> >> in
> >> >> >> >> the name of the stored procedure. Do not put exec in from of it
> >> >> >> >> or
> >> >> >> >> anything
> >> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> >> should
> >> >> >> >> also
> >> >> >> >> create a report parameter as well for you.
> >> >> >> >>
> >> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> >> continue
> >> >> >> >> to
> >> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >> >>
> >> >> >> >> create procedure dbo.testproc
> >> >> >> >> @.PARAM1 int
> >> >> >> >> as
> >> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> >> return
> >> >> >> >>
> >> >> >> >> Get the above procedure to work for you so you know how to call
> >> >> >> >> a
> >> >> >> >> stored
> >> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> >> > not
> >> >> >> >> > detecting
> >> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
> >> >> >> >> > and
> >> >> >> >> > the
> >> >> >> >> > proc
> >> >> >> >> > name
> >> >> >> >> > is in the query string. i assumed i would put the 1st
> >> >> >> >> > parameter
> >> >> >> >> > in
> >> >> >> >> > on
> >> >> >> >> > the
> >> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> >> > datasets,
> >> >> >> >> > so
> >> >> >> >> > i
> >> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
> >> >> >> >> > it,
> >> >> >> >> > it
> >> >> >> >> > threw
> >> >> >> >> > me a
> >> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> >> procedure
> >> >> >> >> >> this
> >> >> >> >> >> way. Pick command type of stored procedure. RS will detect
> >> >> >> >> >> the
> >> >> >> >> >> parameters.
> >> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
> >> >> >> >> >> for
> >> >> >> >> >> parameters)
> >> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> >> myproc ?
> >> >> >> >> >>
> >> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> >> stored
> >> >> >> >> >> procedure for each one.
> >> >> >> >> >>
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
> >> >> >> >> >> > one
> >> >> >> >> >> > parameters,
> >> >> >> >> >> > it
> >> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
> >> >> >> >> >> > the
> >> >> >> >> >> > results,
> >> >> >> >> >> > works
> >> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I
> >> >> >> >> >> > hit
> >> >> >> >> >> > RUN
> >> >> >> >> >> > in
> >> >> >> >> >> > Data
> >> >> >> >> >> > tab it returns an error: SQL Syntax Errors
> >> >> >> >> >> > Encountered...The
> >> >> >> >> >> > designer
> >> >> >> >> >> > does
> >> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i
> >> >> >> >> >> > hit
> >> >> >> >> >> > 'OK'
> >> >> >> >> >> > and
> >> >> >> >> >> > my
> >> >> >> >> >> > results are still returned to me. On 'Preview' tab,
> >> >> >> >> >> > however,
> >> >> >> >> >> > I
> >> >> >> >> >> > get
> >> >> >> >> >> > no
> >> >> >> >> >> > data/results at all.
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Yes, you are calling it three times. In RS you create|||i think i may be almost there, bruce. hopefully...
i've added all the fields from the diff datasets into the rpt, 4 diff
tables. now when i go to preview, it doesn't show me anything, but up top
left there is a parameter box asking me for a value. and on the far right
there's a 'view report' button.
what should i do?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Just because they are calculated in the stored procedure does not mean they
> are calculated when you manually add them to the field list. You put the
> name same as the name of the field being returned and mark them as database
> field. If you name them appropriately and say they are are database fields
> it will work.
> So, let's say you are in dataset2 which is called the stored procedure with
> a parameter value of 2. When you click the execute the data comes back. Plus
> you can see the name of the fields in the dataset (but not in the field
> list). Add then appropriate field names to the field list.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
> > Bruce, i apologize, this is going on and on. I attempt to add the fields
> > in...just as they are in dataset1, except with new values, and it fails
> > with
> > this:
> >
> > 'The properties for the currently selected item are not valid. Please
> > correct all errors before continuing.'
> >
> > Now, all of these values are calculated...Volume (sum of another value), #
> > of Trades (count of another value), etc...but the same thing applies to
> > dataset 1, and those fields are listed as database fields, not calculated
> > fields. please can you tell me what the right way to do this is?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Ok, what is happening is that it is detecting the first resultset. What
> >> you
> >> can do it is add the fields manually. In the field list add a new field
> >> and
> >> name it correctly for what will be coming back. (Right mouse click in the
> >> field list).
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> >> > Bruce, every time I refresh the fields, it pops the 1st three back in
> >> > the
> >> > list. They're the first three in the report, and i guess they're the
> >> > only
> >> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
> >> > the
> >> > same
> >> > 3 fields are listed. i remove them per dataset, hit refresh, and the
> >> > same
> >> > 3
> >> > come back.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> For each of your datasets make sure there is a field list. Sometimes
> >> >> you
> >> >> have to click on the refresh fields button (to the right of the ...).
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> >> > oh my goodness this is frustrating me....i did what you said,
> >> >> > bruce,
> >> >> > and
> >> >> > it
> >> >> > almost worked. the preview report shows me three values which
> >> >> > correspond,
> >> >> > i
> >> >> > believe, to the only three fields in my report. see, they're all
> >> >> > calculated
> >> >> > fields. the output of the rpt is this:
> >> >> >
> >> >> > Build complete -- 0 errors, 0 warnings
> >> >> > The data set 'DataSet3' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet4' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet2' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > Preview complete -- 0 errors, 3 warnings
> >> >> >
> >> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2,
> >> >> > 3
> >> >> > and
> >> >> > 4. The report, or the query, is not auto-generating my other fields
> >> >> > as
> >> >> > it
> >> >> > did for three that I do see. The 'Futures_Volume' is one of the
> >> >> > fields
> >> >> > that
> >> >> > was auto-generated for me, and it is in the 1st dataset. Is it that
> >> >> > I
> >> >> > just
> >> >> > need to manually add in the other fields? Please do let me know
> >> >> > what
> >> >> > you
> >> >> > think.
> >> >> >
> >> >> > and thank you, bruce, for helping me through this. i truly do
> >> >> > appreciate
> >> >> > it. i know i am close...and i got the other reports for my server
> >> >> > jobs
> >> >> > and
> >> >> > one of the other company reports to work. it's just these
> >> >> > multi-resultset
> >> >> > reports are fighting me.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Query parameters and report parameters seem to be the same thing
> >> >> >> but
> >> >> >> they
> >> >> >> are not. RS automatically creates a report parameter for each query
> >> >> >> parameter but instead you can map the query parameter to a
> >> >> >> constant.
> >> >> >> Click
> >> >> >> on the ... for the dataset, go to the parameters tab. On the right
> >> >> >> you
> >> >> >> will
> >> >> >> see it mapping to the report parameter, click on that and select
> >> >> >> expression.
> >> >> >> In expression put = 1 (assuming it is an integert expression) for
> >> >> >> the
> >> >> >> first
> >> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> >> parameters
> >> >> >> and then delete the report parameters created for you.
> >> >> >>
> >> >> >> You are very very close to the solution.
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets
> >> >> >> > in
> >> >> >> > there,
> >> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
> >> >> >> > getting
> >> >> >> > my
> >> >> >> > 'whole
> >> >> >> > report' in four small subsets of data. how do i get this to
> >> >> >> > happen
> >> >> >> > on
> >> >> >> > the
> >> >> >> > report page automatically without needing user input?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Are you going against SQL Server?
> >> >> >> >>
> >> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> >> just
> >> >> >> >> put
> >> >> >> >> in
> >> >> >> >> the name of the stored procedure. Do not put exec in from of it
> >> >> >> >> or
> >> >> >> >> anything
> >> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> >> should
> >> >> >> >> also
> >> >> >> >> create a report parameter as well for you.
> >> >> >> >>
> >> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> >> continue
> >> >> >> >> to
> >> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >> >>
> >> >> >> >> create procedure dbo.testproc
> >> >> >> >> @.PARAM1 int
> >> >> >> >> as
> >> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> >> return
> >> >> >> >>
> >> >> >> >> Get the above procedure to work for you so you know how to call
> >> >> >> >> a
> >> >> >> >> stored
> >> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> >> > not
> >> >> >> >> > detecting
> >> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
> >> >> >> >> > and
> >> >> >> >> > the
> >> >> >> >> > proc
> >> >> >> >> > name
> >> >> >> >> > is in the query string. i assumed i would put the 1st
> >> >> >> >> > parameter
> >> >> >> >> > in
> >> >> >> >> > on
> >> >> >> >> > the
> >> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> >> > datasets,
> >> >> >> >> > so
> >> >> >> >> > i
> >> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
> >> >> >> >> > it,
> >> >> >> >> > it
> >> >> >> >> > threw
> >> >> >> >> > me a
> >> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> >> procedure
> >> >> >> >> >> this
> >> >> >> >> >> way. Pick command type of stored procedure. RS will detect
> >> >> >> >> >> the
> >> >> >> >> >> parameters.
> >> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
> >> >> >> >> >> for
> >> >> >> >> >> parameters)
> >> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> >> myproc ?
> >> >> >> >> >>
> >> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> >> stored
> >> >> >> >> >> procedure for each one.
> >> >> >> >> >>
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
> >> >> >> >> >> > one
> >> >> >> >> >> > parameters,
> >> >> >> >> >> > it
> >> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
> >> >> >> >> >> > the
> >> >> >> >> >> > results,
> >> >> >> >> >> > works
> >> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I
> >> >> >> >> >> > hit
> >> >> >> >> >> > RUN
> >> >> >> >> >> > in
> >> >> >> >> >> > Data
> >> >> >> >> >> > tab it returns an error: SQL Syntax Errors
> >> >> >> >> >> > Encountered...The
> >> >> >> >> >> > designer
> >> >> >> >> >> > does
> >> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i
> >> >> >> >> >> > hit
> >> >> >> >> >> > 'OK'
> >> >> >> >> >> > and
> >> >> >> >> >> > my
> >> >> >> >> >> > results are still returned to me. On 'Preview' tab,
> >> >> >> >> >> > however,
> >> >> >> >> >> > I
> >> >> >> >> >> > get
> >> >> >> >> >> > no
> >> >> >> >> >> > data/results at all.
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Yes, you are calling it three times. In RS you create|||d:\...\...\blah report.rdl The data set name is missing in the data region
â'data set nameâ'.
d:\...\...\blah report.rdl The data set â'DataSet2â' contains a definition
for the field â'Futures_Volumeâ'. This field is missing from the returned
result set from the data source.
'Futures_Volume' was/is in the 1st dataset, i deleted from the other three,
adding all the correct fields manually. each rpt runs fine in Data tab when i
hit the run exclamation point. but if i try to preview, i get those two
erros, the second one i get three times for each dataset (2, 3 and 4).
-- Lynn
"Bruce L-C [MVP]" wrote:
> Just because they are calculated in the stored procedure does not mean they
> are calculated when you manually add them to the field list. You put the
> name same as the name of the field being returned and mark them as database
> field. If you name them appropriately and say they are are database fields
> it will work.
> So, let's say you are in dataset2 which is called the stored procedure with
> a parameter value of 2. When you click the execute the data comes back. Plus
> you can see the name of the fields in the dataset (but not in the field
> list). Add then appropriate field names to the field list.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
> > Bruce, i apologize, this is going on and on. I attempt to add the fields
> > in...just as they are in dataset1, except with new values, and it fails
> > with
> > this:
> >
> > 'The properties for the currently selected item are not valid. Please
> > correct all errors before continuing.'
> >
> > Now, all of these values are calculated...Volume (sum of another value), #
> > of Trades (count of another value), etc...but the same thing applies to
> > dataset 1, and those fields are listed as database fields, not calculated
> > fields. please can you tell me what the right way to do this is?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Ok, what is happening is that it is detecting the first resultset. What
> >> you
> >> can do it is add the fields manually. In the field list add a new field
> >> and
> >> name it correctly for what will be coming back. (Right mouse click in the
> >> field list).
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> >> > Bruce, every time I refresh the fields, it pops the 1st three back in
> >> > the
> >> > list. They're the first three in the report, and i guess they're the
> >> > only
> >> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
> >> > the
> >> > same
> >> > 3 fields are listed. i remove them per dataset, hit refresh, and the
> >> > same
> >> > 3
> >> > come back.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> For each of your datasets make sure there is a field list. Sometimes
> >> >> you
> >> >> have to click on the refresh fields button (to the right of the ...).
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> >> > oh my goodness this is frustrating me....i did what you said,
> >> >> > bruce,
> >> >> > and
> >> >> > it
> >> >> > almost worked. the preview report shows me three values which
> >> >> > correspond,
> >> >> > i
> >> >> > believe, to the only three fields in my report. see, they're all
> >> >> > calculated
> >> >> > fields. the output of the rpt is this:
> >> >> >
> >> >> > Build complete -- 0 errors, 0 warnings
> >> >> > The data set 'DataSet3' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet4' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet2' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > Preview complete -- 0 errors, 3 warnings
> >> >> >
> >> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2,
> >> >> > 3
> >> >> > and
> >> >> > 4. The report, or the query, is not auto-generating my other fields
> >> >> > as
> >> >> > it
> >> >> > did for three that I do see. The 'Futures_Volume' is one of the
> >> >> > fields
> >> >> > that
> >> >> > was auto-generated for me, and it is in the 1st dataset. Is it that
> >> >> > I
> >> >> > just
> >> >> > need to manually add in the other fields? Please do let me know
> >> >> > what
> >> >> > you
> >> >> > think.
> >> >> >
> >> >> > and thank you, bruce, for helping me through this. i truly do
> >> >> > appreciate
> >> >> > it. i know i am close...and i got the other reports for my server
> >> >> > jobs
> >> >> > and
> >> >> > one of the other company reports to work. it's just these
> >> >> > multi-resultset
> >> >> > reports are fighting me.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Query parameters and report parameters seem to be the same thing
> >> >> >> but
> >> >> >> they
> >> >> >> are not. RS automatically creates a report parameter for each query
> >> >> >> parameter but instead you can map the query parameter to a
> >> >> >> constant.
> >> >> >> Click
> >> >> >> on the ... for the dataset, go to the parameters tab. On the right
> >> >> >> you
> >> >> >> will
> >> >> >> see it mapping to the report parameter, click on that and select
> >> >> >> expression.
> >> >> >> In expression put = 1 (assuming it is an integert expression) for
> >> >> >> the
> >> >> >> first
> >> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> >> parameters
> >> >> >> and then delete the report parameters created for you.
> >> >> >>
> >> >> >> You are very very close to the solution.
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets
> >> >> >> > in
> >> >> >> > there,
> >> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
> >> >> >> > getting
> >> >> >> > my
> >> >> >> > 'whole
> >> >> >> > report' in four small subsets of data. how do i get this to
> >> >> >> > happen
> >> >> >> > on
> >> >> >> > the
> >> >> >> > report page automatically without needing user input?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Are you going against SQL Server?
> >> >> >> >>
> >> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> >> just
> >> >> >> >> put
> >> >> >> >> in
> >> >> >> >> the name of the stored procedure. Do not put exec in from of it
> >> >> >> >> or
> >> >> >> >> anything
> >> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> >> should
> >> >> >> >> also
> >> >> >> >> create a report parameter as well for you.
> >> >> >> >>
> >> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> >> continue
> >> >> >> >> to
> >> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >> >>
> >> >> >> >> create procedure dbo.testproc
> >> >> >> >> @.PARAM1 int
> >> >> >> >> as
> >> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> >> return
> >> >> >> >>
> >> >> >> >> Get the above procedure to work for you so you know how to call
> >> >> >> >> a
> >> >> >> >> stored
> >> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> >> > not
> >> >> >> >> > detecting
> >> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
> >> >> >> >> > and
> >> >> >> >> > the
> >> >> >> >> > proc
> >> >> >> >> > name
> >> >> >> >> > is in the query string. i assumed i would put the 1st
> >> >> >> >> > parameter
> >> >> >> >> > in
> >> >> >> >> > on
> >> >> >> >> > the
> >> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> >> > datasets,
> >> >> >> >> > so
> >> >> >> >> > i
> >> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
> >> >> >> >> > it,
> >> >> >> >> > it
> >> >> >> >> > threw
> >> >> >> >> > me a
> >> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> >> procedure
> >> >> >> >> >> this
> >> >> >> >> >> way. Pick command type of stored procedure. RS will detect
> >> >> >> >> >> the
> >> >> >> >> >> parameters.
> >> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
> >> >> >> >> >> for
> >> >> >> >> >> parameters)
> >> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> >> myproc ?
> >> >> >> >> >>
> >> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> >> stored
> >> >> >> >> >> procedure for each one.
> >> >> >> >> >>
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
> >> >> >> >> >> > one
> >> >> >> >> >> > parameters,
> >> >> >> >> >> > it
> >> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
> >> >> >> >> >> > the
> >> >> >> >> >> > results,
> >> >> >> >> >> > works
> >> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I
> >> >> >> >> >> > hit
> >> >> >> >> >> > RUN
> >> >> >> >> >> > in
> >> >> >> >> >> > Data
> >> >> >> >> >> > tab it returns an error: SQL Syntax Errors
> >> >> >> >> >> > Encountered...The
> >> >> >> >> >> > designer
> >> >> >> >> >> > does
> >> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i
> >> >> >> >> >> > hit
> >> >> >> >> >> > 'OK'
> >> >> >> >> >> > and
> >> >> >> >> >> > my
> >> >> >> >> >> > results are still returned to me. On 'Preview' tab,
> >> >> >> >> >> > however,
> >> >> >> >> >> > I
> >> >> >> >> >> > get
> >> >> >> >> >> > no
> >> >> >> >> >> > data/results at all.
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Yes, you are calling it three times. In RS you create|||The datasets 2, 3 and 4 contain definition for futures volume...the field is
missing from the returned resultset from the data source.
possibly i'm looking at this wrong, and i should have four separate
datasets, each with different group of fields, and a single report in which
all fields (from all 4 datasets) are combined?
-- Lynn
"Bruce L-C [MVP]" wrote:
> Just because they are calculated in the stored procedure does not mean they
> are calculated when you manually add them to the field list. You put the
> name same as the name of the field being returned and mark them as database
> field. If you name them appropriately and say they are are database fields
> it will work.
> So, let's say you are in dataset2 which is called the stored procedure with
> a parameter value of 2. When you click the execute the data comes back. Plus
> you can see the name of the fields in the dataset (but not in the field
> list). Add then appropriate field names to the field list.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
> > Bruce, i apologize, this is going on and on. I attempt to add the fields
> > in...just as they are in dataset1, except with new values, and it fails
> > with
> > this:
> >
> > 'The properties for the currently selected item are not valid. Please
> > correct all errors before continuing.'
> >
> > Now, all of these values are calculated...Volume (sum of another value), #
> > of Trades (count of another value), etc...but the same thing applies to
> > dataset 1, and those fields are listed as database fields, not calculated
> > fields. please can you tell me what the right way to do this is?
> > -- Lynn
> >
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Ok, what is happening is that it is detecting the first resultset. What
> >> you
> >> can do it is add the fields manually. In the field list add a new field
> >> and
> >> name it correctly for what will be coming back. (Right mouse click in the
> >> field list).
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
> >> > Bruce, every time I refresh the fields, it pops the 1st three back in
> >> > the
> >> > list. They're the first three in the report, and i guess they're the
> >> > only
> >> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
> >> > the
> >> > same
> >> > 3 fields are listed. i remove them per dataset, hit refresh, and the
> >> > same
> >> > 3
> >> > come back.
> >> > -- Lynn
> >> >
> >> >
> >> > "Bruce L-C [MVP]" wrote:
> >> >
> >> >> For each of your datasets make sure there is a field list. Sometimes
> >> >> you
> >> >> have to click on the refresh fields button (to the right of the ...).
> >> >>
> >> >> --
> >> >> Bruce Loehle-Conger
> >> >> MVP SQL Server Reporting Services
> >> >>
> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
> >> >> > oh my goodness this is frustrating me....i did what you said,
> >> >> > bruce,
> >> >> > and
> >> >> > it
> >> >> > almost worked. the preview report shows me three values which
> >> >> > correspond,
> >> >> > i
> >> >> > believe, to the only three fields in my report. see, they're all
> >> >> > calculated
> >> >> > fields. the output of the rpt is this:
> >> >> >
> >> >> > Build complete -- 0 errors, 0 warnings
> >> >> > The data set 'DataSet3' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet4' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > The data set 'DataSet2' contains a definition for the field
> >> >> > 'Futures_Volume'. This field is missing from the returned result set
> >> >> > from
> >> >> > the
> >> >> > data source.
> >> >> > Preview complete -- 0 errors, 3 warnings
> >> >> >
> >> >> > Now, I created the4 datasets, the parameter for each is simply 1, 2,
> >> >> > 3
> >> >> > and
> >> >> > 4. The report, or the query, is not auto-generating my other fields
> >> >> > as
> >> >> > it
> >> >> > did for three that I do see. The 'Futures_Volume' is one of the
> >> >> > fields
> >> >> > that
> >> >> > was auto-generated for me, and it is in the 1st dataset. Is it that
> >> >> > I
> >> >> > just
> >> >> > need to manually add in the other fields? Please do let me know
> >> >> > what
> >> >> > you
> >> >> > think.
> >> >> >
> >> >> > and thank you, bruce, for helping me through this. i truly do
> >> >> > appreciate
> >> >> > it. i know i am close...and i got the other reports for my server
> >> >> > jobs
> >> >> > and
> >> >> > one of the other company reports to work. it's just these
> >> >> > multi-resultset
> >> >> > reports are fighting me.
> >> >> > -- Lynn
> >> >> >
> >> >> >
> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >
> >> >> >> Query parameters and report parameters seem to be the same thing
> >> >> >> but
> >> >> >> they
> >> >> >> are not. RS automatically creates a report parameter for each query
> >> >> >> parameter but instead you can map the query parameter to a
> >> >> >> constant.
> >> >> >> Click
> >> >> >> on the ... for the dataset, go to the parameters tab. On the right
> >> >> >> you
> >> >> >> will
> >> >> >> see it mapping to the report parameter, click on that and select
> >> >> >> expression.
> >> >> >> In expression put = 1 (assuming it is an integert expression) for
> >> >> >> the
> >> >> >> first
> >> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
> >> >> >> parameters
> >> >> >> and then delete the report parameters created for you.
> >> >> >>
> >> >> >> You are very very close to the solution.
> >> >> >>
> >> >> >> --
> >> >> >> Bruce Loehle-Conger
> >> >> >> MVP SQL Server Reporting Services
> >> >> >>
> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
> >> >> >> > last one for a while, bruce, i promise. i've got all 4 datasets
> >> >> >> > in
> >> >> >> > there,
> >> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
> >> >> >> > getting
> >> >> >> > my
> >> >> >> > 'whole
> >> >> >> > report' in four small subsets of data. how do i get this to
> >> >> >> > happen
> >> >> >> > on
> >> >> >> > the
> >> >> >> > report page automatically without needing user input?
> >> >> >> > -- Lynn
> >> >> >> >
> >> >> >> >
> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >
> >> >> >> >> Are you going against SQL Server?
> >> >> >> >>
> >> >> >> >> If so, then just select tored procedure for the command type and
> >> >> >> >> just
> >> >> >> >> put
> >> >> >> >> in
> >> >> >> >> the name of the stored procedure. Do not put exec in from of it
> >> >> >> >> or
> >> >> >> >> anything
> >> >> >> >> else. It should detect the parameter and prompt you for it. It
> >> >> >> >> should
> >> >> >> >> also
> >> >> >> >> create a report parameter as well for you.
> >> >> >> >>
> >> >> >> >> Try creating a new dataset and do this from the start. If you
> >> >> >> >> continue
> >> >> >> >> to
> >> >> >> >> have problems create a new stored procedure just for testing .
> >> >> >> >>
> >> >> >> >> create procedure dbo.testproc
> >> >> >> >> @.PARAM1 int
> >> >> >> >> as
> >> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
> >> >> >> >> return
> >> >> >> >>
> >> >> >> >> Get the above procedure to work for you so you know how to call
> >> >> >> >> a
> >> >> >> >> stored
> >> >> >> >> procedure they way I am telling you (do not use exec).
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >> --
> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> MVP SQL Server Reporting Services
> >> >> >> >>
> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
> >> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs is
> >> >> >> >> > not
> >> >> >> >> > detecting
> >> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
> >> >> >> >> > and
> >> >> >> >> > the
> >> >> >> >> > proc
> >> >> >> >> > name
> >> >> >> >> > is in the query string. i assumed i would put the 1st
> >> >> >> >> > parameter
> >> >> >> >> > in
> >> >> >> >> > on
> >> >> >> >> > the
> >> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3 other
> >> >> >> >> > datasets,
> >> >> >> >> > so
> >> >> >> >> > i
> >> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
> >> >> >> >> > it,
> >> >> >> >> > it
> >> >> >> >> > threw
> >> >> >> >> > me a
> >> >> >> >> > 'define query parameters box asking me to put the '1' in it.
> >> >> >> >> > -- Lynn
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >
> >> >> >> >> >> If you are going against SQL Server do not run your stored
> >> >> >> >> >> procedure
> >> >> >> >> >> this
> >> >> >> >> >> way. Pick command type of stored procedure. RS will detect
> >> >> >> >> >> the
> >> >> >> >> >> parameters.
> >> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
> >> >> >> >> >> for
> >> >> >> >> >> parameters)
> >> >> >> >> >> then pick text as the command type and do this:
> >> >> >> >> >> myproc ?
> >> >> >> >> >>
> >> >> >> >> >> Create multiple datasets and for each one you should call the
> >> >> >> >> >> stored
> >> >> >> >> >> procedure for each one.
> >> >> >> >> >>
> >> >> >> >> >> Bruce Loehle-Conger
> >> >> >> >> >>
> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
> >> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
> >> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
> >> >> >> >> >> > one
> >> >> >> >> >> > parameters,
> >> >> >> >> >> > it
> >> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
> >> >> >> >> >> > the
> >> >> >> >> >> > results,
> >> >> >> >> >> > works
> >> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when I
> >> >> >> >> >> > hit
> >> >> >> >> >> > RUN
> >> >> >> >> >> > in
> >> >> >> >> >> > Data
> >> >> >> >> >> > tab it returns an error: SQL Syntax Errors
> >> >> >> >> >> > Encountered...The
> >> >> >> >> >> > designer
> >> >> >> >> >> > does
> >> >> >> >> >> > not graphically support the EXEC SQL Construct' but, i
> >> >> >> >> >> > hit
> >> >> >> >> >> > 'OK'
> >> >> >> >> >> > and
> >> >> >> >> >> > my
> >> >> >> >> >> > results are still returned to me. On 'Preview' tab,
> >> >> >> >> >> > however,
> >> >> >> >> >> > I
> >> >> >> >> >> > get
> >> >> >> >> >> > no
> >> >> >> >> >> > data/results at all.
> >> >> >> >> >> > -- Lynn
> >> >> >> >> >> >
> >> >> >> >> >> >
> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
> >> >> >> >> >> >
> >> >> >> >> >> >> Yes, you are calling it three times. In RS you create|||You are trying to learn many things all at once. You cannot combine datasets
together however you can use the First aggegate funtion (think of it like
Sum except it returns the first value which if the dataset has a single row
is the data you want.
Normally with multiple datasets you would have multiple table controls on
your form (or a list control).
Not sure if you solved the problem of it wiping out your field list. If so,
here is a work around. Make sure your stored procedure works. Then go to
layout view. Show the dataset/fieldlist from there and delete / add fields
to the field list from there.
Note, when wanting to essentially join data into a single dataset another
technique is to use subreports.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Lynn" <Lynn@.discussions.microsoft.com> wrote in message
news:8781DA41-EE73-4E1D-8195-42A8355BF10E@.microsoft.com...
> The datasets 2, 3 and 4 contain definition for futures volume...the field
> is
> missing from the returned resultset from the data source.
> possibly i'm looking at this wrong, and i should have four separate
> datasets, each with different group of fields, and a single report in
> which
> all fields (from all 4 datasets) are combined?
> -- Lynn
>
> "Bruce L-C [MVP]" wrote:
>> Just because they are calculated in the stored procedure does not mean
>> they
>> are calculated when you manually add them to the field list. You put the
>> name same as the name of the field being returned and mark them as
>> database
>> field. If you name them appropriately and say they are are database
>> fields
>> it will work.
>> So, let's say you are in dataset2 which is called the stored procedure
>> with
>> a parameter value of 2. When you click the execute the data comes back.
>> Plus
>> you can see the name of the fields in the dataset (but not in the field
>> list). Add then appropriate field names to the field list.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> news:56F8F3F3-94C0-4E6F-9385-423CB80090EF@.microsoft.com...
>> > Bruce, i apologize, this is going on and on. I attempt to add the
>> > fields
>> > in...just as they are in dataset1, except with new values, and it fails
>> > with
>> > this:
>> >
>> > 'The properties for the currently selected item are not valid. Please
>> > correct all errors before continuing.'
>> >
>> > Now, all of these values are calculated...Volume (sum of another
>> > value), #
>> > of Trades (count of another value), etc...but the same thing applies
>> > to
>> > dataset 1, and those fields are listed as database fields, not
>> > calculated
>> > fields. please can you tell me what the right way to do this is?
>> > -- Lynn
>> >
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> Ok, what is happening is that it is detecting the first resultset.
>> >> What
>> >> you
>> >> can do it is add the fields manually. In the field list add a new
>> >> field
>> >> and
>> >> name it correctly for what will be coming back. (Right mouse click in
>> >> the
>> >> field list).
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> news:D5EEA5C8-DB3A-4DB3-ADE6-D8092373DC46@.microsoft.com...
>> >> > Bruce, every time I refresh the fields, it pops the 1st three back
>> >> > in
>> >> > the
>> >> > list. They're the first three in the report, and i guess they're
>> >> > the
>> >> > only
>> >> > ones in that first resultset. So, I go into dataset 2, 3 and 4, all
>> >> > the
>> >> > same
>> >> > 3 fields are listed. i remove them per dataset, hit refresh, and
>> >> > the
>> >> > same
>> >> > 3
>> >> > come back.
>> >> > -- Lynn
>> >> >
>> >> >
>> >> > "Bruce L-C [MVP]" wrote:
>> >> >
>> >> >> For each of your datasets make sure there is a field list.
>> >> >> Sometimes
>> >> >> you
>> >> >> have to click on the refresh fields button (to the right of the
>> >> >> ...).
>> >> >>
>> >> >> --
>> >> >> Bruce Loehle-Conger
>> >> >> MVP SQL Server Reporting Services
>> >> >>
>> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> news:17C0ED6F-0E4A-4033-A1A2-A841AA7BBECF@.microsoft.com...
>> >> >> > oh my goodness this is frustrating me....i did what you said,
>> >> >> > bruce,
>> >> >> > and
>> >> >> > it
>> >> >> > almost worked. the preview report shows me three values which
>> >> >> > correspond,
>> >> >> > i
>> >> >> > believe, to the only three fields in my report. see, they're all
>> >> >> > calculated
>> >> >> > fields. the output of the rpt is this:
>> >> >> >
>> >> >> > Build complete -- 0 errors, 0 warnings
>> >> >> > The data set 'DataSet3' contains a definition for the field
>> >> >> > 'Futures_Volume'. This field is missing from the returned result
>> >> >> > set
>> >> >> > from
>> >> >> > the
>> >> >> > data source.
>> >> >> > The data set 'DataSet4' contains a definition for the field
>> >> >> > 'Futures_Volume'. This field is missing from the returned result
>> >> >> > set
>> >> >> > from
>> >> >> > the
>> >> >> > data source.
>> >> >> > The data set 'DataSet2' contains a definition for the field
>> >> >> > 'Futures_Volume'. This field is missing from the returned result
>> >> >> > set
>> >> >> > from
>> >> >> > the
>> >> >> > data source.
>> >> >> > Preview complete -- 0 errors, 3 warnings
>> >> >> >
>> >> >> > Now, I created the4 datasets, the parameter for each is simply 1,
>> >> >> > 2,
>> >> >> > 3
>> >> >> > and
>> >> >> > 4. The report, or the query, is not auto-generating my other
>> >> >> > fields
>> >> >> > as
>> >> >> > it
>> >> >> > did for three that I do see. The 'Futures_Volume' is one of the
>> >> >> > fields
>> >> >> > that
>> >> >> > was auto-generated for me, and it is in the 1st dataset. Is it
>> >> >> > that
>> >> >> > I
>> >> >> > just
>> >> >> > need to manually add in the other fields? Please do let me know
>> >> >> > what
>> >> >> > you
>> >> >> > think.
>> >> >> >
>> >> >> > and thank you, bruce, for helping me through this. i truly do
>> >> >> > appreciate
>> >> >> > it. i know i am close...and i got the other reports for my
>> >> >> > server
>> >> >> > jobs
>> >> >> > and
>> >> >> > one of the other company reports to work. it's just these
>> >> >> > multi-resultset
>> >> >> > reports are fighting me.
>> >> >> > -- Lynn
>> >> >> >
>> >> >> >
>> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >
>> >> >> >> Query parameters and report parameters seem to be the same thing
>> >> >> >> but
>> >> >> >> they
>> >> >> >> are not. RS automatically creates a report parameter for each
>> >> >> >> query
>> >> >> >> parameter but instead you can map the query parameter to a
>> >> >> >> constant.
>> >> >> >> Click
>> >> >> >> on the ... for the dataset, go to the parameters tab. On the
>> >> >> >> right
>> >> >> >> you
>> >> >> >> will
>> >> >> >> see it mapping to the report parameter, click on that and select
>> >> >> >> expression.
>> >> >> >> In expression put = 1 (assuming it is an integert expression)
>> >> >> >> for
>> >> >> >> the
>> >> >> >> first
>> >> >> >> dataset, =2 etc. Then go to report layout, report menu-> report
>> >> >> >> parameters
>> >> >> >> and then delete the report parameters created for you.
>> >> >> >>
>> >> >> >> You are very very close to the solution.
>> >> >> >>
>> >> >> >> --
>> >> >> >> Bruce Loehle-Conger
>> >> >> >> MVP SQL Server Reporting Services
>> >> >> >>
>> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> news:61E1ED5C-B204-4024-9DC4-82635AEBD912@.microsoft.com...
>> >> >> >> > last one for a while, bruce, i promise. i've got all 4
>> >> >> >> > datasets
>> >> >> >> > in
>> >> >> >> > there,
>> >> >> >> > each asks me for a parameter, i put 1,2,3 and 4 into each,
>> >> >> >> > getting
>> >> >> >> > my
>> >> >> >> > 'whole
>> >> >> >> > report' in four small subsets of data. how do i get this to
>> >> >> >> > happen
>> >> >> >> > on
>> >> >> >> > the
>> >> >> >> > report page automatically without needing user input?
>> >> >> >> > -- Lynn
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >
>> >> >> >> >> Are you going against SQL Server?
>> >> >> >> >>
>> >> >> >> >> If so, then just select tored procedure for the command type
>> >> >> >> >> and
>> >> >> >> >> just
>> >> >> >> >> put
>> >> >> >> >> in
>> >> >> >> >> the name of the stored procedure. Do not put exec in from of
>> >> >> >> >> it
>> >> >> >> >> or
>> >> >> >> >> anything
>> >> >> >> >> else. It should detect the parameter and prompt you for it.
>> >> >> >> >> It
>> >> >> >> >> should
>> >> >> >> >> also
>> >> >> >> >> create a report parameter as well for you.
>> >> >> >> >>
>> >> >> >> >> Try creating a new dataset and do this from the start. If you
>> >> >> >> >> continue
>> >> >> >> >> to
>> >> >> >> >> have problems create a new stored procedure just for testing
>> >> >> >> >> .
>> >> >> >> >>
>> >> >> >> >> create procedure dbo.testproc
>> >> >> >> >> @.PARAM1 int
>> >> >> >> >> as
>> >> >> >> >> select 'Parameter passed in = ' + @.PARAM1 as Message
>> >> >> >> >> return
>> >> >> >> >>
>> >> >> >> >> Get the above procedure to work for you so you know how to
>> >> >> >> >> call
>> >> >> >> >> a
>> >> >> >> >> stored
>> >> >> >> >> procedure they way I am telling you (do not use exec).
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >> --
>> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> MVP SQL Server Reporting Services
>> >> >> >> >>
>> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> news:9B089D7B-1F23-465B-B443-08BD09469A3E@.microsoft.com...
>> >> >> >> >> > i'm sorry, bruce, but where do i define the parameters? rs
>> >> >> >> >> > is
>> >> >> >> >> > not
>> >> >> >> >> > detecting
>> >> >> >> >> > them. in my 1st dataset i've got cmd type stored procedure
>> >> >> >> >> > and
>> >> >> >> >> > the
>> >> >> >> >> > proc
>> >> >> >> >> > name
>> >> >> >> >> > is in the query string. i assumed i would put the 1st
>> >> >> >> >> > parameter
>> >> >> >> >> > in
>> >> >> >> >> > on
>> >> >> >> >> > the
>> >> >> >> >> > parameters tab and then do the same for 2, 3 and 4 on 3
>> >> >> >> >> > other
>> >> >> >> >> > datasets,
>> >> >> >> >> > so
>> >> >> >> >> > i
>> >> >> >> >> > gave it @.ch and the value of 1, but when i attempted to run
>> >> >> >> >> > it,
>> >> >> >> >> > it
>> >> >> >> >> > threw
>> >> >> >> >> > me a
>> >> >> >> >> > 'define query parameters box asking me to put the '1' in
>> >> >> >> >> > it.
>> >> >> >> >> > -- Lynn
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >
>> >> >> >> >> >> If you are going against SQL Server do not run your stored
>> >> >> >> >> >> procedure
>> >> >> >> >> >> this
>> >> >> >> >> >> way. Pick command type of stored procedure. RS will detect
>> >> >> >> >> >> the
>> >> >> >> >> >> parameters.
>> >> >> >> >> >> If going against ODBC or OLEDB driver (which uses ? format
>> >> >> >> >> >> for
>> >> >> >> >> >> parameters)
>> >> >> >> >> >> then pick text as the command type and do this:
>> >> >> >> >> >> myproc ?
>> >> >> >> >> >>
>> >> >> >> >> >> Create multiple datasets and for each one you should call
>> >> >> >> >> >> the
>> >> >> >> >> >> stored
>> >> >> >> >> >> procedure for each one.
>> >> >> >> >> >>
>> >> >> >> >> >> Bruce Loehle-Conger
>> >> >> >> >> >>
>> >> >> >> >> >> "Lynn" <Lynn@.discussions.microsoft.com> wrote in message
>> >> >> >> >> >> news:79CA374D-729B-4181-8F45-5D61FCF30F28@.microsoft.com...
>> >> >> >> >> >> > And, if I blow away the 2nd dataset and just give my 1st
>> >> >> >> >> >> > one
>> >> >> >> >> >> > parameters,
>> >> >> >> >> >> > it
>> >> >> >> >> >> > almost works. EXEC db.dbo.procname 1 for chunk one of
>> >> >> >> >> >> > the
>> >> >> >> >> >> > results,
>> >> >> >> >> >> > works
>> >> >> >> >> >> > just fine. if i change the parameter to 2, 3 or 4, when
>> >> >> >> >> >> > I
>> >> >> >> >> >> > hit
>> >> >> >> >> >> > RUN
>> >> >> >> >> >> > in
>> >> >> >> >> >> > Data
>> >> >> >> >> >> > tab it returns an error: SQL Syntax Errors
>> >> >> >> >> >> > Encountered...The
>> >> >> >> >> >> > designer
>> >> >> >> >> >> > does
>> >> >> >> >> >> > not graphically support the EXEC SQL Construct' but,
>> >> >> >> >> >> > i
>> >> >> >> >> >> > hit
>> >> >> >> >> >> > 'OK'
>> >> >> >> >> >> > and
>> >> >> >> >> >> > my
>> >> >> >> >> >> > results are still returned to me. On 'Preview' tab,
>> >> >> >> >> >> > however,
>> >> >> >> >> >> > I
>> >> >> >> >> >> > get
>> >> >> >> >> >> > no
>> >> >> >> >> >> > data/results at all.
>> >> >> >> >> >> > -- Lynn
>> >> >> >> >> >> >
>> >> >> >> >> >> >
>> >> >> >> >> >> > "Bruce L-C [MVP]" wrote:
>> >> >> >> >> >> >
>> >> >> >> >> >> >> Yes, you are calling it three times. In RS you create
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment