Showing posts with label dataset. Show all posts
Showing posts with label dataset. Show all posts

Friday, March 30, 2012

Multivalue parameter textbox size

Hi,

In my report,I have multivalue parameter for this parameter the Available values are from the Dataset.Suppose the dataset contains Names like this:

'AL - Alabama Center (Tuscaloosa)',

'AL - Regional Control Center (Birmingham)',

'AR - Arkansas & Rock)',

'Arizona Department of Health'

But my problem is the Multivalue parameter TextBox is of fixed size.Now i want the size of the text box to the size of the name which is of length long in the Name.

Whether it is possible or not.

How to achieve this.

The size of the parameter area is not configurable. You can modify some of the style properties of the report viewer by following the instructions here: http://msdn2.microsoft.com/en-us/library/ms345247.aspx, there is just no way to set the size of the input boxes.|||

Sorry for high jacking this post but I can’t find any other reference to this issue.

I heard a rumour that this would be fixer in SQL Server 2005 SP2, is this the case?This issue is a real thorn in my side with constant user moaning.

Multivalue parameter textbox size

Hi,

In my report,I have multivalue parameter for this parameter the Available values are from the Dataset.Suppose the dataset contains Names like this:

'AL - Alabama Center (Tuscaloosa)',

'AL - Regional Control Center (Birmingham)',

'AR - Arkansas & Rock)',

'Arizona Department of Health'

But my problem is the Multivalue parameter TextBox is of fixed size.Now i want the size of the text box to the size of the name which is of length long in the Name.

Whether it is possible or not.

How to achieve this.

The size of the parameter area is not configurable. You can modify some of the style properties of the report viewer by following the instructions here: http://msdn2.microsoft.com/en-us/library/ms345247.aspx, there is just no way to set the size of the input boxes.|||

Sorry for high jacking this post but I can’t find any other reference to this issue.

I heard a rumour that this would be fixer in SQL Server 2005 SP2, is this the case?This issue is a real thorn in my side with constant user moaning.

Multi-Value parameter syntax error

I am new to reporting services...
I've created a report that uses a multi-value parameter based ona dataset
usign a simple select statement. It works fine when a single value is
selected, but when multiple values are selected returns the error Incorrect
Syntax near ','.
How can the report code be modified to pass multiple values with the correct
syntax?See my response to your other posting (which is basically, show us what you
did). My guess is you have an incorrect SQL statement OR you are not going
against SQL Server.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"StMaas" <StMaas@.discussions.microsoft.com> wrote in message
news:7342117C-9715-477F-A9F4-E748C2EA3A77@.microsoft.com...
>I am new to reporting services...
> I've created a report that uses a multi-value parameter based ona dataset
> usign a simple select statement. It works fine when a single value is
> selected, but when multiple values are selected returns the error
> Incorrect
> Syntax near ','.
> How can the report code be modified to pass multiple values with the
> correct
> syntax?
>

Multi-value parameter default values not working

I have a parameter that gets it's available values from a dataset.

I use this exact same data to populate the default values.

When I run the report, the available values get populated; however the default values are not being selected.

This works on other parameters on the same report. However, on this parameter, it is not working.

I have tried ltrim/rtrim (Been burned with that before when the field type is a char)

I change the data field in the query, without changing the parameter setup, and it works...

Here is my query:

Code Snippet

Select distinct
CityName

from dimHotel dH (NOLOCK)
Inner join factHotel fH (NOLOCK)
on dh.HotelKey = fH.HotelKey

Where dH.CityName <> ''
and dH.CityName is not null
and fH.ClientKey in (@.ClientID)

Order by CityName

The parameter is setup correctly, and matches the setup of another parameter on the same report that is working fine.

I have tried deleting the parameter and re-adding it. This did not work.

I also deleted and re-added the query. No luck.

Any ideas?

Thanks!!

Thanks

Ok, this is weird...

If I change the query to:

Code Snippet

Select distinct
Replace(CityName,'','') as CityName

It works fine.

If I do a lower or upper, it works fine.

Convert or l/rtrim do not work.

Anyone have any ideas?

At this point I am thinking that there is a character in one of the fields that shouldnt be in there... I am looking at that now.

BobP

|||

Ok, it's an intermittent problem.

Sometimes the replace works, sometimes it doesn't.

Still trying to figure out why...

Does anyone know if there are any characters that could be in the data field, and prevent the default parameters from populating?

Thanks

|||

This same query populates a multi value drop down on a totally different report and it does not work there, either.

I am thinking it is data related.

Can anyone think of a reason why the multi select drop down would be populated, but the defaults not be set?

There are only 360 rows, so it's not a row number issue.

Any ideas would be very welcomed.

Thanks

BobP

Multi-value parameter default values not working

I have a parameter that gets it's available values from a dataset.

I use this exact same data to populate the default values.

When I run the report, the available values get populated; however the default values are not being selected.

This works on other parameters on the same report. However, on this parameter, it is not working.

I have tried ltrim/rtrim (Been burned with that before when the field type is a char)

I change the data field in the query, without changing the parameter setup, and it works...

Here is my query:

Code Snippet

Select distinct
CityName

from dimHotel dH (NOLOCK)
Inner join factHotel fH (NOLOCK)
on dh.HotelKey = fH.HotelKey

Where dH.CityName <> ''
and dH.CityName is not null
and fH.ClientKey in (@.ClientID)

Order by CityName

The parameter is setup correctly, and matches the setup of another parameter on the same report that is working fine.

I have tried deleting the parameter and re-adding it. This did not work.

I also deleted and re-added the query. No luck.

Any ideas?

Thanks!!

Thanks

Ok, this is weird...

If I change the query to:

Code Snippet

Select distinct
Replace(CityName,'','') as CityName

It works fine.

If I do a lower or upper, it works fine.

Convert or l/rtrim do not work.

Anyone have any ideas?

At this point I am thinking that there is a character in one of the fields that shouldnt be in there... I am looking at that now.

BobP

|||

Ok, it's an intermittent problem.

Sometimes the replace works, sometimes it doesn't.

Still trying to figure out why...

Does anyone know if there are any characters that could be in the data field, and prevent the default parameters from populating?

Thanks

|||

This same query populates a multi value drop down on a totally different report and it does not work there, either.

I am thinking it is data related.

Can anyone think of a reason why the multi select drop down would be populated, but the defaults not be set?

There are only 360 rows, so it's not a row number issue.

Any ideas would be very welcomed.

Thanks

BobP

sql

Wednesday, March 28, 2012

Multiuser Databinding in SQL Server 2000?

Hi

I am developing one multi user application in windows environment using VC++ .NET with SQL Server 2000. How Can I create dataset for multi user data updating in my SQL Server 2000. Where I can get help and sample code?

Thanks

Jose

Jose,

The DataSet is an off-line data cache. The DataAdapter is used to submit the pending changes stored in the DataSet. In the DataAdapter's updating logic, you can specify your own concurrency options to control whether you want to use a "last in wins" approach with only the primary key column(s) in the WHERE clause, or use other columns in the WHERE clause to ensure you don't overwrite changes made by another user.

I hope this information proves helpful.

David Sceppa
ADO.NET Program Manager
Microsoft|||Hi

Thankyou for the nice explanation. One more question how can I write custom primary key value. for example (50710000001) like this. 5 is for year, 07 is for month, 10 is for place, and remaining is unique automatic generating number. How can I write program in SQL Server 2000.

Regards,
Jose

Multi-table DataSets in VS2005 SRS Report designer

Hi all,

I need to use a multi-table dataset as a datasource for my report items in a SRS2005 report.

But from designer, I can only see the first table.

Can any one tell me if it is possible to use multiple tables in a dataset for SRS report?

Thanks,

Samson

If the report is deployed to the server, you will need a custom data extension to support multi-table datasets, as demonstrated here. Alternatively, you can use the ReportViewer controls for local report rendering. Then you can bind the report to any table in the dataset, as explained here.

sql

MultiTable Dataset

First off let me say that some of this is very confusing as it would
appear that the MS SQL group and the ADO.NET group need to get together
to mesh their termonology a bit.
I have a program that uses ReportViewer. To this program I load up an
ADO.NET dataset that contains serveral tables. I also load in an RDLC
report file and display the resulting report.
Up until now this has worked great and I have gotten every report I
need worked out. To keep this simple lets go with something we all
know all so well. My ADO.NET dataset contains three tables:
Customers, Orders, Parts. Each one of them is related to the other.
How does one go about displaying a report that would appear as follows:
Customer 1
-Order 1
--Part 1
--Part 2
--Part 3
-Order 2
--Part 4
--Part 5
Customer 2
-Order3
etc...
I have tried numerous things and read a ton of different posts, but all
to no avail. I know I must be doing something wrong when it comes to
setting this up. There do not seem to be many examples with multiple
tables in a single ADO dataset. Unless I am just missing something.
Also, as an aside, why did MS decide to call each table in a Report a
dataset while a dataset in ADO.NET contains many different tables?
Any help would be greatly appreciated.
Thanks,
AdamYou have to made a Select woth Joins of Customer, Order, Part
So for each part you have one record with the data Customer and Order within.
Then you can group this records in the report and so on.
So you will have only one Resultset for this kind of Report.
OK, The naming-conventions in ReportViewer differs a little bit.
Maybe they will sit together for the next release ;-)
--
LG HOLAN
"akeroo" wrote:
> First off let me say that some of this is very confusing as it would
> appear that the MS SQL group and the ADO.NET group need to get together
> to mesh their termonology a bit.
> I have a program that uses ReportViewer. To this program I load up an
> ADO.NET dataset that contains serveral tables. I also load in an RDLC
> report file and display the resulting report.
> Up until now this has worked great and I have gotten every report I
> need worked out. To keep this simple lets go with something we all
> know all so well. My ADO.NET dataset contains three tables:
> Customers, Orders, Parts. Each one of them is related to the other.
> How does one go about displaying a report that would appear as follows:
> Customer 1
> -Order 1
> --Part 1
> --Part 2
> --Part 3
> -Order 2
> --Part 4
> --Part 5
> Customer 2
> -Order3
> etc...
> I have tried numerous things and read a ton of different posts, but all
> to no avail. I know I must be doing something wrong when it comes to
> setting this up. There do not seem to be many examples with multiple
> tables in a single ADO dataset. Unless I am just missing something.
> Also, as an aside, why did MS decide to call each table in a Report a
> dataset while a dataset in ADO.NET contains many different tables?
> Any help would be greatly appreciated.
> Thanks,
> Adam
>|||Although you can do it, this gets quite messy. The clean way (but it is more
difficult when operating in local mode with the viewer control) is to use
subreports.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"holan" <holan@.noemaol.noemail> wrote in message
news:FA17AF8F-0A21-4A92-BDB9-45A194502517@.microsoft.com...
> You have to made a Select woth Joins of Customer, Order, Part
> So for each part you have one record with the data Customer and Order
> within.
> Then you can group this records in the report and so on.
> So you will have only one Resultset for this kind of Report.
> OK, The naming-conventions in ReportViewer differs a little bit.
> Maybe they will sit together for the next release ;-)
> --
> LG HOLAN
>
> "akeroo" wrote:
>> First off let me say that some of this is very confusing as it would
>> appear that the MS SQL group and the ADO.NET group need to get together
>> to mesh their termonology a bit.
>> I have a program that uses ReportViewer. To this program I load up an
>> ADO.NET dataset that contains serveral tables. I also load in an RDLC
>> report file and display the resulting report.
>> Up until now this has worked great and I have gotten every report I
>> need worked out. To keep this simple lets go with something we all
>> know all so well. My ADO.NET dataset contains three tables:
>> Customers, Orders, Parts. Each one of them is related to the other.
>> How does one go about displaying a report that would appear as follows:
>> Customer 1
>> -Order 1
>> --Part 1
>> --Part 2
>> --Part 3
>> -Order 2
>> --Part 4
>> --Part 5
>> Customer 2
>> -Order3
>> etc...
>> I have tried numerous things and read a ton of different posts, but all
>> to no avail. I know I must be doing something wrong when it comes to
>> setting this up. There do not seem to be many examples with multiple
>> tables in a single ADO dataset. Unless I am just missing something.
>> Also, as an aside, why did MS decide to call each table in a Report a
>> dataset while a dataset in ADO.NET contains many different tables?
>> Any help would be greatly appreciated.
>> Thanks,
>> Adam
>>|||Thanks... I ended up going with subreports and it is working fine.
The joins were not quite going to work for me as my exact situation
wasn't an A to B to C relationship. It was an A-B A-C setup, which
means the joins would have ended up being A-B * C number of records and
that would have gotten really ugly.
thanks,
Adam

Monday, March 26, 2012

Multi-Select prompt from a query

Can I do a multi-select prompt from a dataset query as parameter in a
report?
PaulSql Server 2000 Reporting Services does not directly support this
functionality. It is on our wish list for inclusion in a future release.
However there is an solution to this post on the GotDotNet.com web site:
http://www.gotdotnet.com/Community/Resources/Default.aspx?AFXPath=/Resource%5b@.ResourceId='2E882C0A-8D2B-4EAD-81BE-8E66C0941A18'%5d
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul D. Fox" <pdfox99@.attbi.com> wrote in message
news:ejtGsSAcEHA.2408@.tk2msftngp13.phx.gbl...
> Can I do a multi-select prompt from a dataset query as parameter in a
> report?
> Paul
>

Multi-Select Parameters

I think I am really missing something here. I am trying to set up a
multi parameter dataset. I have read through all the postings and am
looking at the Wrox book SQL Server 2005 Reporting Services. It
states the following query will work
Select ProductSubcategoryId, [Name]
>From Production.ProductSubCategory
Where ProductSubCategoryID IN( @.ProductSubCategories )
so, I have created a SP on sql 2005 and set up @.ProductSubCategories as
a nvarchar(150)
I have turned the parameter on the RS side as multiselect and am
passing 2 values through to this SP
I have tried testing this just through sql management studio to no
avail.
What am I missing?What you are missing is a SQL Server thing. It is not a RS issue. You cannot
pass a string and use it in an in clause in a stored procedure. If you have
the below statement in the dataset (i.e. not calling a SP it will work).Here
is a previous post of mine on the subject:
What doesn't work has nothing really to do with RS but has to do with Stored
Procedures in SQL Server. You cannot do the following in a stored procedure.
Let's say you have a Parameter called @.MyParams
Now you can map that parameter to a multi-value parameter but if in your
stored procedure you try to do this:
select * from sometable where somefield in (@.MyParams)
It won't work. Try it. Create a stored procedure and try to pass a
multi-value parameter to the stored procedure. It won't work.
What you can do is to have a string parameter that is passed as a multivalue
parameter and then change the string into a table.
This technique was told to me by SQL Server MVP, Erland Sommarskog
For example I have done this
inner join charlist_to_table(@.STO,Default)f on b.sto = f.str
So note this is NOT an issue with RS, it is strictly a stored procedure
issue.
Here is the function:
CREATE FUNCTION charlist_to_table
(@.list ntext,
@.delimiter nchar(1) = N',')
RETURNS @.tbl TABLE (listpos int IDENTITY(1, 1) NOT NULL,
str varchar(4000),
nstr nvarchar(2000)) AS
BEGIN
DECLARE @.pos int,
@.textpos int,
@.chunklen smallint,
@.tmpstr nvarchar(4000),
@.leftover nvarchar(4000),
@.tmpval nvarchar(4000)
SET @.textpos = 1
SET @.leftover = ''
WHILE @.textpos <= datalength(@.list) / 2
BEGIN
SET @.chunklen = 4000 - datalength(@.leftover) / 2
SET @.tmpstr = @.leftover + substring(@.list, @.textpos, @.chunklen)
SET @.textpos = @.textpos + @.chunklen
SET @.pos = charindex(@.delimiter, @.tmpstr)
WHILE @.pos > 0
BEGIN
SET @.tmpval = ltrim(rtrim(left(@.tmpstr, @.pos - 1)))
INSERT @.tbl (str, nstr) VALUES(@.tmpval, @.tmpval)
SET @.tmpstr = substring(@.tmpstr, @.pos + 1, len(@.tmpstr))
SET @.pos = charindex(@.delimiter, @.tmpstr)
END
SET @.leftover = @.tmpstr
END
INSERT @.tbl(str, nstr) VALUES (ltrim(rtrim(@.leftover)),
ltrim(rtrim(@.leftover)))
RETURN
END
GO
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
<bysnyder@.hotmail.com> wrote in message
news:1166195712.306140.100760@.j72g2000cwa.googlegroups.com...
>I think I am really missing something here. I am trying to set up a
> multi parameter dataset. I have read through all the postings and am
> looking at the Wrox book SQL Server 2005 Reporting Services. It
> states the following query will work
>
> Select ProductSubcategoryId, [Name]
>>From Production.ProductSubCategory
> Where ProductSubCategoryID IN( @.ProductSubCategories )
> so, I have created a SP on sql 2005 and set up @.ProductSubCategories as
> a nvarchar(150)
> I have turned the parameter on the RS side as multiselect and am
> passing 2 values through to this SP
> I have tried testing this just through sql management studio to no
> avail.
> What am I missing?
>

Friday, March 23, 2012

multiplue UI Report Tables using exact same dataset ?

Is there an easier way to manage the table UI element on the report. For
example in my report I have a table for the header info and the data, the
data uses maybe 10 columns and we could be perhapps adding more columns
(fields) to it in the future. The header uses 4 columns. It's a pain
because everytime I add a column to the main report details I have to go up
and fix the header and merge the appropriate cells to get it back to 4 cells
in the header. Is there not a way to use multiple table elements but they
both use the same dataset,. When I say same dataset, I dont mean a copy of
the same dataset, I want it to use the same dataset without the query
running twice for each table.
You guys know what I mean?
Possible ?Sorry, I'm not sure what you mean!
Is the table header a seperate table from the 'data' table?
Are they using the same dataset or not?
If the header and data are in fact seperate tables, then why are you
doing it like that, you seem to be making extra work for yourself!
If two tables use the same dataset the query would only be run once.
Chris
D Witherspoon wrote:
> Is there an easier way to manage the table UI element on the report.
> For example in my report I have a table for the header info and the
> data, the data uses maybe 10 columns and we could be perhapps adding
> more columns (fields) to it in the future. The header uses 4
> columns. It's a pain because everytime I add a column to the main
> report details I have to go up and fix the header and merge the
> appropriate cells to get it back to 4 cells in the header. Is there
> not a way to use multiple table elements but they both use the same
> dataset,. When I say same dataset, I dont mean a copy of the same
> dataset, I want it to use the same dataset without the query running
> twice for each table.
> You guys know what I mean?
> Possible ?

Multiple-Parents

Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

For ex:

TABLE1

ID DATA

TABLE2

ID DATA

TABLE3

ID TABLETYPE TABLEID DATA

When TableTYPE is table1, TABLEID should be assigned ID from TAble1
and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

HananielI think you should create a "dummy" parent table, let's call it "D", having 1-1 relationships to Table1 and Table2 and then you should link Table3 to table "D"

Something like that:

Table D: - has a field D_Id, of "autonumber" type

Table1 has a 1-1 relationship with table D on D_Id

Table2 has a 1-1 relationship with table D on D_Id

D has a 1-M relationship with Table3, on D_Id as primary key (Table3 is the "Slave" table)

Maro

Originally posted by Hananiel
Can I have two different parents for the same child table in a dataset. The columns for which the relationships exist are the same:

For ex:

TABLE1

ID DATA

TABLE2

ID DATA

TABLE3

ID TABLETYPE TABLEID DATA

When TableTYPE is table1, TABLEID should be assigned ID from TAble1
and when TableTYPE is table2, TABLEID should be assigned ID from TABLE2

Is that possible. How can i get this behavior. The whole purpose of relationships is not constraint checking as much as assigning right ID values in a dataset.

Hananiel

Wednesday, March 21, 2012

Multiple Values Returned from Stored Proc

I need to return 2 values from a stroed proc. Can you have more than one
output parameters in a stored proc? If not, would bringing back a dataset b
e
better than two round trips to the database to get the 2 values I need?
--
Robert HillRobert wrote:
> I need to return 2 values from a stroed proc. Can you have more than
> one output parameters in a stored proc? If not, would bringing back
> a dataset be better than two round trips to the database to get the 2
> values I need?
Output variables are generally faster to return than generating a 1 row
result set. You can have more than one output parameter in a procedure.
I would tell you to determine if, in fact, the results should be
returned as a resultset or as output parameters. If you think that
additional values may need to be returned in the future or if you think
there might be a time when more than one row needs to be returned, it's
better to use a resultset so you don't have to mess with the interface
of the procedure.
David Gugick
Imceda Software
www.imceda.com|||I am using the Microsoft Application Block for DataAccess and I cannot find
a
suitable procedure to call to bring back two output parameters. If this is
correct, I will need to extend the Application Block to include a procedure
to do what it is I need. Is this correct?
"David Gugick" wrote:

> Robert wrote:
> Output variables are generally faster to return than generating a 1 row
> result set. You can have more than one output parameter in a procedure.
> I would tell you to determine if, in fact, the results should be
> returned as a resultset or as output parameters. If you think that
> additional values may need to be returned in the future or if you think
> there might be a time when more than one row needs to be returned, it's
> better to use a resultset so you don't have to mess with the interface
> of the procedure.
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||Robert wrote:
> I am using the Microsoft Application Block for DataAccess and I
> cannot find a suitable procedure to call to bring back two output
> parameters. If this is correct, I will need to extend the
> Application Block to include a procedure to do what it is I need. Is
> this correct?
>
I plead ignorance. I have never used the Microsoft Application Block for
DataAccess. I don't know how the object model looks. I assume it's a
high-level view of ADO.Net. Where do you define parameters for the
stored procedures. Make sure you're using the latest release, now called
the "Enterprise Library Patterns and Practices Library"
http://msdn.microsoft.com/library/d...li
b.asp
David Gugick
Imceda Software
www.imceda.com

Monday, March 12, 2012

Multiple Tables Inside a List

I have 3 tables inside a list, all of which use the same dataset. The
layout is something like this:
List
Table1
Table2
Table3
The List has a group defined on it, lets assume the grouped column is
named Entity. What I want when the report renders is this:
Table1 for Entity 1
Table2 for Entity 1
Table3 for Entity 1
Table1 for Entity 2
Table2 for Entity 2
Table3 for Entity 2
...but instead I get this:
Table1 for Entity1
Table1 for Entity2
Table2 for Entity1
Table2 for Entity2
Table3 for Entity1
Table3 for Entity2
I checked the RDL and confirmed that all 3 tables are part of the
List's ReportItems collection. All of the data is displaying
correctly. The list is just rendering the tables as if there were
three separate lists, instead of just one. I tried putting all three
tables inside a Rectangle, but it had no effect. The problem occurs in
Visual Studio, IE, and PDF layout.
This looks like a bug to me. I think it is reasonable to expect that
if I nest three sequential tables in a list, I should get repeating
groups of Table1 / Table2 / Table3 for each entity in the list. Am I
correct in that assumption? If anyone can suggest a workaround, I
would appreciate it.
TIAWell I confirmed the rendering engine can handle a simple case of
tables inside a list. I created a simple report with 3 tables inside a
list using AdventureWorks, and it worked as expected. Unfortunately my
real report rdl is over 10,000 lines long with multiple layers of
nested tables inside the tables inside the lists... so this could take
a while to debug.|||For posterity, in case anyone runs into this type of issue... There
was a left-over Group in the table, which was causing data to repeat.
I had copied the table into the list, intending to use the list for
grouping instead of a group expression within the table. I never
deleted the group. I discovered what was going on by looking at the
raw RDL. The list appears to be working well now.
On Sep 28, 5:05 pm, Chris Durkin <durki...@.gmail.com> wrote:
> Well I confirmed the rendering engine can handle a simple case of
> tables inside a list. I created a simple report with 3 tables inside a
> list using AdventureWorks, and it worked as expected. Unfortunately my
> real report rdl is over 10,000 lines long with multiple layers of
> nested tables inside the tables inside the lists... so this could take
> a while to debug.

Multiple Tables in XML Datasource

Hi,

I have an XML datasource that has multiple nodes at the same level. I need to retrieve contents of two nodes in a dataset. If I have an hierarchy, then I am able to get the information from two nodes. In the current data source, both the nodes are at the same level, without any relationship. I tried the following Query but it returns just the first node.

Please help me.

TIA.

Ashish


Query

<Query>

<ElementPath> root {}/ ReportDoc/ ResourceHeader/ ResourceUsage </ElementPath>


</Query>


XML Datasource

<?xml version="1.0" standalone="yes"?>
<root>
<xs:schema id="ReportDoc" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="ReportDoc" msdata:IsDataSet="true" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="ResourceHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyName" minOccurs="0" msdata:Ordinal="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="StrtDt1" type="xs:dateTime" minOccurs="0" msdata:Ordinal="1" />
<xs:element name="StrtDt2" type="xs:dateTime" minOccurs="0" msdata:Ordinal="2" />
<xs:element name="StrtDt3" type="xs:dateTime" minOccurs="0" msdata:Ordinal="3" />
<xs:element name="StrtDt4" type="xs:dateTime" minOccurs="0" msdata:Ordinal="4" />
<xs:element name="StrtDt5" type="xs:dateTime" minOccurs="0" msdata:Ordinal="5" />
<xs:element name="StrtDt6" type="xs:dateTime" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="StrtDt7" type="xs:dateTime" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="StrtDt8" type="xs:dateTime" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="StrtDt9" type="xs:dateTime" minOccurs="0" msdata:Ordinal="9" />
<xs:element name="StrtDt10" type="xs:dateTime" minOccurs="0" msdata:Ordinal="10" />
<xs:element name="StrtDt11" type="xs:dateTime" minOccurs="0" msdata:Ordinal="11" />
<xs:element name="StrtDt12" type="xs:dateTime" minOccurs="0" msdata:Ordinal="12" />
<xs:element name="WkHrs1" type="xs:decimal" minOccurs="0" msdata:Ordinal="13" />
<xs:element name="WkHrs2" type="xs:decimal" minOccurs="0" msdata:Ordinal="14" />
<xs:element name="WkHrs3" type="xs:decimal" minOccurs="0" msdata:Ordinal="15" />
<xs:element name="WkHrs4" type="xs:decimal" minOccurs="0" msdata:Ordinal="16" />
<xs:element name="WkHrs5" type="xs:decimal" minOccurs="0" msdata:Ordinal="17" />
<xs:element name="WkHrs6" type="xs:decimal" minOccurs="0" msdata:Ordinal="18" />
<xs:element name="WkHrs7" type="xs:decimal" minOccurs="0" msdata:Ordinal="19" />
<xs:element name="WkHrs8" type="xs:decimal" minOccurs="0" msdata:Ordinal="20" />
<xs:element name="WkHrs9" type="xs:decimal" minOccurs="0" msdata:Ordinal="21" />
<xs:element name="WkHrs10" type="xs:decimal" minOccurs="0" msdata:Ordinal="22" />
<xs:element name="WkHrs11" type="xs:decimal" minOccurs="0" msdata:Ordinal="23" />
<xs:element name="WkHrs12" type="xs:decimal" minOccurs="0" msdata:Ordinal="24" />
<xs:element name="TtlWkHrs1" type="xs:decimal" minOccurs="0" msdata:Ordinal="25" />
<xs:element name="TtlWkHrs2" type="xs:decimal" minOccurs="0" msdata:Ordinal="26" />
<xs:element name="TtlWkHrs3" type="xs:decimal" minOccurs="0" msdata:Ordinal="27" />
<xs:element name="TtlWkHrs4" type="xs:decimal" minOccurs="0" msdata:Ordinal="28" />
<xs:element name="TtlWkHrs5" type="xs:decimal" minOccurs="0" msdata:Ordinal="29" />
<xs:element name="TtlWkHrs6" type="xs:decimal" minOccurs="0" msdata:Ordinal="30" />
<xs:element name="TtlWkHrs7" type="xs:decimal" minOccurs="0" msdata:Ordinal="31" />
<xs:element name="TtlWkHrs8" type="xs:decimal" minOccurs="0" msdata:Ordinal="32" />
<xs:element name="TtlWkHrs9" type="xs:decimal" minOccurs="0" msdata:Ordinal="33" />
<xs:element name="TtlWkHrs10" type="xs:decimal" minOccurs="0" msdata:Ordinal="34" />
<xs:element name="TtlWkHrs11" type="xs:decimal" minOccurs="0" msdata:Ordinal="35" />
<xs:element name="TtlWkHrs12" type="xs:decimal" minOccurs="0" msdata:Ordinal="36" />
<xs:element name="UtilHours1" type="xs:decimal" minOccurs="0" msdata:Ordinal="37" />
<xs:element name="UtilHours2" type="xs:decimal" minOccurs="0" msdata:Ordinal="38" />
<xs:element name="UtilHours3" type="xs:decimal" minOccurs="0" msdata:Ordinal="39" />
<xs:element name="UtilHours4" type="xs:decimal" minOccurs="0" msdata:Ordinal="40" />
<xs:element name="UtilHours5" type="xs:decimal" minOccurs="0" msdata:Ordinal="41" />
<xs:element name="UtilHours6" type="xs:decimal" minOccurs="0" msdata:Ordinal="42" />
<xs:element name="UtilHours7" type="xs:decimal" minOccurs="0" msdata:Ordinal="43" />
<xs:element name="UtilHours8" type="xs:decimal" minOccurs="0" msdata:Ordinal="44" />
<xs:element name="UtilHours9" type="xs:decimal" minOccurs="0" msdata:Ordinal="45" />
<xs:element name="UtilHours10" type="xs:decimal" minOccurs="0" msdata:Ordinal="46" />
<xs:element name="UtilHours11" type="xs:decimal" minOccurs="0" msdata:Ordinal="47" />
<xs:element name="UtilHours12" type="xs:decimal" minOccurs="0" msdata:Ordinal="48" />
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="ResourceUsage">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyName" minOccurs="0" msdata:Ordinal="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SiteName" minOccurs="0" msdata:Ordinal="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrganizationID" minOccurs="0" msdata:Ordinal="2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrganizationName" minOccurs="0" msdata:Ordinal="3">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ResourceCode" minOccurs="0" msdata:Ordinal="4">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ResourceDesc" minOccurs="0" msdata:Ordinal="5">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Prd1" type="xs:decimal" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="Prd2" type="xs:decimal" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="Prd3" type="xs:decimal" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="Prd4" type="xs:decimal" minOccurs="0" msdata:Ordinal="9" />
<xs:element name="Prd5" type="xs:decimal" minOccurs="0" msdata:Ordinal="10" />
<xs:element name="Prd6" type="xs:decimal" minOccurs="0" msdata:Ordinal="11" />
<xs:element name="Prd7" type="xs:decimal" minOccurs="0" msdata:Ordinal="12" />
<xs:element name="Prd8" type="xs:decimal" minOccurs="0" msdata:Ordinal="13" />
<xs:element name="Prd9" type="xs:decimal" minOccurs="0" msdata:Ordinal="14" />
<xs:element name="Prd10" type="xs:decimal" minOccurs="0" msdata:Ordinal="15" />
<xs:element name="Prd11" type="xs:decimal" minOccurs="0" msdata:Ordinal="16" />
<xs:element name="Prd12" type="xs:decimal" minOccurs="0" msdata:Ordinal="17" />
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="ReportSummary">
<xs:complexType>
<xs:sequence>
<xs:element name="PrdId" type="xs:int" minOccurs="0" msdata:Ordinal="0" />
<xs:element name="StrtDt" type="xs:dateTime" minOccurs="0" msdata:Ordinal="1" />
<xs:element name="EndDate" type="xs:dateTime" minOccurs="0" msdata:Ordinal="2" />
<xs:element name="WkHrs" type="xs:decimal" minOccurs="0" msdata:Ordinal="3" />
<xs:element name="TtlWkHrs" type="xs:decimal" minOccurs="0" msdata:Ordinal="4" />
<xs:element name="UtilHours" type="xs:decimal" minOccurs="0" msdata:Ordinal="5" />
<xs:element name="GraphUtilized" type="xs:decimal" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="GraphAvailable" type="xs:decimal" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="GraphOverUtilized" type="xs:decimal" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="SiteURN" minOccurs="0" msdata:Ordinal="9">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="128" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

<ReportDoc>
<ResourceHeader>
<CompanyName>EPIS Software - US</CompanyName>
<StrtDt1>2004-11-07T00:00:00.0000000-06:00</StrtDt1>
<StrtDt2>2004-11-14T00:00:00.0000000-06:00</StrtDt2>
<StrtDt3>2004-11-21T00:00:00.0000000-06:00</StrtDt3>
<StrtDt4>2004-11-28T00:00:00.0000000-06:00</StrtDt4>
<StrtDt5>2004-12-05T00:00:00.0000000-06:00</StrtDt5>
<StrtDt6>2004-12-12T00:00:00.0000000-06:00</StrtDt6>
<StrtDt7>2004-12-19T00:00:00.0000000-06:00</StrtDt7>
<StrtDt8>2004-12-26T00:00:00.0000000-06:00</StrtDt8>
<StrtDt9>2005-01-02T00:00:00.0000000-06:00</StrtDt9>
<StrtDt10>2005-01-09T00:00:00.0000000-06:00</StrtDt10>
<StrtDt11>2005-01-16T00:00:00.0000000-06:00</StrtDt11>
<StrtDt12>2005-01-23T00:00:00.0000000-06:00</StrtDt12>
<WkHrs1>0</WkHrs1>
<WkHrs2>0</WkHrs2>
<WkHrs3>0</WkHrs3>
<WkHrs4>0</WkHrs4>
<WkHrs5>0</WkHrs5>
<WkHrs6>0</WkHrs6>
<WkHrs7>0</WkHrs7>
<WkHrs8>0</WkHrs8>
<WkHrs9>32</WkHrs9>
<WkHrs10>40</WkHrs10>
<WkHrs11>40</WkHrs11>
<WkHrs12>40</WkHrs12>
<TtlWkHrs1>0</TtlWkHrs1>
<TtlWkHrs2>0</TtlWkHrs2>
<TtlWkHrs3>0</TtlWkHrs3>
<TtlWkHrs4>0</TtlWkHrs4>
<TtlWkHrs5>0</TtlWkHrs5>
<TtlWkHrs6>0</TtlWkHrs6>
<TtlWkHrs7>0</TtlWkHrs7>
<TtlWkHrs8>0</TtlWkHrs8>
<TtlWkHrs9>32</TtlWkHrs9>
<TtlWkHrs10>40</TtlWkHrs10>
<TtlWkHrs11>40</TtlWkHrs11>
<TtlWkHrs12>40</TtlWkHrs12>
<UtilHours1>0</UtilHours1>
<UtilHours2>0</UtilHours2>
<UtilHours3>0</UtilHours3>
<UtilHours4>0</UtilHours4>
<UtilHours5>0</UtilHours5>
<UtilHours6>0</UtilHours6>
<UtilHours7>0</UtilHours7>
<UtilHours8>0</UtilHours8>
<UtilHours9>0</UtilHours9>
<UtilHours10>0</UtilHours10>
<UtilHours11>0</UtilHours11>
<UtilHours12>0</UtilHours12>
</ResourceHeader>
<ResourceUsage>
<CompanyName>EPIS Software - US</CompanyName>
<SiteName>US</SiteName>
<OrganizationID>10010001104</OrganizationID>
<OrganizationName>Executives - Irvine</OrganizationName>
<ResourceCode>EHILL</ResourceCode>
<ResourceDesc>Eu Hll</ResourceDesc>
<Prd1>0</Prd1>
<Prd2>0</Prd2>
<Prd3>0</Prd3>
<Prd4>0</Prd4>
<Prd5>0</Prd5>
<Prd6>0</Prd6>
<Prd7>0</Prd7>
<Prd8>0</Prd8>
<Prd9>0</Prd9>
<Prd10>0</Prd10>
<Prd11>0</Prd11>
<Prd12>0</Prd12>
</ResourceUsage>
<ReportSummary>
<CompanyName>EPIS Software - US</CompanyName>
<PrdId>1</PrdId>
<StrtDt>2004-11-07T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-14T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>2</PrdId>
<StrtDt>2004-11-14T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-21T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>3</PrdId>
<StrtDt>2004-11-21T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-28T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>4</PrdId>
<StrtDt>2004-11-28T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-05T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>5</PrdId>
<StrtDt>2004-12-05T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-12T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>6</PrdId>
<StrtDt>2004-12-12T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-19T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>7</PrdId>
<StrtDt>2004-12-19T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-26T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>8</PrdId>
<StrtDt>2004-12-26T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-02T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>9</PrdId>
<StrtDt>2005-01-02T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-09T00:00:00.0000000-06:00</EndDate>
<WkHrs>32</WkHrs>
<TtlWkHrs>32</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>10</PrdId>
<StrtDt>2005-01-09T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-16T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>11</PrdId>
<StrtDt>2005-01-16T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-23T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>12</PrdId>
<StrtDt>2005-01-23T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-30T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
</ReportDoc>
</root>


Any news on whether this is achievable with reporting services ?

I have a web service that returns a result in the form of

<Incident>

<Analysis/>

<Level/>

</Incident>

I have a report on Incident + Level that works. Now I need another report that has both Level and Analysis information along with Incident data. Any ideas ?

Multiple Tables in XML Datasource

Hi,

I have an XML datasource that has multiple nodes at the same level. I need to retrieve contents of two nodes in a dataset. If I have an hierarchy, then I am able to get the information from two nodes. In the current data source, both the nodes are at the same level, without any relationship. I tried the following Query but it returns just the first node.

Please help me.

TIA.

Ashish


Query

<Query>

<ElementPath> root {}/ ReportDoc/ ResourceHeader/ ResourceUsage </ElementPath>


</Query>


XML Datasource

<?xml version="1.0" standalone="yes"?>
<root>
<xs:schema id="ReportDoc" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="ReportDoc" msdata:IsDataSet="true" msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="ResourceHeader">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyName" minOccurs="0" msdata:Ordinal="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="StrtDt1" type="xs:dateTime" minOccurs="0" msdata:Ordinal="1" />
<xs:element name="StrtDt2" type="xs:dateTime" minOccurs="0" msdata:Ordinal="2" />
<xs:element name="StrtDt3" type="xs:dateTime" minOccurs="0" msdata:Ordinal="3" />
<xs:element name="StrtDt4" type="xs:dateTime" minOccurs="0" msdata:Ordinal="4" />
<xs:element name="StrtDt5" type="xs:dateTime" minOccurs="0" msdata:Ordinal="5" />
<xs:element name="StrtDt6" type="xs:dateTime" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="StrtDt7" type="xs:dateTime" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="StrtDt8" type="xs:dateTime" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="StrtDt9" type="xs:dateTime" minOccurs="0" msdata:Ordinal="9" />
<xs:element name="StrtDt10" type="xs:dateTime" minOccurs="0" msdata:Ordinal="10" />
<xs:element name="StrtDt11" type="xs:dateTime" minOccurs="0" msdata:Ordinal="11" />
<xs:element name="StrtDt12" type="xs:dateTime" minOccurs="0" msdata:Ordinal="12" />
<xs:element name="WkHrs1" type="xs:decimal" minOccurs="0" msdata:Ordinal="13" />
<xs:element name="WkHrs2" type="xs:decimal" minOccurs="0" msdata:Ordinal="14" />
<xs:element name="WkHrs3" type="xs:decimal" minOccurs="0" msdata:Ordinal="15" />
<xs:element name="WkHrs4" type="xs:decimal" minOccurs="0" msdata:Ordinal="16" />
<xs:element name="WkHrs5" type="xs:decimal" minOccurs="0" msdata:Ordinal="17" />
<xs:element name="WkHrs6" type="xs:decimal" minOccurs="0" msdata:Ordinal="18" />
<xs:element name="WkHrs7" type="xs:decimal" minOccurs="0" msdata:Ordinal="19" />
<xs:element name="WkHrs8" type="xs:decimal" minOccurs="0" msdata:Ordinal="20" />
<xs:element name="WkHrs9" type="xs:decimal" minOccurs="0" msdata:Ordinal="21" />
<xs:element name="WkHrs10" type="xs:decimal" minOccurs="0" msdata:Ordinal="22" />
<xs:element name="WkHrs11" type="xs:decimal" minOccurs="0" msdata:Ordinal="23" />
<xs:element name="WkHrs12" type="xs:decimal" minOccurs="0" msdata:Ordinal="24" />
<xs:element name="TtlWkHrs1" type="xs:decimal" minOccurs="0" msdata:Ordinal="25" />
<xs:element name="TtlWkHrs2" type="xs:decimal" minOccurs="0" msdata:Ordinal="26" />
<xs:element name="TtlWkHrs3" type="xs:decimal" minOccurs="0" msdata:Ordinal="27" />
<xs:element name="TtlWkHrs4" type="xs:decimal" minOccurs="0" msdata:Ordinal="28" />
<xs:element name="TtlWkHrs5" type="xs:decimal" minOccurs="0" msdata:Ordinal="29" />
<xs:element name="TtlWkHrs6" type="xs:decimal" minOccurs="0" msdata:Ordinal="30" />
<xs:element name="TtlWkHrs7" type="xs:decimal" minOccurs="0" msdata:Ordinal="31" />
<xs:element name="TtlWkHrs8" type="xs:decimal" minOccurs="0" msdata:Ordinal="32" />
<xs:element name="TtlWkHrs9" type="xs:decimal" minOccurs="0" msdata:Ordinal="33" />
<xs:element name="TtlWkHrs10" type="xs:decimal" minOccurs="0" msdata:Ordinal="34" />
<xs:element name="TtlWkHrs11" type="xs:decimal" minOccurs="0" msdata:Ordinal="35" />
<xs:element name="TtlWkHrs12" type="xs:decimal" minOccurs="0" msdata:Ordinal="36" />
<xs:element name="UtilHours1" type="xs:decimal" minOccurs="0" msdata:Ordinal="37" />
<xs:element name="UtilHours2" type="xs:decimal" minOccurs="0" msdata:Ordinal="38" />
<xs:element name="UtilHours3" type="xs:decimal" minOccurs="0" msdata:Ordinal="39" />
<xs:element name="UtilHours4" type="xs:decimal" minOccurs="0" msdata:Ordinal="40" />
<xs:element name="UtilHours5" type="xs:decimal" minOccurs="0" msdata:Ordinal="41" />
<xs:element name="UtilHours6" type="xs:decimal" minOccurs="0" msdata:Ordinal="42" />
<xs:element name="UtilHours7" type="xs:decimal" minOccurs="0" msdata:Ordinal="43" />
<xs:element name="UtilHours8" type="xs:decimal" minOccurs="0" msdata:Ordinal="44" />
<xs:element name="UtilHours9" type="xs:decimal" minOccurs="0" msdata:Ordinal="45" />
<xs:element name="UtilHours10" type="xs:decimal" minOccurs="0" msdata:Ordinal="46" />
<xs:element name="UtilHours11" type="xs:decimal" minOccurs="0" msdata:Ordinal="47" />
<xs:element name="UtilHours12" type="xs:decimal" minOccurs="0" msdata:Ordinal="48" />
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="ResourceUsage">
<xs:complexType>
<xs:sequence>
<xs:element name="CompanyName" minOccurs="0" msdata:Ordinal="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="SiteName" minOccurs="0" msdata:Ordinal="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrganizationID" minOccurs="0" msdata:Ordinal="2">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="OrganizationName" minOccurs="0" msdata:Ordinal="3">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ResourceCode" minOccurs="0" msdata:Ordinal="4">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ResourceDesc" minOccurs="0" msdata:Ordinal="5">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="30" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Prd1" type="xs:decimal" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="Prd2" type="xs:decimal" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="Prd3" type="xs:decimal" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="Prd4" type="xs:decimal" minOccurs="0" msdata:Ordinal="9" />
<xs:element name="Prd5" type="xs:decimal" minOccurs="0" msdata:Ordinal="10" />
<xs:element name="Prd6" type="xs:decimal" minOccurs="0" msdata:Ordinal="11" />
<xs:element name="Prd7" type="xs:decimal" minOccurs="0" msdata:Ordinal="12" />
<xs:element name="Prd8" type="xs:decimal" minOccurs="0" msdata:Ordinal="13" />
<xs:element name="Prd9" type="xs:decimal" minOccurs="0" msdata:Ordinal="14" />
<xs:element name="Prd10" type="xs:decimal" minOccurs="0" msdata:Ordinal="15" />
<xs:element name="Prd11" type="xs:decimal" minOccurs="0" msdata:Ordinal="16" />
<xs:element name="Prd12" type="xs:decimal" minOccurs="0" msdata:Ordinal="17" />
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="ReportSummary">
<xs:complexType>
<xs:sequence>
<xs:element name="PrdId" type="xs:int" minOccurs="0" msdata:Ordinal="0" />
<xs:element name="StrtDt" type="xs:dateTime" minOccurs="0" msdata:Ordinal="1" />
<xs:element name="EndDate" type="xs:dateTime" minOccurs="0" msdata:Ordinal="2" />
<xs:element name="WkHrs" type="xs:decimal" minOccurs="0" msdata:Ordinal="3" />
<xs:element name="TtlWkHrs" type="xs:decimal" minOccurs="0" msdata:Ordinal="4" />
<xs:element name="UtilHours" type="xs:decimal" minOccurs="0" msdata:Ordinal="5" />
<xs:element name="GraphUtilized" type="xs:decimal" minOccurs="0" msdata:Ordinal="6" />
<xs:element name="GraphAvailable" type="xs:decimal" minOccurs="0" msdata:Ordinal="7" />
<xs:element name="GraphOverUtilized" type="xs:decimal" minOccurs="0" msdata:Ordinal="8" />
<xs:element name="SiteURN" minOccurs="0" msdata:Ordinal="9">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="128" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
<xs:attribute name="action" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>

<ReportDoc>
<ResourceHeader>
<CompanyName>EPIS Software - US</CompanyName>
<StrtDt1>2004-11-07T00:00:00.0000000-06:00</StrtDt1>
<StrtDt2>2004-11-14T00:00:00.0000000-06:00</StrtDt2>
<StrtDt3>2004-11-21T00:00:00.0000000-06:00</StrtDt3>
<StrtDt4>2004-11-28T00:00:00.0000000-06:00</StrtDt4>
<StrtDt5>2004-12-05T00:00:00.0000000-06:00</StrtDt5>
<StrtDt6>2004-12-12T00:00:00.0000000-06:00</StrtDt6>
<StrtDt7>2004-12-19T00:00:00.0000000-06:00</StrtDt7>
<StrtDt8>2004-12-26T00:00:00.0000000-06:00</StrtDt8>
<StrtDt9>2005-01-02T00:00:00.0000000-06:00</StrtDt9>
<StrtDt10>2005-01-09T00:00:00.0000000-06:00</StrtDt10>
<StrtDt11>2005-01-16T00:00:00.0000000-06:00</StrtDt11>
<StrtDt12>2005-01-23T00:00:00.0000000-06:00</StrtDt12>
<WkHrs1>0</WkHrs1>
<WkHrs2>0</WkHrs2>
<WkHrs3>0</WkHrs3>
<WkHrs4>0</WkHrs4>
<WkHrs5>0</WkHrs5>
<WkHrs6>0</WkHrs6>
<WkHrs7>0</WkHrs7>
<WkHrs8>0</WkHrs8>
<WkHrs9>32</WkHrs9>
<WkHrs10>40</WkHrs10>
<WkHrs11>40</WkHrs11>
<WkHrs12>40</WkHrs12>
<TtlWkHrs1>0</TtlWkHrs1>
<TtlWkHrs2>0</TtlWkHrs2>
<TtlWkHrs3>0</TtlWkHrs3>
<TtlWkHrs4>0</TtlWkHrs4>
<TtlWkHrs5>0</TtlWkHrs5>
<TtlWkHrs6>0</TtlWkHrs6>
<TtlWkHrs7>0</TtlWkHrs7>
<TtlWkHrs8>0</TtlWkHrs8>
<TtlWkHrs9>32</TtlWkHrs9>
<TtlWkHrs10>40</TtlWkHrs10>
<TtlWkHrs11>40</TtlWkHrs11>
<TtlWkHrs12>40</TtlWkHrs12>
<UtilHours1>0</UtilHours1>
<UtilHours2>0</UtilHours2>
<UtilHours3>0</UtilHours3>
<UtilHours4>0</UtilHours4>
<UtilHours5>0</UtilHours5>
<UtilHours6>0</UtilHours6>
<UtilHours7>0</UtilHours7>
<UtilHours8>0</UtilHours8>
<UtilHours9>0</UtilHours9>
<UtilHours10>0</UtilHours10>
<UtilHours11>0</UtilHours11>
<UtilHours12>0</UtilHours12>
</ResourceHeader>
<ResourceUsage>
<CompanyName>EPIS Software - US</CompanyName>
<SiteName>US</SiteName>
<OrganizationID>10010001104</OrganizationID>
<OrganizationName>Executives - Irvine</OrganizationName>
<ResourceCode>EHILL</ResourceCode>
<ResourceDesc>Eu Hll</ResourceDesc>
<Prd1>0</Prd1>
<Prd2>0</Prd2>
<Prd3>0</Prd3>
<Prd4>0</Prd4>
<Prd5>0</Prd5>
<Prd6>0</Prd6>
<Prd7>0</Prd7>
<Prd8>0</Prd8>
<Prd9>0</Prd9>
<Prd10>0</Prd10>
<Prd11>0</Prd11>
<Prd12>0</Prd12>
</ResourceUsage>
<ReportSummary>
<CompanyName>EPIS Software - US</CompanyName>
<PrdId>1</PrdId>
<StrtDt>2004-11-07T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-14T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>2</PrdId>
<StrtDt>2004-11-14T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-21T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>3</PrdId>
<StrtDt>2004-11-21T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-11-28T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>4</PrdId>
<StrtDt>2004-11-28T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-05T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>5</PrdId>
<StrtDt>2004-12-05T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-12T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>6</PrdId>
<StrtDt>2004-12-12T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-19T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>7</PrdId>
<StrtDt>2004-12-19T00:00:00.0000000-06:00</StrtDt>
<EndDate>2004-12-26T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>8</PrdId>
<StrtDt>2004-12-26T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-02T00:00:00.0000000-06:00</EndDate>
<WkHrs>0</WkHrs>
<TtlWkHrs>0</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>9</PrdId>
<StrtDt>2005-01-02T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-09T00:00:00.0000000-06:00</EndDate>
<WkHrs>32</WkHrs>
<TtlWkHrs>32</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>10</PrdId>
<StrtDt>2005-01-09T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-16T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>11</PrdId>
<StrtDt>2005-01-16T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-23T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
<ReportSummary>
<PrdId>12</PrdId>
<StrtDt>2005-01-23T00:00:00.0000000-06:00</StrtDt>
<EndDate>2005-01-30T00:00:00.0000000-06:00</EndDate>
<WkHrs>40</WkHrs>
<TtlWkHrs>40</TtlWkHrs>
<UtilHours>0</UtilHours>
<GraphUtilized>0</GraphUtilized>
<GraphAvailable>0</GraphAvailable>
<GraphOverUtilized>0</GraphOverUtilized>
<SiteURN>US</SiteURN>
</ReportSummary>
</ReportDoc>
</root>


Any news on whether this is achievable with reporting services ?

I have a web service that returns a result in the form of

<Incident>

<Analysis/>

<Level/>

</Incident>

I have a report on Incident + Level that works. Now I need another report that has both Level and Analysis information along with Incident data. Any ideas ?

Multiple tables in the dataset

Hi,
I have a stored proc which returns multiple result sets. I think SSRS picks
up the first one by design. What's the best way forward, a data extension, or
is there a simpler way?
Thanks in advance,
Regards,
DattaYou need to split each result set into a uniqe dataset in RS. It can't
handle multiple result sets. Can you create new stored procedures from the
queries in the original one?
Kaisa M. Lindahl Lervik
"Datta" <Datta@.discussions.microsoft.com> wrote in message
news:F228B40A-B4B2-40A5-A243-F2573CFEBFC8@.microsoft.com...
> Hi,
> I have a stored proc which returns multiple result sets. I think SSRS
> picks
> up the first one by design. What's the best way forward, a data extension,
> or
> is there a simpler way?
> Thanks in advance,
> Regards,
> Datta|||Thanks, I suspected so.
I can split the procedures, but I think a custom data extension is the right
way to go, if there is no in-built support.
"Kaisa M. Lindahl Lervik" wrote:
> You need to split each result set into a uniqe dataset in RS. It can't
> handle multiple result sets. Can you create new stored procedures from the
> queries in the original one?
> Kaisa M. Lindahl Lervik
> "Datta" <Datta@.discussions.microsoft.com> wrote in message
> news:F228B40A-B4B2-40A5-A243-F2573CFEBFC8@.microsoft.com...
> > Hi,
> >
> > I have a stored proc which returns multiple result sets. I think SSRS
> > picks
> > up the first one by design. What's the best way forward, a data extension,
> > or
> > is there a simpler way?
> >
> > Thanks in advance,
> > Regards,
> > Datta
>
>

Multiple tables in same report?

Is it possible to use 2 tables in the same report with different dataset, but
able to pass one field as parameter from one table to the other one?
For example I have one table that has the field ITEM_ID and SALE. I have
another table that has the field TOTAL_COST. I want to use the ITEM_ID as
the parameter to get the TOTAL_COST in table 2. These 2 tables will be
aligned to look like one table.
Please help. Thanks in advance.Can't you do it in your storedprocedure?
I mean your storedprocedure returns your ITEM_ID and SALE and
TOTAL_COST(Grouped by ITEM_ID and SALE)?
HTH
ALI-R
"chang" <chang@.discussions.microsoft.com> wrote in message
news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> Is it possible to use 2 tables in the same report with different dataset,
but
> able to pass one field as parameter from one table to the other one?
> For example I have one table that has the field ITEM_ID and SALE. I have
> another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> aligned to look like one table.
> Please help. Thanks in advance.|||ALI-R thanks for responding. The problem with combining the 2 queries into
one stored procedure is a problem because the second query has more records
in it and does not output the intended data output. For example if I combine
the 2 queries, the TOTALCOST field tends to be higher because of more
records. If I do it separately and only use the ITEM_ID field as parameters
then I get the intended output for whatever ITEM_ID it is.
I already have the 2 queries created into 2 stored procedures. Here is what
the 2 queries looks like:
Stored Procedure 1:
SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
[SalesAmount]
FROM CUSTOMER INNER JOIN
CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
AND @.ENDDATE)
GROUP BY CUSTOMER.ITEM_ID
ORDER BY CUSTOMER.ITEM_ID
Stored Procedure 2:
SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
FROM INV_TRANSACTION
WHERE (TRANS_ID IN
(SELECT MAX(TRANS_ID)
FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
GROUP BY CUSTOMER.ORDER_ID))
The @.ITEMID parameter is to be use to reference the ITEMID field from
dataset 1 which is the stored procedure 1. I was able to do this
successfully by using a subreport and pass the ITEMID field from the main
report to the subreport to be use in the parameter @.ITEMID. The problem came
up when it was time to sum the TOTALCOST field in the subreport and display
it in the main report.
I heard that it might be possible to use 2 tables or more in the main report
and pass the field from one table to the other one via parameters. The
question is how would I do this?
"ALI-R" wrote:
> Can't you do it in your storedprocedure?
> I mean your storedprocedure returns your ITEM_ID and SALE and
> TOTAL_COST(Grouped by ITEM_ID and SALE)?
> HTH
> ALI-R
> "chang" <chang@.discussions.microsoft.com> wrote in message
> news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > Is it possible to use 2 tables in the same report with different dataset,
> but
> > able to pass one field as parameter from one table to the other one?
> >
> > For example I have one table that has the field ITEM_ID and SALE. I have
> > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > aligned to look like one table.
> >
> > Please help. Thanks in advance.
>
>|||You would have to use a subreport or have all the data returned by one STP.
You can have two datasets in one report but there is no way to link them
together.
Subreports are slow. I stuggled with this myself and ended up rewritting my
reporting STP's. It ends up that you return more data then needed but it in
one call to the DB unlike subreports (called STP for each detail). I would
create a table variable containing all the fields from both stp's, plus a
Flag field ie (1 = stp1, 2 = stp2), then populate the table from your
existing stp's, then in the report use the Flag fields in a table/list
Filter. Hope this helps, I dont like it either but just give yourself more
time to develop reports
"chang" wrote:
> ALI-R thanks for responding. The problem with combining the 2 queries into
> one stored procedure is a problem because the second query has more records
> in it and does not output the intended data output. For example if I combine
> the 2 queries, the TOTALCOST field tends to be higher because of more
> records. If I do it separately and only use the ITEM_ID field as parameters
> then I get the intended output for whatever ITEM_ID it is.
> I already have the 2 queries created into 2 stored procedures. Here is what
> the 2 queries looks like:
> Stored Procedure 1:
> SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
> [SalesAmount]
> FROM CUSTOMER INNER JOIN
> CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
> WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
> AND @.ENDDATE)
> GROUP BY CUSTOMER.ITEM_ID
> ORDER BY CUSTOMER.ITEM_ID
> Stored Procedure 2:
> SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
> FROM INV_TRANSACTION
> WHERE (TRANS_ID IN
> (SELECT MAX(TRANS_ID)
> FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
> WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
> CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
> AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
> GROUP BY CUSTOMER.ORDER_ID))
> The @.ITEMID parameter is to be use to reference the ITEMID field from
> dataset 1 which is the stored procedure 1. I was able to do this
> successfully by using a subreport and pass the ITEMID field from the main
> report to the subreport to be use in the parameter @.ITEMID. The problem came
> up when it was time to sum the TOTALCOST field in the subreport and display
> it in the main report.
> I heard that it might be possible to use 2 tables or more in the main report
> and pass the field from one table to the other one via parameters. The
> question is how would I do this?
> "ALI-R" wrote:
> > Can't you do it in your storedprocedure?
> >
> > I mean your storedprocedure returns your ITEM_ID and SALE and
> > TOTAL_COST(Grouped by ITEM_ID and SALE)?
> >
> > HTH
> > ALI-R
> >
> > "chang" <chang@.discussions.microsoft.com> wrote in message
> > news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > > Is it possible to use 2 tables in the same report with different dataset,
> > but
> > > able to pass one field as parameter from one table to the other one?
> > >
> > > For example I have one table that has the field ITEM_ID and SALE. I have
> > > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > > aligned to look like one table.
> > >
> > > Please help. Thanks in advance.
> >
> >
> >|||Kenwood, thanks for responding. I have created this with subreport as you
had done in the past also. It works great and yes very slow. The problem
came when trying to Sum the field and have it display in the main report.
I think what you suggested is probably what I need to do. I'm not really
clear with what you are describing though. If possible can you walk me
through what you are describing in detail? I'm new to SQL queries and
Reporting Services.
Let try to see if I can describe what you are recommending.
1) Create 1 stored procedure with temp table with the fields from my 2 old
stored procedure.
2) Create a Flag field for that temp table (not sure what flag field is).
3) Populate the temp table with my 2 stored procedure within the stored
procedure I created from step 1.
4) In reporting services use the flag fields in table/list filter
Not sure if this is what you meant, but if possible can you look at my 2
queries and provide a stored procedure example of what you described?
Thanks again.
"KENWOOD" wrote:
> You would have to use a subreport or have all the data returned by one STP.
> You can have two datasets in one report but there is no way to link them
> together.
> Subreports are slow. I stuggled with this myself and ended up rewritting my
> reporting STP's. It ends up that you return more data then needed but it in
> one call to the DB unlike subreports (called STP for each detail). I would
> create a table variable containing all the fields from both stp's, plus a
> Flag field ie (1 = stp1, 2 = stp2), then populate the table from your
> existing stp's, then in the report use the Flag fields in a table/list
> Filter. Hope this helps, I dont like it either but just give yourself more
> time to develop reports
> "chang" wrote:
> > ALI-R thanks for responding. The problem with combining the 2 queries into
> > one stored procedure is a problem because the second query has more records
> > in it and does not output the intended data output. For example if I combine
> > the 2 queries, the TOTALCOST field tends to be higher because of more
> > records. If I do it separately and only use the ITEM_ID field as parameters
> > then I get the intended output for whatever ITEM_ID it is.
> >
> > I already have the 2 queries created into 2 stored procedures. Here is what
> > the 2 queries looks like:
> >
> > Stored Procedure 1:
> >
> > SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
> > [SalesAmount]
> > FROM CUSTOMER INNER JOIN
> > CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
> > WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
> > AND @.ENDDATE)
> > GROUP BY CUSTOMER.ITEM_ID
> > ORDER BY CUSTOMER.ITEM_ID
> >
> > Stored Procedure 2:
> > SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
> > FROM INV_TRANSACTION
> > WHERE (TRANS_ID IN
> > (SELECT MAX(TRANS_ID)
> > FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
> > WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
> > CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
> > AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
> > GROUP BY CUSTOMER.ORDER_ID))
> >
> > The @.ITEMID parameter is to be use to reference the ITEMID field from
> > dataset 1 which is the stored procedure 1. I was able to do this
> > successfully by using a subreport and pass the ITEMID field from the main
> > report to the subreport to be use in the parameter @.ITEMID. The problem came
> > up when it was time to sum the TOTALCOST field in the subreport and display
> > it in the main report.
> >
> > I heard that it might be possible to use 2 tables or more in the main report
> > and pass the field from one table to the other one via parameters. The
> > question is how would I do this?
> >
> > "ALI-R" wrote:
> >
> > > Can't you do it in your storedprocedure?
> > >
> > > I mean your storedprocedure returns your ITEM_ID and SALE and
> > > TOTAL_COST(Grouped by ITEM_ID and SALE)?
> > >
> > > HTH
> > > ALI-R
> > >
> > > "chang" <chang@.discussions.microsoft.com> wrote in message
> > > news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > > > Is it possible to use 2 tables in the same report with different dataset,
> > > but
> > > > able to pass one field as parameter from one table to the other one?
> > > >
> > > > For example I have one table that has the field ITEM_ID and SALE. I have
> > > > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > > > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > > > aligned to look like one table.
> > > >
> > > > Please help. Thanks in advance.
> > >
> > >
> > >|||You understand what I meant, by flag field I just mean I a Field that you set
in your STP and use in the report design and not a field the user will see.
very simple SQL statement to get you started, It looks like you know SQL well
enough to make it work. Hope this helps.
DECLARE @.myTempTable TABLE(a_field_1 int, a_field_2 int, a_field_3 int,
SelectID varchar(10))
INSERT INTO @.myTempTable(a_field_1,a_field_2,SelectID) VALUES (1,1,'Select1')
INSERT INTO @.myTempTable(a_field_3,SelectID) VALUES (2,'Select2')
SELECT * FROM @.myTempTable
Then in the report you filter on SelectID (Fields!SelectID.Value ='Select1') and it is like you have two datasets. Which is what your after
correct?
"chang" wrote:
> Kenwood, thanks for responding. I have created this with subreport as you
> had done in the past also. It works great and yes very slow. The problem
> came when trying to Sum the field and have it display in the main report.
> I think what you suggested is probably what I need to do. I'm not really
> clear with what you are describing though. If possible can you walk me
> through what you are describing in detail? I'm new to SQL queries and
> Reporting Services.
> Let try to see if I can describe what you are recommending.
> 1) Create 1 stored procedure with temp table with the fields from my 2 old
> stored procedure.
> 2) Create a Flag field for that temp table (not sure what flag field is).
> 3) Populate the temp table with my 2 stored procedure within the stored
> procedure I created from step 1.
> 4) In reporting services use the flag fields in table/list filter
> Not sure if this is what you meant, but if possible can you look at my 2
> queries and provide a stored procedure example of what you described?
> Thanks again.
> "KENWOOD" wrote:
> > You would have to use a subreport or have all the data returned by one STP.
> > You can have two datasets in one report but there is no way to link them
> > together.
> > Subreports are slow. I stuggled with this myself and ended up rewritting my
> > reporting STP's. It ends up that you return more data then needed but it in
> > one call to the DB unlike subreports (called STP for each detail). I would
> > create a table variable containing all the fields from both stp's, plus a
> > Flag field ie (1 = stp1, 2 = stp2), then populate the table from your
> > existing stp's, then in the report use the Flag fields in a table/list
> > Filter. Hope this helps, I dont like it either but just give yourself more
> > time to develop reports
> >
> > "chang" wrote:
> >
> > > ALI-R thanks for responding. The problem with combining the 2 queries into
> > > one stored procedure is a problem because the second query has more records
> > > in it and does not output the intended data output. For example if I combine
> > > the 2 queries, the TOTALCOST field tends to be higher because of more
> > > records. If I do it separately and only use the ITEM_ID field as parameters
> > > then I get the intended output for whatever ITEM_ID it is.
> > >
> > > I already have the 2 queries created into 2 stored procedures. Here is what
> > > the 2 queries looks like:
> > >
> > > Stored Procedure 1:
> > >
> > > SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
> > > [SalesAmount]
> > > FROM CUSTOMER INNER JOIN
> > > CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
> > > WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
> > > AND @.ENDDATE)
> > > GROUP BY CUSTOMER.ITEM_ID
> > > ORDER BY CUSTOMER.ITEM_ID
> > >
> > > Stored Procedure 2:
> > > SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
> > > FROM INV_TRANSACTION
> > > WHERE (TRANS_ID IN
> > > (SELECT MAX(TRANS_ID)
> > > FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
> > > WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
> > > CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
> > > AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
> > > GROUP BY CUSTOMER.ORDER_ID))
> > >
> > > The @.ITEMID parameter is to be use to reference the ITEMID field from
> > > dataset 1 which is the stored procedure 1. I was able to do this
> > > successfully by using a subreport and pass the ITEMID field from the main
> > > report to the subreport to be use in the parameter @.ITEMID. The problem came
> > > up when it was time to sum the TOTALCOST field in the subreport and display
> > > it in the main report.
> > >
> > > I heard that it might be possible to use 2 tables or more in the main report
> > > and pass the field from one table to the other one via parameters. The
> > > question is how would I do this?
> > >
> > > "ALI-R" wrote:
> > >
> > > > Can't you do it in your storedprocedure?
> > > >
> > > > I mean your storedprocedure returns your ITEM_ID and SALE and
> > > > TOTAL_COST(Grouped by ITEM_ID and SALE)?
> > > >
> > > > HTH
> > > > ALI-R
> > > >
> > > > "chang" <chang@.discussions.microsoft.com> wrote in message
> > > > news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > > > > Is it possible to use 2 tables in the same report with different dataset,
> > > > but
> > > > > able to pass one field as parameter from one table to the other one?
> > > > >
> > > > > For example I have one table that has the field ITEM_ID and SALE. I have
> > > > > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > > > > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > > > > aligned to look like one table.
> > > > >
> > > > > Please help. Thanks in advance.
> > > >
> > > >
> > > >|||Ken,
Thanks for the example. However I'm still having problems. Here's what I did.
CREATE PROCEDURE SP_TEMPTABLE
AS
DECLARE @.TEMPTABLE TABLE(CUSTOMER_CODE NVARCHAR(40), SALE_AMOUNT VARCHAR(30)
, COST VARCHAR(30))
INSERT INTO @.TEMPTABLE(CUSTOMER_CODE, [SALE AMOUNT])
Exec CW_PRODUCT
INSERT INTO @.TEMPTABLE(COST)
Exec CW_TOTALCOST
SELECT * FROM @.TEMPTABLE
Here's the error that I'm getting:
"EXECUTE cannot be used as a source when inserting into a table variable."
I'm not clear with the example that you provided. I understand that you
created a temp table and insert some values that you put in. And for the
flag field it's Select1 and Select2. The question is how would I use my
stored procedures that I created to use with a 3rd stored procedure as a temp
table that you described.
"KENWOOD" wrote:
> You understand what I meant, by flag field I just mean I a Field that you set
> in your STP and use in the report design and not a field the user will see.
> very simple SQL statement to get you started, It looks like you know SQL well
> enough to make it work. Hope this helps.
> DECLARE @.myTempTable TABLE(a_field_1 int, a_field_2 int, a_field_3 int,
> SelectID varchar(10))
> INSERT INTO @.myTempTable(a_field_1,a_field_2,SelectID) VALUES (1,1,'Select1')
> INSERT INTO @.myTempTable(a_field_3,SelectID) VALUES (2,'Select2')
> SELECT * FROM @.myTempTable
>
> Then in the report you filter on SelectID (Fields!SelectID.Value => 'Select1') and it is like you have two datasets. Which is what your after
> correct?
>
> "chang" wrote:
> > Kenwood, thanks for responding. I have created this with subreport as you
> > had done in the past also. It works great and yes very slow. The problem
> > came when trying to Sum the field and have it display in the main report.
> >
> > I think what you suggested is probably what I need to do. I'm not really
> > clear with what you are describing though. If possible can you walk me
> > through what you are describing in detail? I'm new to SQL queries and
> > Reporting Services.
> >
> > Let try to see if I can describe what you are recommending.
> >
> > 1) Create 1 stored procedure with temp table with the fields from my 2 old
> > stored procedure.
> >
> > 2) Create a Flag field for that temp table (not sure what flag field is).
> >
> > 3) Populate the temp table with my 2 stored procedure within the stored
> > procedure I created from step 1.
> >
> > 4) In reporting services use the flag fields in table/list filter
> >
> > Not sure if this is what you meant, but if possible can you look at my 2
> > queries and provide a stored procedure example of what you described?
> >
> > Thanks again.
> >
> > "KENWOOD" wrote:
> >
> > > You would have to use a subreport or have all the data returned by one STP.
> > > You can have two datasets in one report but there is no way to link them
> > > together.
> > > Subreports are slow. I stuggled with this myself and ended up rewritting my
> > > reporting STP's. It ends up that you return more data then needed but it in
> > > one call to the DB unlike subreports (called STP for each detail). I would
> > > create a table variable containing all the fields from both stp's, plus a
> > > Flag field ie (1 = stp1, 2 = stp2), then populate the table from your
> > > existing stp's, then in the report use the Flag fields in a table/list
> > > Filter. Hope this helps, I dont like it either but just give yourself more
> > > time to develop reports
> > >
> > > "chang" wrote:
> > >
> > > > ALI-R thanks for responding. The problem with combining the 2 queries into
> > > > one stored procedure is a problem because the second query has more records
> > > > in it and does not output the intended data output. For example if I combine
> > > > the 2 queries, the TOTALCOST field tends to be higher because of more
> > > > records. If I do it separately and only use the ITEM_ID field as parameters
> > > > then I get the intended output for whatever ITEM_ID it is.
> > > >
> > > > I already have the 2 queries created into 2 stored procedures. Here is what
> > > > the 2 queries looks like:
> > > >
> > > > Stored Procedure 1:
> > > >
> > > > SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
> > > > [SalesAmount]
> > > > FROM CUSTOMER INNER JOIN
> > > > CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
> > > > WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
> > > > AND @.ENDDATE)
> > > > GROUP BY CUSTOMER.ITEM_ID
> > > > ORDER BY CUSTOMER.ITEM_ID
> > > >
> > > > Stored Procedure 2:
> > > > SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
> > > > FROM INV_TRANSACTION
> > > > WHERE (TRANS_ID IN
> > > > (SELECT MAX(TRANS_ID)
> > > > FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
> > > > WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
> > > > CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
> > > > AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
> > > > GROUP BY CUSTOMER.ORDER_ID))
> > > >
> > > > The @.ITEMID parameter is to be use to reference the ITEMID field from
> > > > dataset 1 which is the stored procedure 1. I was able to do this
> > > > successfully by using a subreport and pass the ITEMID field from the main
> > > > report to the subreport to be use in the parameter @.ITEMID. The problem came
> > > > up when it was time to sum the TOTALCOST field in the subreport and display
> > > > it in the main report.
> > > >
> > > > I heard that it might be possible to use 2 tables or more in the main report
> > > > and pass the field from one table to the other one via parameters. The
> > > > question is how would I do this?
> > > >
> > > > "ALI-R" wrote:
> > > >
> > > > > Can't you do it in your storedprocedure?
> > > > >
> > > > > I mean your storedprocedure returns your ITEM_ID and SALE and
> > > > > TOTAL_COST(Grouped by ITEM_ID and SALE)?
> > > > >
> > > > > HTH
> > > > > ALI-R
> > > > >
> > > > > "chang" <chang@.discussions.microsoft.com> wrote in message
> > > > > news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > > > > > Is it possible to use 2 tables in the same report with different dataset,
> > > > > but
> > > > > > able to pass one field as parameter from one table to the other one?
> > > > > >
> > > > > > For example I have one table that has the field ITEM_ID and SALE. I have
> > > > > > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > > > > > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > > > > > aligned to look like one table.
> > > > > >
> > > > > > Please help. Thanks in advance.
> > > > >
> > > > >
> > > > >|||Ken,
I tried playing with it all day yesterday and still no luck. Here's what I
got so far, but when I try running it from Reporting Services, it doesn't
work:
CREATE PROC CW_PRODUCT_TEMP
@.STARTDATE NVARCHAR(10),
@.ENDDATE NVARCHAR(10)
AS
INSERT INTO #TempTable1
SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS [Sale Amount]
FROM CUSTOMER INNER JOIN
CUSTOMER_SALE ON CUSTOMER.ITEM_ID =CUSTOMER_SALE.ITEM_ID
WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.SHIPPED_DATE BETWEEN
@.STARTDATE AND @.ENDDATE)
GROUP BY CUSTOMER.ITEM_ID
ORDER BY CUSTOMER.ITEM_ID
INSERT INTO #TempTable2
SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
FROM INV_TRANSACTION
WHERE (TRANS_ID IN
(SELECT MAX(trans_id)
FROM customer, inv_transaction,
customer_sale
WHERE customer.cust_order_id =INVENTORY_TRANS.order_id AND customer_sale.order_id =
customer.order_id AND
customer.line_no =inv_transaction.order_no AND inv_transaction.type = 'O' AND
inv_transaction.class ='I' AND customer.item_id = #TempTable1.item_id AND
(customer.shipped_date BETWEEN @.startdate and @.enddate)
GROUP BY customer.CUST_ORDER_ID,
customer.LINE_NO))
SELECT * FROM #TempTable2, #TempTable1
WHERE #TempTable2.item_id = #TempTable1.item_id
Error that i'm getting is:
"Invalid object name '#TempTable1'"
Please advise.
Thanks again.
"chang" wrote:
> Ken,
> Thanks for the example. However I'm still having problems. Here's what I did.
> CREATE PROCEDURE SP_TEMPTABLE
> AS
> DECLARE @.TEMPTABLE TABLE(CUSTOMER_CODE NVARCHAR(40), SALE_AMOUNT VARCHAR(30)
> , COST VARCHAR(30))
> INSERT INTO @.TEMPTABLE(CUSTOMER_CODE, [SALE AMOUNT])
> Exec CW_PRODUCT
> INSERT INTO @.TEMPTABLE(COST)
> Exec CW_TOTALCOST
> SELECT * FROM @.TEMPTABLE
> Here's the error that I'm getting:
> "EXECUTE cannot be used as a source when inserting into a table variable."
> I'm not clear with the example that you provided. I understand that you
> created a temp table and insert some values that you put in. And for the
> flag field it's Select1 and Select2. The question is how would I use my
> stored procedures that I created to use with a 3rd stored procedure as a temp
> table that you described.
>
> "KENWOOD" wrote:
> > You understand what I meant, by flag field I just mean I a Field that you set
> > in your STP and use in the report design and not a field the user will see.
> > very simple SQL statement to get you started, It looks like you know SQL well
> > enough to make it work. Hope this helps.
> >
> > DECLARE @.myTempTable TABLE(a_field_1 int, a_field_2 int, a_field_3 int,
> > SelectID varchar(10))
> >
> > INSERT INTO @.myTempTable(a_field_1,a_field_2,SelectID) VALUES (1,1,'Select1')
> > INSERT INTO @.myTempTable(a_field_3,SelectID) VALUES (2,'Select2')
> >
> > SELECT * FROM @.myTempTable
> >
> >
> > Then in the report you filter on SelectID (Fields!SelectID.Value => > 'Select1') and it is like you have two datasets. Which is what your after
> > correct?
> >
> >
> >
> > "chang" wrote:
> >
> > > Kenwood, thanks for responding. I have created this with subreport as you
> > > had done in the past also. It works great and yes very slow. The problem
> > > came when trying to Sum the field and have it display in the main report.
> > >
> > > I think what you suggested is probably what I need to do. I'm not really
> > > clear with what you are describing though. If possible can you walk me
> > > through what you are describing in detail? I'm new to SQL queries and
> > > Reporting Services.
> > >
> > > Let try to see if I can describe what you are recommending.
> > >
> > > 1) Create 1 stored procedure with temp table with the fields from my 2 old
> > > stored procedure.
> > >
> > > 2) Create a Flag field for that temp table (not sure what flag field is).
> > >
> > > 3) Populate the temp table with my 2 stored procedure within the stored
> > > procedure I created from step 1.
> > >
> > > 4) In reporting services use the flag fields in table/list filter
> > >
> > > Not sure if this is what you meant, but if possible can you look at my 2
> > > queries and provide a stored procedure example of what you described?
> > >
> > > Thanks again.
> > >
> > > "KENWOOD" wrote:
> > >
> > > > You would have to use a subreport or have all the data returned by one STP.
> > > > You can have two datasets in one report but there is no way to link them
> > > > together.
> > > > Subreports are slow. I stuggled with this myself and ended up rewritting my
> > > > reporting STP's. It ends up that you return more data then needed but it in
> > > > one call to the DB unlike subreports (called STP for each detail). I would
> > > > create a table variable containing all the fields from both stp's, plus a
> > > > Flag field ie (1 = stp1, 2 = stp2), then populate the table from your
> > > > existing stp's, then in the report use the Flag fields in a table/list
> > > > Filter. Hope this helps, I dont like it either but just give yourself more
> > > > time to develop reports
> > > >
> > > > "chang" wrote:
> > > >
> > > > > ALI-R thanks for responding. The problem with combining the 2 queries into
> > > > > one stored procedure is a problem because the second query has more records
> > > > > in it and does not output the intended data output. For example if I combine
> > > > > the 2 queries, the TOTALCOST field tends to be higher because of more
> > > > > records. If I do it separately and only use the ITEM_ID field as parameters
> > > > > then I get the intended output for whatever ITEM_ID it is.
> > > > >
> > > > > I already have the 2 queries created into 2 stored procedures. Here is what
> > > > > the 2 queries looks like:
> > > > >
> > > > > Stored Procedure 1:
> > > > >
> > > > > SELECT DISTINCT CUSTOMER.ITEM_ID, SUM(CUSTOMER.AMOUNT) AS
> > > > > [SalesAmount]
> > > > > FROM CUSTOMER INNER JOIN
> > > > > CUSTOMER_SALE ON CUSTOMER.ORDER_ID = CUSTOMER_SALE.ORDER_ID
> > > > > WHERE (CUSTOMER.ITEM_ID IS NOT NULL) AND (CUSTOMER.DATE BETWEEN @.STARTDATE
> > > > > AND @.ENDDATE)
> > > > > GROUP BY CUSTOMER.ITEM_ID
> > > > > ORDER BY CUSTOMER.ITEM_ID
> > > > >
> > > > > Stored Procedure 2:
> > > > > SELECT SUM(MAT_COST + LAB_COST + BUR_COST + SER_COST) AS [Total Cost]
> > > > > FROM INV_TRANSACTION
> > > > > WHERE (TRANS_ID IN
> > > > > (SELECT MAX(TRANS_ID)
> > > > > FROM CUSTOMER, INV_TRANSACTION, CUSTOMER_SALE
> > > > > WHERE CUSTOMER.ORDER_ID = INV_TRANSACTION.ORDER_ID AND
> > > > > CUSTOMER_SALE.ORDER_ID = CUSTOMER.ORDER_ID AND CUSTOMER.ITEM_ID = @.ITEMID
> > > > > AND (CUSTOMER.DATE BETWEEN @.STARTDATE AND @.ENDDATE)
> > > > > GROUP BY CUSTOMER.ORDER_ID))
> > > > >
> > > > > The @.ITEMID parameter is to be use to reference the ITEMID field from
> > > > > dataset 1 which is the stored procedure 1. I was able to do this
> > > > > successfully by using a subreport and pass the ITEMID field from the main
> > > > > report to the subreport to be use in the parameter @.ITEMID. The problem came
> > > > > up when it was time to sum the TOTALCOST field in the subreport and display
> > > > > it in the main report.
> > > > >
> > > > > I heard that it might be possible to use 2 tables or more in the main report
> > > > > and pass the field from one table to the other one via parameters. The
> > > > > question is how would I do this?
> > > > >
> > > > > "ALI-R" wrote:
> > > > >
> > > > > > Can't you do it in your storedprocedure?
> > > > > >
> > > > > > I mean your storedprocedure returns your ITEM_ID and SALE and
> > > > > > TOTAL_COST(Grouped by ITEM_ID and SALE)?
> > > > > >
> > > > > > HTH
> > > > > > ALI-R
> > > > > >
> > > > > > "chang" <chang@.discussions.microsoft.com> wrote in message
> > > > > > news:CC8E3E28-7375-477A-82A4-3DA05C28973E@.microsoft.com...
> > > > > > > Is it possible to use 2 tables in the same report with different dataset,
> > > > > > but
> > > > > > > able to pass one field as parameter from one table to the other one?
> > > > > > >
> > > > > > > For example I have one table that has the field ITEM_ID and SALE. I have
> > > > > > > another table that has the field TOTAL_COST. I want to use the ITEM_ID as
> > > > > > > the parameter to get the TOTAL_COST in table 2. These 2 tables will be
> > > > > > > aligned to look like one table.
> > > > > > >
> > > > > > > Please help. Thanks in advance.
> > > > > >
> > > > > >
> > > > > >