Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Monday, March 26, 2012

ReportService Deployment

I need to create a installation for a group of report on our customer
servers. Based on googling it seems the only way to do this is via script
or direct calls using SOAP and VS.2005 has not direct support for creating
setup programs.
Is this correct or is there a better way?
Regards,
JohnThere is no direct support for creating an MSI to do deployments, but it
would be fairly easy to write one to push the reports yourself.
"John J. Hughes II" <no@.invalid.com> wrote in message
news:up6Lve8iGHA.4776@.TK2MSFTNGP05.phx.gbl...
>I need to create a installation for a group of report on our customer
>servers. Based on googling it seems the only way to do this is via script
>or direct calls using SOAP and VS.2005 has not direct support for creating
>setup programs.
> Is this correct or is there a better way?
> Regards,
> John
>|||Sorry. crappy response.
You can create a setup project and a custom installer that connects to the
report server and, using the web service calls, adds the reports.
I think you can also use RSS to perform installations.
"John J. Hughes II" <no@.invalid.com> wrote in message
news:up6Lve8iGHA.4776@.TK2MSFTNGP05.phx.gbl...
>I need to create a installation for a group of report on our customer
>servers. Based on googling it seems the only way to do this is via script
>or direct calls using SOAP and VS.2005 has not direct support for creating
>setup programs.
> Is this correct or is there a better way?
> Regards,
> John
>|||Thanks, guess MS only supports the product partially still.
Regards,
John
"Tim Dot NoSpam" <Tim.NoSpam@.hughes.net> wrote in message
news:esmwbxajGHA.4508@.TK2MSFTNGP05.phx.gbl...
> Sorry. crappy response.
> You can create a setup project and a custom installer that connects to the
> report server and, using the web service calls, adds the reports.
> I think you can also use RSS to perform installations.
> "John J. Hughes II" <no@.invalid.com> wrote in message
> news:up6Lve8iGHA.4776@.TK2MSFTNGP05.phx.gbl...
>>I need to create a installation for a group of report on our customer
>>servers. Based on googling it seems the only way to do this is via
>>script or direct calls using SOAP and VS.2005 has not direct support for
>>creating setup programs.
>> Is this correct or is there a better way?
>> Regards,
>> John
>

Wednesday, March 21, 2012

Reports with OLAP Cubes

Hi

I try to design a report with Chart based on an Analysis Services Data source...

It does'nt work !!!

Has anyone else the same problem?

It would help if you could provide more details of what exactly does not work.


Maybe the data values are coming across as strings rather than numeric values? Try to convert the datatype for the datapoint expressions. E.g. =Sum(CDbl(Fields!Measure.Value))

-- Robert

|||

Hi,

I have a OLAP report with a table. I need to display a chart on click of particular cell in the table wihtin the same report. How to pass the parameter from the table to the chart and display it in the same report? Pls help me in solving this

Reports with OLAP Cubes

Hi

I try to design a report with Chart based on an Analysis Services Data source...

It does'nt work !!!

Has anyone else the same problem?

It would help if you could provide more details of what exactly does not work.


Maybe the data values are coming across as strings rather than numeric values? Try to convert the datatype for the datapoint expressions. E.g. =Sum(CDbl(Fields!Measure.Value))

-- Robert

|||

Hi,

I have a OLAP report with a table. I need to display a chart on click of particular cell in the table wihtin the same report. How to pass the parameter from the table to the chart and display it in the same report? Pls help me in solving this

Tuesday, March 20, 2012

Report's Parameter : From Date to Date

I want to add 2 parameters in my report to delimit a date range. The report is based on Analysis Services 2005 and I have created a Time Dimension. What is the best way to do this ?

I would prefer to use a Datetime parameter type because of the calendar component, but then I don't succeed to associate this parameter with the Time Dimension in the filter expression...

I really need an answer to that question, please help me |||You can't really use a datetime parameter (at least not using the built-in prompting) as AS dates are members of a dimension, not scalars. And you aren't really guaranteed that the range between two members will give you what you want. We could add a feature at some point to convert them but that doesn't exist now.|||

Thanks for the answer.

I just found a solution to my problem, even if the solution is not what I hoped for, it may help someone :

I created two Report Parameters "From Date" and "To Date" which use the calendar component to let the user choose a date. And in my Dataset, in the '...' button, in the 'Parameters' bar, I add a parameter whose value is :

="[Temps].[Temps - Date Key].[" & Year(Parameters!FromTempsTempsCalendrier.Value) & "-" & IIF(Month(Parameters!FromTempsTempsCalendrier.Value)<10,"0","") & Month(Parameters!FromTempsTempsCalendrier.Value) & "-" & IIF(Day(Parameters!FromTempsTempsCalendrier.Value)<10, "0","") & Day(Parameters!FromTempsTempsCalendrier.Value) & " 00:00:00]"

That way, I build the UNIQUENAME properties of my Time Dimension.

But an error occurs when the user select a date which does not exist in the Time Dimension.

|||

Thanks for the possible solution. However, I've been working on following your steps, but I am not getting it to work.

Could you explain in a little more detail how to accomplish this?

Reports on Cubes of SQL 2000

We have to create reports based on cubes, which were designed using SQL 2000. We have migrated to SQL 2005. We have the cubes (.cub files). We need to design few sample reports based on these cubes (specifically some charts).

Any idea, how can we use these cubes as data source in the reports RS 2005. Can anyone guide us or point to the right direction, what are the steps to be followed here, like do we need to import these cubes into a 2005 database or can these be just copied in a folder and referred directly. basically where and how to start from.

Any suggestion or help is appreciated.

One good starting point might be this link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=f9b6e945-1f4c-4b7c-9c83-c6801f0576ff&DisplayLang=en

It is a rs 2000 sample that uses cubes. I hope this helps

Monday, March 12, 2012

Reports based on OLAP?

We have a large number of (Crystal) Reports ( based on Stor Proc ) running
against our OLTP database (SQL Server).
Instead of reports running against OLTP database I would like to create
Cubes and create production reports against them.
Is it possible to do that? Are there any client applications which allows to
create these types of reports? We don't need real time information.
Any help is greatly appreciated.Is it possible to do that?
--Yes
Are there any client applications which allows to create these types of
reports?
--Yes, you create the cubes in Analysis Services and you can use Excel Pivot
tables to connect, then if you are looking for more functionality and better
graphing capability you have a whole host of options. Search on google for
OLAP viewers, there's a bunch. I use ProClarity (www.proclarity.com )
You will want to look into using DTS to copy your data to a store where you
can build your cubes off.
HTH
Ray Higdon MCSE, MCDBA, CCNA
--
"Atul Mehta" <amehta@.oaktreecap.com> wrote in message
news:u%23ov$HCvDHA.1744@.TK2MSFTNGP12.phx.gbl...
quote:

> We have a large number of (Crystal) Reports ( based on Stor Proc ) running
> against our OLTP database (SQL Server).
> Instead of reports running against OLTP database I would like to create
> Cubes and create production reports against them.
> Is it possible to do that? Are there any client applications which allows

to
quote:

> create these types of reports? We don't need real time information.
> Any help is greatly appreciated.
>

Reports based off MDB

i have set up a report package that unfortunately uses an MDB as the
datasource (it will be upsized to SQL server soon); however, when any user
attempts to view/generate the reports they get the following error:
Reporting Services Error
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot create a connection to data source 'Accreditations_DB'.
(rsErrorOpeningConnection) Get Online Help
Unspecified error
The report(s) run fine off my test machine (i am the admin for the report
server).
any suggestions?
thanks,
benYou could put the MDB on a share and set that path in your connection
string. Or every user can have the MDB in the same path on each of their
local machines.
--
| Thread-Topic: Reports based off MDB
| thread-index: AcWXcPgArs6cX3IkSE6p/O0qCf3ZDQ==| X-WBNR-Posting-Host: 205.210.222.129
| From: =?Utf-8?B?QmVu?= <ben_1_ AT hotmail DOT com>
| Subject: Reports based off MDB
| Date: Tue, 2 Aug 2005 07:46:30 -0700
| Lines: 17
| Message-ID: <2C049966-34CD-4AEC-98D8-F24B6FB91CDD@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:49442
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| i have set up a report package that unfortunately uses an MDB as the
| datasource (it will be upsized to SQL server soon); however, when any
user
| attempts to view/generate the reports they get the following error:
|
| Reporting Services Error
| An error has occurred during report processing. (rsProcessingAborted) Get
| Online Help
| Cannot create a connection to data source 'Accreditations_DB'.
| (rsErrorOpeningConnection) Get Online Help
| Unspecified error
|
| The report(s) run fine off my test machine (i am the admin for the report
| server).
|
| any suggestions?
| thanks,
| ben
||||Both those options are options that we are trying to avoid. I think it has
something to do with credentials because i stored my login and pass in the
datasource and checked the "impersonate" option and that seemed to work.
""Brad Syputa - MS"" wrote:
> You could put the MDB on a share and set that path in your connection
> string. Or every user can have the MDB in the same path on each of their
> local machines.
> --
> | Thread-Topic: Reports based off MDB
> | thread-index: AcWXcPgArs6cX3IkSE6p/O0qCf3ZDQ==> | X-WBNR-Posting-Host: 205.210.222.129
> | From: =?Utf-8?B?QmVu?= <ben_1_ AT hotmail DOT com>
> | Subject: Reports based off MDB
> | Date: Tue, 2 Aug 2005 07:46:30 -0700
> | Lines: 17
> | Message-ID: <2C049966-34CD-4AEC-98D8-F24B6FB91CDD@.microsoft.com>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.sqlserver.reportingsvcs
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:49442
> | X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
> |
> | i have set up a report package that unfortunately uses an MDB as the
> | datasource (it will be upsized to SQL server soon); however, when any
> user
> | attempts to view/generate the reports they get the following error:
> |
> | Reporting Services Error
> | An error has occurred during report processing. (rsProcessingAborted) Get
> | Online Help
> | Cannot create a connection to data source 'Accreditations_DB'.
> | (rsErrorOpeningConnection) Get Online Help
> | Unspecified error
> |
> | The report(s) run fine off my test machine (i am the admin for the report
> | server).
> |
> | any suggestions?
> | thanks,
> | ben
> |
>

Friday, March 9, 2012

Reports

Hi,

I am generating a report based on certain criterias. Each task may report something. As of now I have created a report table and inserting data from each task into that.

At final stage I order the records and write to a txt file.The table I am using to insert is present in one of the database I'm using.

Is there any way I can store it a common repository [ I have to insert recs from diff dataflow task ]. At final stage group and sort it. Load into a text file?

Any Ideas?

I'm not quite sure what you are trying to do here but it seems as though you ultimately want to insert into a single table from multiple places.

Is that correct? If so, what difficulties are you having in achieving this?

-Jamie

ReportManager is faster than ReportServer-why?

I have a report based on a stored procedure. The procedure runs very fast
from Query Analyzer. The Report I build from it runs a little slower
in "Preview", I assume due to the Grouping I am doing. It takes about 1 sec.
Then when I move it to production and view it through ReportManager is it
slower,
maybe 3 sec. I wish I knew why.
But when I run it via URL from Reportserver, like this:
http://serveripname/Reportserver?/InstructorReports/AdminListAll"
it runs a couple of seconds slower yet.
Does anyone know why the rendor time isn't the same in all 3 cases?
thanks,
VinceUsing instructions on
http://msdn.microsoft.com/library/en-us/rsadmin/htm/arp_rslogfiles_v1_88gy.asp,
you should be able to pull down ExecutionLog details for analysis. This
will let you look at each report exeuciton to see if there really is any
difference in data retrieval, processing and render times. After you use DTS
to pull down the RS Execution Log details, run SELECT * FROM
[RSExecutionLog].[dbo].[ExecutionLogs] within Query Analyzer to look for
differences.
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"thomsonDeveloper" <thomsonDeveloper@.discussions.microsoft.com> wrote in
message news:434FE938-0D45-4527-923E-8E007C930F5C@.microsoft.com...
>I have a report based on a stored procedure. The procedure runs very fast
> from Query Analyzer. The Report I build from it runs a little slower
> in "Preview", I assume due to the Grouping I am doing. It takes about 1
> sec.
> Then when I move it to production and view it through ReportManager is it
> slower,
> maybe 3 sec. I wish I knew why.
> But when I run it via URL from Reportserver, like this:
> http://serveripname/Reportserver?/InstructorReports/AdminListAll"
> it runs a couple of seconds slower yet.
> Does anyone know why the rendor time isn't the same in all 3 cases?
> thanks,
> Vince
>

ReportItems data value displays in first page header only

I am using ReportItems in the header of a report to reference the data field
for the id of the report (based on a request in our application that
represents the value of the call_id field). This value only displays on the
first page of the report - no subsequent pages. Often the data in other
fields can be quite large (20 to 100 pages when rendered in PDF).
It is because the header is "looking" for that field value on every page -
and it only appears towards the top of the report. I verified this by moving
the data field to the bottom of the report - and then the value only appears
on the last page of the report.
I want this data to appear in the header of every page.
I have tried the following in the header:
=First(ReportItems!callid.value)
=ReportItems!callid.value
Any ideas?
Thanks for your help.
CoryMove the item into the body of the report and it should work...using First()
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Cory" <Cory@.discussions.microsoft.com> wrote in message
news:BD7AD9E4-F18D-4136-AFBC-CBB37FD221CF@.microsoft.com...
>I am using ReportItems in the header of a report to reference the data
>field
> for the id of the report (based on a request in our application that
> represents the value of the call_id field). This value only displays on
> the
> first page of the report - no subsequent pages. Often the data in other
> fields can be quite large (20 to 100 pages when rendered in PDF).
> It is because the header is "looking" for that field value on every page -
> and it only appears towards the top of the report. I verified this by
> moving
> the data field to the bottom of the report - and then the value only
> appears
> on the last page of the report.
> I want this data to appear in the header of every page.
> I have tried the following in the header:
> =First(ReportItems!callid.value)
> =ReportItems!callid.value
> Any ideas?
> Thanks for your help.
> Cory
>|||Wayne, just sent you an email. Not sure how often you check your email.
Check it out when you have a chance.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:e5GNpSvjFHA.3144@.TK2MSFTNGP12.phx.gbl...
> Move the item into the body of the report and it should work...using
> First()
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Cory" <Cory@.discussions.microsoft.com> wrote in message
> news:BD7AD9E4-F18D-4136-AFBC-CBB37FD221CF@.microsoft.com...
>>I am using ReportItems in the header of a report to reference the data
>>field
>> for the id of the report (based on a request in our application that
>> represents the value of the call_id field). This value only displays on
>> the
>> first page of the report - no subsequent pages. Often the data in other
>> fields can be quite large (20 to 100 pages when rendered in PDF).
>> It is because the header is "looking" for that field value on every
>> page -
>> and it only appears towards the top of the report. I verified this by
>> moving
>> the data field to the bottom of the report - and then the value only
>> appears
>> on the last page of the report.
>> I want this data to appear in the header of every page.
>> I have tried the following in the header:
>> =First(ReportItems!callid.value)
>> =ReportItems!callid.value
>> Any ideas?
>> Thanks for your help.
>> Cory
>|||Hi Wayne,
That is what I have - The item that is being referenced is in the body of
the report - and uses first to retrieve the data from the database... and the
reportitems reference in the header I've tried both first and no prefix...
But the reportitems reference in the header only appears on the same page
that the item being referenced appears.
So, if I have the body item on the 5th page then the header displays the
value on the 5th page. If on the 20th page then it will appear there and so
on.
Thanks again for your help.
--Cory
"Wayne Snyder" wrote:
> Move the item into the body of the report and it should work...using First()
> --
> Wayne Snyder MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> (Please respond only to the newsgroup.)
> I support the Professional Association for SQL Server ( PASS) and it's
> community of SQL Professionals.
> "Cory" <Cory@.discussions.microsoft.com> wrote in message
> news:BD7AD9E4-F18D-4136-AFBC-CBB37FD221CF@.microsoft.com...
> >I am using ReportItems in the header of a report to reference the data
> >field
> > for the id of the report (based on a request in our application that
> > represents the value of the call_id field). This value only displays on
> > the
> > first page of the report - no subsequent pages. Often the data in other
> > fields can be quite large (20 to 100 pages when rendered in PDF).
> >
> > It is because the header is "looking" for that field value on every page -
> > and it only appears towards the top of the report. I verified this by
> > moving
> > the data field to the bottom of the report - and then the value only
> > appears
> > on the last page of the report.
> >
> > I want this data to appear in the header of every page.
> >
> > I have tried the following in the header:
> > =First(ReportItems!callid.value)
> > =ReportItems!callid.value
> >
> > Any ideas?
> >
> > Thanks for your help.
> >
> > Cory
> >
>
>|||Hi Cory,
I have the same problem, can you please help me if you got the solution.
Thanks in advance.
"Cory" wrote:
> I am using ReportItems in the header of a report to reference the data field
> for the id of the report (based on a request in our application that
> represents the value of the call_id field). This value only displays on the
> first page of the report - no subsequent pages. Often the data in other
> fields can be quite large (20 to 100 pages when rendered in PDF).
> It is because the header is "looking" for that field value on every page -
> and it only appears towards the top of the report. I verified this by moving
> the data field to the bottom of the report - and then the value only appears
> on the last page of the report.
> I want this data to appear in the header of every page.
> I have tried the following in the header:
> =First(ReportItems!callid.value)
> =ReportItems!callid.value
> Any ideas?
> Thanks for your help.
> Cory
>|||Hi. No unfortunately nobody did respond with a really helpful suggestion.
However, I did find something elsewhere where someone suggested grabbing the
value and then setting it as a report parameter which supposedly can be
displayed on every page.
I haven't yet had time to test it though... as I've been pulled in a
different direction.
If you should happen to find something - or if someone else has a good
suggestion I'd love to hear it!
Thanks.
--Cory
"Anitha Naidu" wrote:
> Hi Cory,
> I have the same problem, can you please help me if you got the solution.
> Thanks in advance.
>
>
> "Cory" wrote:
> > I am using ReportItems in the header of a report to reference the data field
> > for the id of the report (based on a request in our application that
> > represents the value of the call_id field). This value only displays on the
> > first page of the report - no subsequent pages. Often the data in other
> > fields can be quite large (20 to 100 pages when rendered in PDF).
> >
> > It is because the header is "looking" for that field value on every page -
> > and it only appears towards the top of the report. I verified this by moving
> > the data field to the bottom of the report - and then the value only appears
> > on the last page of the report.
> >
> > I want this data to appear in the header of every page.
> >
> > I have tried the following in the header:
> > =First(ReportItems!callid.value)
> > =ReportItems!callid.value
> >
> > Any ideas?
> >
> > Thanks for your help.
> >
> > Cory
> >

Wednesday, March 7, 2012

Reporting Svcs - stored procedure

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