.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Can I create multiple report tables from one Dataset?

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :Sql Server

I'm producing a report in Report Builder 3.0 that needs to show events grouped by time of day, and another table with the same data grouped by day of week. Both tables show the same results, just grouped differently. The query that generates the ungrouped data is expensive, so I don't want to run it twice.

I've created queries in Management Studio that get the ungrouped data into a global temp table, and then I can fetch both grouped data sets from there. Unfortunately I can't get this to work in Report Builder. I have one Dataset that runs the main query, saves it into global temp, and then returns the first result set. The second Dataset returns the results from global temp. This keeps failing, the second result set is blank.

Does Reporting services run the queries in the order they are in the report, or are they run concurrently? If they are run concurrently this would explain it. Is there anything I can do to change this so that the second query doesn't run until the first one has completed?

Is there a better way of achieving the results I'm after?

View Complete Post

More Related Resource Links

merging multiple tables in a single dataset to single table


 i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset 

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

can some1 help me please.....

What are my options when I need to create a report with data from multiple sources?

Hello all,  What are my options when I want to create a report that will get records from multiple data sources based on data from a parameter? The user will enter the customer ID, I have to check that ID against 5 different data sources. Have you guys done anything similar? Should I leverage SSIS on this request, adding an extra layer of complexity? Should I do this all from SSRS? What are my options?

How to use .XSD file as DataSet to create SSRS report?



I am  planning to create a SSRS report and lunch it in a ASP.NET web application (not using report server). Since the dataset need to be manipulated before used to generate report (some data fields of tables need to be filled  using data got from other system using COM+ components) , I hope I can use a .XSD file as the DataSet to create SSRS report and bind data source dynamically in code. It is not a problem using Crystal Report, but I have no idea how to do it either in Report Designer or in VS 2005. Please advise





Multiple Tables needed for Report Builder Problem


I have 3 tables I need to join: Voucher, Voucher_Detail, and Place
Voucher is related to Voucher_Detail by column voucher_run_id
Voucher has no relationship to Place
Voucher_Detail is related to Place by column place_id

I have solved the one to many relationship problem I was having between Voucher and Voucher_Detail by adding a New Named
Query called LeftOuterJoin.

In my DSV, the Voucher table links to the LeftOuterJoin which links to the Voucher_Detail which links to the Place

When I go into Report Builder, as soon as I select Voucher_Detail ( which is the table that has the most columns I need in the report),
the Voucher table disappears from view.

Not sure what I have missed. Obviously I need access to all 3 tables' data.

Multiple Tables on One Page, One Dataset



In SSRS 2005, is there a way to have 2 tables on a page, each displaying a row of data from the same dataset?

In other words:

Page 1, Table 1 data = row 1

Page 1, Table 2 data = row 2

---- new page ----

Page 2, Table 1 data = row 3

Page 2, Table 2 data = row 4

and so on?

fetching values from multiple tables to show on crystal report

Can somebody guide me to make crystal report showing values from multiple tables?

Create Relation Between Three Tables in DataSet


Hello I'm in Creating Dynamic Menu control and this menu will get the Data From three tables , so i need to Create Relation Between The Three Tables in The DataSet to make the XmlDataSource use it to supply the Menu control with Data the tables is Category (as parent - top level item in the menu) CREATE TABLE [dbo].[Category] ( [CategoryID] [int] PRIMARY KEY IDENTITY , [CategoryName] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Remarks] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO -- CategorySub Table ( as sub Item ) CREATE TABLE [dbo].[CategorySub] ( [SubCategoryID] [int] NOT NULL , [CategoryIDToSub] [int] NULL , [SubCategoryName] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [RcatID] [int] NULL , [RsubID] [int] NULL , [Rsub2ID] [int] NULL , [Remarks] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] ----- CategorySub2 (As second level of sub - sub sub item) CREATE TABLE [dbo].[CategorySub2] ( [Sub2CategoryID] [int] NOT NULL , [SubCategoryID] [int] NULL , [Sub2CategoryName] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [RcatID] [int] NULL , [RsubID] [int] NULL , [Rsub2ID] [int] NUL

values from one dataadapter to multiple tables in a dataset through foreach loop



 How can i fill the values from one dataadapter to multiple tables in a dataset...ie,the adapter is fetching values through foreach loop...i want to take that values into different tables of one dataset....How to do this...Hope anyone will help me....

Thanks in advance

Create and Use a Typed DataSet by Using Visual C# .NET

This article shows you how to create and use a typed DataSet in a small Web application. Typed DataSets, which inherit from the DataSet class, create first-class members of a DataSet's DataTables and DataColumns, yielding the many benefits that come with the use of strong typing.

How to display related tables in one crystal report and how to link this report with combobox?


Hi! I want to display a crystal report in my vb.net application. Suppose I have tables named student details, student marks, student address, etc... Now if I want to display all these details (fields of all tables) in one crystal report (with page breaks if necessary) then how will I achieve it. I will be providing a combo box in my application that contains list of student names. How can I link this combo box with the cystal report to dynamically display report for different student on selected index change of combo box? Help me friends. An example would be appreciable.

Crystal report with dataset and list - please help


Hi Guys;

i'm new in reporting so thanks to be patient with me,

here is my problem, i have created a report then a report viewer,, i passed some parameters to the report it goes well.

i'm working with local data stored in List<object>, i tried to fill my dataset (data) with those local data stored in the list, i filed Cry

looking for yor help


Join Two Tables and Prepare Report



            I have a select query which is executing well. Now, I want to add one more field to that query. That field is not in the current query table, It is in the another table.

How do I join those two tables and get that field value in the existing select query.?


Include a Crystal Report in .NET Web Service for Dynamic In-Memory-Only DataSet



I would like to use Crystal Reports in a .NET web service.  Ultimately I would like to convert my report document to a PDF and then return the PDF as a byte array. 

My .NET DataSet is generated dynamically at run-time.  It consists of four related tables.  Since my DataSet does not have a physical datasource, I created an XML Schema file.  I then added the XML Schema file to the web service project with Add Existing Item. 

A solution for working with a dynamic in-memory DataSet exists for ASP.NET web sites and client-based forms.  I tried to use this method as it is published.  When that didn't work I tried creating the report and XML Schema directly in the web service project, but that also didn't work.


The problem is apparent when you try to set the datasource.......the code bombs on the call to SetDataSource(DataSet) with the message
ex = {"The data source object is invalid."}

Crystal Reports would save me a lot

Could not able to create the Report Center Site in MOSS2007.

Hi All,

I am facing an issue while creating the Report Center site.Once i provide all the details in the New Sharepoint Screen of Central Admin toll and hit on Create button,after some time its throwing an error saying "File Not Found".  Activated the Office Sharepoint Server Publishing Infrastructure Feature and Office Sharepoint Server Publishing Feature but could not see any difference.

Can some one please help me out how to sort out this issue?

Thanks in Advance.

Regards, Krishna Chaitanya

What is the best way to Create Ageing Report in SharePoint 2007?


Hi Experts,

I need your point of view about this and please advise,

My client have made a request to generate Ageing Report thru their SharePoint 2007, FYI all invoice was scan and upload to sharepoint and save as PDF file under Document Library. During the scan, certain information will capture automatically and save it into field that we defined inside the Web Form.   

Below is the basic input we capture:

Vendor Code, Vendor Name, Invoice Number, Invoice Date, Currency, Invoice Amount

Report Requirement (display list and group of:)

- Vendor Code, Vendor Name, No. Of Invoice, Total Payable, Ageing 0-30, Ageing 30-60, Ageing 60-90, Ageing>90 

So my question is, what is the best platform to create this Ageing Report??

because when i try to design the report thru Visual Studio (Reporting Services), i can't identified which database should i connect and which table is store all the invoice information in SharePoint.

Any idea guys?? anybody have implemented it before??


How do you create a custom BDC data field that allows for multiple selected values?

I need help creating a custom data field using the BDC column as a base.  We need to allow for multiple selected values instead of just a single one.  I can't find anything on the net which shows how to do this.

insert new records in tables from dataset to database


I have 2 tables in SqlServer 2008.

Table1: T1id, SomeData

Table2: T2id, T1id, SomeData

I am using DataAdapter.FillSchema to create shema of tables in DataSet. I created DataRelation on columns T1id in both tables.

Now when i try to Update Sql Database T1id in Table2 remains 0 and not the value of T1id in Table1.

I can successfully update Sql Database if i fill DataSet with records first (Using DataAdapter.Fill), but that's not what i want to do. I don't need "old" records in my dataset. I want to use dataset just to store all imputs from user until the proccess is done and then insert all those records "at the same time".

I think i'm getting it wrong with ForeignKeyConstraints, maybe UpdateRule is not set to cascade, i just don't know.

I have been trying to work this out for 6 days now and i'm about to break something on half.

Can someone please guide me to right direction, maybe post some sample, anything.... please!

My old post regarding this:

How to update Sql Server related tables from Dataset(SchemaFill)

SqlDataAdapter.Update related tables

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend