Showing posts with label procedure. Show all posts
Showing posts with label procedure. Show all posts

Wednesday, March 28, 2012

Reportviewer Control (from VS 2005, in conjunction with SQL Reporting Services)

I have a report (stored procedure) that I have set up in SQL 2005 Reporting Services. I've designed this report (using SQL server business intelligence studio), and several other reports, thinking that running totals or summing may be the issue, but it hasn't been. The latest iteration has been just a display of product info, about 100 records, no fields formatted or summed. Very very simple, straight-forward report. If I go to the Report server & upload the rdl file, it displays fine, performs as it should, paging & exporting - everything works fine. The issue comes up when in a web app, I put a Reportviewer control on the page, and call the report.

It works, sort of.

Originally, I had written the page using ASP.NET AJAX Enabled web project, and I had been using the Tab Container on the page. What happens is when I open it on that tab (I am using AJAX Tab panels, which had been working fine without this behavior prior to finally getting the reportviewer working), and the report displays, the "e" on Internet explorer at the top of the tab now flickers, like the page is reloading. It also runs the CPU up to 100% on the computer and although I can go from tab to tab in it (I am using AJAX tab panels in the page), it will take like up to a minute to go to the next tab. I'm not doing anything really data-intensive on those tabs, and they had been functioning fine prior to putting in the report viewer (i.e. they weren't flickering & clocking the CPU).

Thinking that the Tab Container may be the issue, I created just a plain AJAX Enabled web project and put the same reportviewer on it. Same performance. It'll display the report, and then take the system up to 100% and stay there until I kill the browser.

After that, I did just a plain old ASP.Net web project and put the report viewer control on it. Same result. The report will display, but as soon as it does, the "e" on Internet Explorer tab starts flickering and you see the CPU go to 100% and stay there. I've left it for 20-30 minutes with no change. It appears as if the page is constantly refreshing.

Thinking that the issue may be related to having the reportviewer report hard coded in the app, I put a button on the page, and assigned the button to put in the report. It displays, but it again runs the CPU up to 100% and stays there.

I thought that having Asynch = True (run the report asynchronously) might be the issue, but setting it to false made no difference.

I eventually have to kill the page to do anything, because it has the system up to 100%.

The code I am using on this page follows:

Here's the code in the codefile:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Me.ReportViewer1.Visible = False
End If
ReportViewer1.ServerReport.ReportPath = ""

End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
ReportViewer1.Visible = True
ReportViewer1.ServerReport.ReportPath = "/BA10listing"

End Sub

The code in the aspx part of the page:

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>

<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="400px" ProcessingMode="Remote" Width="400px" AsyncRendering="False" ShowDocumentMapButton="False">
<ServerReport ReportPath="/BA10listing" ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
</rsweb:ReportViewer>
&nbsp;

</div>
</form>
</body>
</html>

.... so you can see there's a lot going on here. The report returns ~100 records or so, no calculations, no summation, no grand totals. Basically a "nothing" report, just listing product info data.

In SQL Reporting Services in the web browser, this report displays fine, no problems. It's only when I call it from the Reportviewer inside a web page that it hangs.

Any idea why reportviewer might make this act this way?

My system is running Windows XP, VS 2005, I have both SQL 2000 and SQL 2005 on this same box. I have a server that has both SQL 2000 & SQL 2005 on it as well, and the behavior is the same for both, whether I run the web page with the Reportviewer control on it with the report being on the local system, or the remote system.

Any help or advice would be very much appreciated.

Thanks!!!

SC

Is this your thread?

http://aspalliance.com/groups/microsoft_public_dotnet_framework_aspnet/ng-1328888_ASP_Net_ReportingServices_CPU_Usage.aspx

|||Greg - yes it is.

I was following Bruce L-C [MVP]'s suggestion:

"I suggest posting this to the web based forums. I know the other MVP hangs out there and he has used this control a lot. I suggest putting reportviewer control in the subject. http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1

-- Bruce Loehle-Conger MVP SQL Server Reporting Services"

I had combined several of the things I tried into one post.

SC

|||

I think there is a page refresh time interval on the report viewer. You may have set that to a small amount of time therefore causing the report to refresh itself very frequently.

I'll see if I can dig up where that is.

|||

On the report properties screen -> general tab see if you have autorefresh checked and if yes then is it set to a very small number of seconds?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1886298&SiteID=1

|||If I go to the web page: SQL Server Reporting Services:

http://mycomputer/Reports$SQL20005 and go to the Properties link, on the General tab, the only checkbox I see is "Hide in list view" which is not checked.

On the Data Sources link:
Custom data source is selected, Connection type is Microsoft SQL Server, and it has the connection string for it. Connect Using is set to Credentials Stored Securely in the Report Server. Nothing else is checked or selected.

On the Execution Link:
Always Run this report with the most recent data is selected.
Do Not Cache temporary copies of this report
and under Report Execution Timeout, Use the System Default Setting is selected.

On History link:
Allow report history to be created manually is selected
and under the Select Number of Snapshots to keep, Use Default Setting is selected.

On the Security tab, there are 2 groups of users, one is Builtin\Administrators, and the other is me.

If you're talking about the Reportviewer properties, the only timer number I see is the Timeout number, which is 60000.

If I go back in to the VS 2005 (SQL Server Business Intelligence Development Studio), there is an Autorefresh property there, that's set to 0.

Assuming that's the one you're referring to, is there a way to disable that, to make it a static report? I'm going to set it to a large number & see if that makes any difference.

SC

|||

Schatham wrote:

If I go back in to the VS 2005 (SQL Server Business Intelligence Development Studio), there is an Autorefresh property there, that's set to 0.

Assuming that's the one you're referring to, is there a way to disable that, to make it a static report? I'm going to set it to a large number & see if that makes any difference.

SC

Either uncheck the box so that there is no autorefresh or set it to a large number. I have a feeling that setting that to zero will actually make the page refresh every .00000000000001 seconds and this is the thrashing that you are seeing.

|||I made the change, changing the setting from 0 to 10000. It says that that is in seconds, which 10,000 should be plenty. However, when I call it from the reportviewer, it still does not seem to make any difference.

I cannot find a way to set that same property from within the web application.

SC
|||

So you think it is report viewer? Do other reports do the same thing in report viewer?|||This is in the Report designer (SQL Server Business Intelligence Development Studio), where I'm looking at the report, in design & preview mode. There isn't a checkbox to enable or disable it, Autorefresh is just a property underneath MISC (properties of Report), where you can populate Author, Description, etc. I'm looking at the BA10listing.rdl That's an XML file with my query and the formatting in it.

SC
|||

http://i55.photobucket.com/albums/g121/Farsight38/report.jpg

This is the autorefresh I was referring to. What is this value set to?

|||I had edited that report and set it to 10,000. It had been 0.

When the 10,000 didn't appear to make any difference, I visited the link you sent, and went in to that. In there Autorefresh was checked, and the value showed 10,000. I unchecked it, rebuilt the report and uploaded BA10listing.rdl into SQL Server Reporting Services. Displayed it there to confirm it worked, then re-ran the ASP.Net web page with the Reportviewer control in it.

The reportviewer web control still behaved the same way. As soon as the report was generated, the CPU on that instance of Internet Explorer then zooms up to between 90-100% and stays there.

At this point, I don't know if its some sort of issue between the Reportviewer AND the .rdl report or what exactly it is.

This is the 3rd or 4th report I've tried to do. All of them were either more complex or returned more data than this one, but all have performed the same way.

SC
|||

Have you tried using a different internet browser like firefox or netscape? There is some variable in this equation that just isn't quite right. I suspect it is the report viewer.

|||I've tried it in Firefox.

Although the formatting of the data isn't quite right (it collapses all the columns up next to each other), it displays & you can page back & forth thru the document. It doesn't "spike" the CPU & hold it at or near 100%.

I'm not sure what settings to check inside ReportViewer (the web control in VS 2005). None of them "obviously" lend themselves to be a refresh setting.

SC
|||

What version of Internet Explorer are you using? Have you tried uninstalling and installing the latest version?

ReportViewer control - load parameter

Using Reporting Services in VS.Net 2005 (very much a newbie, though not a
newbie to ASP.Net)
I have a report which runs a Stored Procedure, requiring a parameter -
BudgetID -
In this particular case I just created an ASP.Net page (content page), and I
add a reportViewer control - the wizard picks up my report and creates an
ObjectDataSource, and assigns the report, but nothing is done or asked about
the BudgetID -
I found a reference on the web (in 2004) which showed that I could do
something like this in code:
ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
alue);
So I thought I could do something like this in the page load event - but it
doesn't like the SetqueryParameter method - and searching through all the
properties and methods, I can't seem to find anything like this.
Could someone please shed some light on this for me, please?You need to create an array of
Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
for your report. Then call
ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
Devin
Elmo Watson wrote:
> Using Reporting Services in VS.Net 2005 (very much a newbie, though not a
> newbie to ASP.Net)
> I have a report which runs a Stored Procedure, requiring a parameter -
> BudgetID -
> In this particular case I just created an ASP.Net page (content page), and I
> add a reportViewer control - the wizard picks up my report and creates an
> ObjectDataSource, and assigns the report, but nothing is done or asked about
> the BudgetID -
> I found a reference on the web (in 2004) which showed that I could do
> something like this in code:
> ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> alue);
> So I thought I could do something like this in the page load event - but it
> doesn't like the SetqueryParameter method - and searching through all the
> properties and methods, I can't seem to find anything like this.
> Could someone please shed some light on this for me, please?|||Please excuse my newbie-ness, but can you explain how to do that?
I've created Arrays from strings before, but I've tried several things, and
it's just not working
"Devin" <dlosee@.granitelp.com> wrote in message
news:1161276979.601948.215490@.i3g2000cwc.googlegroups.com...
> You need to create an array of
> Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
> for your report. Then call
> ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
> Devin
> Elmo Watson wrote:
> > Using Reporting Services in VS.Net 2005 (very much a newbie, though not
a
> > newbie to ASP.Net)
> > I have a report which runs a Stored Procedure, requiring a parameter -
> > BudgetID -
> >
> > In this particular case I just created an ASP.Net page (content page),
and I
> > add a reportViewer control - the wizard picks up my report and creates
an
> > ObjectDataSource, and assigns the report, but nothing is done or asked
about
> > the BudgetID -
> > I found a reference on the web (in 2004) which showed that I could do
> > something like this in code:
> >
ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> > alue);
> >
> > So I thought I could do something like this in the page load event - but
it
> > doesn't like the SetqueryParameter method - and searching through all
the
> > properties and methods, I can't seem to find anything like this.
> >
> > Could someone please shed some light on this for me, please?
>|||No problem. Basically it's the same as other arrays. Here's what I
have:
Here are the properties for the report viewer control (these can be
changed based on preferences, but here's what I have):
<rsweb:ReportViewer
ID="ReportViewer1"
runat="server"
Height="100%"
Width="100%"
ProcessingMode="Remote"
ShowBackButton="False"
ShowDocumentMapButton="False"
ShowParameterPrompts="False"
ShowPromptAreaButton="False"
BorderColor="Black"
BorderWidth="1px" >
<ServerReport ReportServerUrl="http://SERVER_NAME/ReportServer" />
</rsweb:ReportViewer>
Here is the code for either the OnLoad of the report viewer page or the
OnClick (if you have the params and report viewer on the same form) of
the button for viewing the report:
Dim params As Microsoft.Reporting.WebForms.ReportParameter()
ReDim params(1)
params(0) = New Microsoft.Reporting.WebForms.ReportParameter(
PARAM_1_NAME, PARAM_1_VALUE)
params(1) = New Microsoft.Reporting.WebForms.ReportParameter(
PARAM_2_NAME, PARAM_2_VALUE)
With ReportViewer1.ServerReport
.ReportPath = "/REPORT_FOLDER/REPORT_NAME"
.SetParameters(params)
.Refresh()
End With
There are problems when your report server and website the report
viewer control is on are on 2 separate servers. There's something with
a double hop. I haven't looked too much into this as mine are both on
the same server. If yours are on 2 different servers, you may want to
google the double hop problem (if you are getting security errors).
If you want to get really fancy, you can use inheritance for all of
your parameter forms and then have 1 report viewer form. If that is a
direction you want to take, let me know and I'll post how I did it
(there are many ways, inheritance is just the way I chose).
Elmo Watson wrote:
> Please excuse my newbie-ness, but can you explain how to do that?
> I've created Arrays from strings before, but I've tried several things, and
> it's just not working
>
> "Devin" <dlosee@.granitelp.com> wrote in message
> news:1161276979.601948.215490@.i3g2000cwc.googlegroups.com...
> > You need to create an array of
> > Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
> > for your report. Then call
> > ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
> >
> > Devin
> >
> > Elmo Watson wrote:
> > > Using Reporting Services in VS.Net 2005 (very much a newbie, though not
> a
> > > newbie to ASP.Net)
> > > I have a report which runs a Stored Procedure, requiring a parameter -
> > > BudgetID -
> > >
> > > In this particular case I just created an ASP.Net page (content page),
> and I
> > > add a reportViewer control - the wizard picks up my report and creates
> an
> > > ObjectDataSource, and assigns the report, but nothing is done or asked
> about
> > > the BudgetID -
> > > I found a reference on the web (in 2004) which showed that I could do
> > > something like this in code:
> > >
> ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> > > alue);
> > >
> > > So I thought I could do something like this in the page load event - but
> it
> > > doesn't like the SetqueryParameter method - and searching through all
> the
> > > properties and methods, I can't seem to find anything like this.
> > >
> > > Could someone please shed some light on this for me, please?
> >

Wednesday, March 21, 2012

Reports With MySql

I have mySql DB , i am using ODBC connection to render my reports, i can not view the dataset fields if its a stored Procedure, i am able to do it with a query with no parameters, is it some thing related to the mysql driverTake a look at
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=364085&SiteID=1

Tuesday, March 20, 2012

Reports run automatically w/ Allow Null parameters?

I wrote a stored procedure with two paramters, both of which are nullable but
both should not be null at the same time... it is either one or the other...
if both are null then I return an error from the stored procedure.
So now I am making the report to use this stored procedure.
When I click the "Allow null value" checkbox for both report parameters, the
report run automatically without waiting for the user to click the "View
Report" button! This creates a situation where if the user navigates to the
report using the Report Manager web application, then it will always first
give an error and then the user can enter a value and re-execute the report.
Is there some way to ALLOW null but not ASSUME null? I would like the user
to see the textbox for typing the parameter values and also see the unchecked
boxes for nulls.
PS: Both report parameters currently have the "None" as their default value.I have the exact same problem. Anyone find a solution for this?
"Al" wrote:
> I wrote a stored procedure with two paramters, both of which are nullable but
> both should not be null at the same time... it is either one or the other...
> if both are null then I return an error from the stored procedure.
> So now I am making the report to use this stored procedure.
> When I click the "Allow null value" checkbox for both report parameters, the
> report run automatically without waiting for the user to click the "View
> Report" button! This creates a situation where if the user navigates to the
> report using the Report Manager web application, then it will always first
> give an error and then the user can enter a value and re-execute the report.
> Is there some way to ALLOW null but not ASSUME null? I would like the user
> to see the textbox for typing the parameter values and also see the unchecked
> boxes for nulls.
> PS: Both report parameters currently have the "None" as their default value.
>

Reports on a stored procedure result-set instead of table

Hi all,
Is it possible to run reports on stored procedure result-set instead of a
table or view? If so, how can it be done.
AviOn Nov 25, 9:26 am, "Avi" <m...@.m.com> wrote:
> Hi all,
> Is it possible to run reports on stored procedure result-set instead of a
> table or view? If so, how can it be done.
> Avi
Yes. If you are using the Report Wizard, first use the main query in
the stored procedure to get you started and then once you have
finished creating the report, select the Data tab and change the
'Command type:' from 'Text' to 'StoredProcedure' and replace the query
in the window with the stored procedure name. Then select the Refresh
button and exclamation point (!) to run it. The Report Wizard was just
created this way (most likely due to the query having a set number of
columns and structure and a stored procedure not having this until it
is ran). Otherwise, the same kind of process can be used if the report
has already been created. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Don't forget to set your parameters if your stored proc has any. To do so,
go to the parameters tab in the edit dataset window.
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:4d7d840c-981f-4d61-985f-29ee99d75df9@.l1g2000hsa.googlegroups.com...
> On Nov 25, 9:26 am, "Avi" <m...@.m.com> wrote:
>> Hi all,
>> Is it possible to run reports on stored procedure result-set instead of a
>> table or view? If so, how can it be done.
>> Avi
>
> Yes. If you are using the Report Wizard, first use the main query in
> the stored procedure to get you started and then once you have
> finished creating the report, select the Data tab and change the
> 'Command type:' from 'Text' to 'StoredProcedure' and replace the query
> in the window with the stored procedure name. Then select the Refresh
> button and exclamation point (!) to run it. The Report Wizard was just
> created this way (most likely due to the query having a set number of
> columns and structure and a stored procedure not having this until it
> is ran). Otherwise, the same kind of process can be used if the report
> has already been created. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant|||If you use temp tables here is a handy list on how to write your SP to use
temp tables in a RS compatible way:
1. Click on the refresh fields button (to the right of the ...) if your
field list is not showing up.
2. Do not use set nocount on
3. Do not explicitly drop the temp tables. Let the temp tables just fall out
of scope. SQL Server will properly dispose of them when they are no longer
needed. I think people explicitly drop them due to habit. Most likely at one
time it was the proper thing to do. It is not necessary and if you drop them
then stored procedures will not work with RS.
4. Have your last statement be a select
If none of these work then add Set FMTONLY Off (the below is from Simon
Sabin a SQL Server MVP). Here is his explanation: "The issue with RS is that
the rowset of the SP is defined by calling the SP with SET FMTONLY ON
because Temp tables don't get created if you select from the temp table the
metadata from the rowset can't be returned. This can be worked around by
turning FMTONLY OFF in the SP."
I have found this to only be an issue when you create a temp table in your
stored procedure that is then filled with data from another stored
procedure.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Avi" <m@.m.com> wrote in message news:fic421$8h3$1@.news2.netvision.net.il...
> Hi all,
> Is it possible to run reports on stored procedure result-set instead of a
> table or view? If so, how can it be done.
> Avi
>

Friday, March 9, 2012

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
>

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