Home » Visual Studio

RDLC C# 2005 multiple datasets in one Table ReportItem

Good day

I have created two reports one that shows debits (which works 100%), and one that shows debits against credits per day. It shows total debits and total credits per day, ie one line per day. In the SQL database I have a table for debits and another for credits. There are also various rates on each table. Debits and Credits can be bought and sold on a regular basis. In the reports we reflect the weighted averages of the days transactions 
SUM(rate * (bought - sold) / SUM(bought - sold)).

In the Debits report, I use the Debits dataset with the individual transactions as they appear in the DB. This approach works 100%. In the DebitsCredits report, I have created a View that combines the values from the two tables. Forcing me to join them per day (ie. getting totals per day, I lose the individual records). This approach gives me different results to the Debits report, wrong results, due to the fact that individual transactions "have beeen lost".

I thought of making use of the two individual tables, but cannot assign both datasets to the same RDLC table ReportItem. I also need to perform calculations between the two datasets (ie. creditamount - debitamount = balance).

Which other way can I bring the individual records of both table into the report and perform calculatins between them?

Many thanx.

1 Answer Found


Answer 1

Is there an rignt answer for the problem? Thanks very much!



I am running into an issue with a report that uses the ReportItems collection within the header of a RDLC report.

I am using ReportViewer a asp.net 3.5 webforms application to display the report.

I use the following code in a group footer to determine the group number "=Fields!ROW_NUM.Value". The ROW_NUM column is generated by a sql stored procedure that adds a sequential integer to each row exported. I then use: =Min(ReportItems!textbox353.Value).ToString() in the reports header to retrieve the minimum row number displayed on a page.

Doing this i am able to provide the user a row count on each of the reports pages: 1-23 of 1021 records are displayed.

This works well for reportviewer and excel export but produces a #error - #error of #error when printed or exported to pdf.

Any insight to why this issue is occuring or how it can be resolved is appriciated.



Craig W.



I'm new to the board, and a newly hired dba as well.  I have a fair academic understanding but I'm learning the realities as I go.

I have about 200 .csv files I need to import into sql 2005 tables, each file in it's own table.

They are out in a file: \\server\client\Imports\file

They all have column headings and are delimited.

They need to go into a database on our development server: server.clientdb each file into a separate table in the clientdb.

I know I can do each individually via the wizard, but that would take...  a while.

So, I figure just about anything I'm trying to do somebody else has already done.

I've looked at using an SSIS package, but couldn't figure out how to make it increment to the next file, and next, etc.

I imagine somebody has written a query to import a file, create a table for the file, and increment to the next file.

Any help/hints?



I want to create a report with a list control.

In that list control i would like to have 3 tables / tablix with different datasets that i have created before.

There is always an error that i could only use  1 DataSet in this list control.

If i want to select  different datasets for the different tables /tablix, i can choose a different dataset

for each table/tablix but its not permanent.

How can i solve this problem ?. Thank you very much.



name : abc        record 1


table1   (should show data from dataset1)

table2  (should show data from dataset2)

table3  (should show data from  dataset3)




I need to use multiples tables in a RDLC report.

First table is AuditReport

And Second table is CostPerUser

But in Report Viewer we can only set dataSource Name to one table like this

ReportDataSource dataSource = newReportDataSource();

dataSource.Name = "DataSet10_AuditReport";

dataSource.Value = ds1.Tables[0]

 So how we can use other table......

Pls rply






DELETE Users, meet, tour FROM Users, meet, tour WHERE Users.uid=meet.desg AND meet.desg=tour.desg AND Users.uid='CCC';

i have try this command to to delete record from three table

i want to delete all the record of uid from user ,tour and  meet at once.

Users table having a key uid which is common to all table.

 in table Users, uid is primery key

and meet table having desg and tour having desg common field value

i.e. Users.uid=meet.desg=tour.desg are same desg in both table is foreign key

so how could i delete uid from Users table ,desg from tour and meet at once and all the record from these 3 tables


i m facing the problem update the multiple table columns in single procedure i have Three tables i want to update that three table Records in single Procedure



is it Possible?

pls help me i m new to sql server


Hi there

I have created various reports for my WinApp. In the past all features worked 100%. However, a while ago (I am not sure what may have caused it) the export to Excel on some of my reports started to give me errors. I am still able to export to PDF.

When attempting to export to Excel, I get the following errors:

"An error occurred during local report processing.
An error occurred during rendering of the report.
An error occurred during rendering of the report.
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index."

Is there anyway this can be fixed, or do I need to recreate the affected report from scratch? I am using the built-in feature to perform the exports, and not fiddled with it in any way. Besides I do not even know where to find it.

Many thanx.

I would like to know if anyone has any experience setting up transactional replication, in which you are replicating multiple tables from multiple databases into ONE table. (sql 2005, enterprise, sp3)

If you have, can you let me know what issues I need to be aware of? Any limitations? Any guidelines for how you set the replication up to accomplish this?

I need to be able to ensure each row is unique in the ONE table where all the data would be replicating to, so can I add an identity column in the destination table? (with a seed of 1, so that it increments by one with each insert).  If so, do I create the table structure with Identity column BEFORE setting up replication?

All the tables I would be replicating have the exact same structure...all identiical in columns, column type....

Any help or insight would be MUCH appreciated.....

Thank you ahead of time!


I am using

Microsoft Visual Studio 2005

Reporting Services / Winforms

Whenever i move a content in Reporting it crashes both VS and .net framework could not find out the reason too

Event Type:        Error

Event Source:    Microsoft Visual Studio

Event Category:                None

Event ID:              1000

Date:                     7/20/2010

Time:                     5:03:35 PM

User:                     N/A

Computer:          xxxxxxx


Faulting application devenv.exe, version 8.0.50727.42, stamp 4333e699, faulting module kernel32.dll, version 5.1.2600.5781, stamp 49c4f482, debug? 0, fault address 0x00012afb.


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


0000: 41 00 70 00 70 00 6c 00   A.p.p.l.

0008: 69 00 63 00 61 00 74 00   i.c.a.t.

0010: 69 00 6f 00 6e 00 20 00   i.o.n. .

0018: 46 00 61 00 69 00 6c 00   F.a.i.l.

0020: 75 00 72 00 65 00 20 00   u.r.e. .

0028: 20 00 64 00 65 00 76 00    .d.e.v.

0030: 65 00 6e 00 76 00 2e 00   e.n.v...

0038: 65 00 78 00 65 00 20 00   e.x.e. .

0040: 38 00 2e 00 30 00 2e 00   8...0...

0048: 35 00 30 00 37 00 32 00

0050: 37 00 2e 00 34 00 32 00   7...4.2.

0058: 20 00 34 00 33 00 33 00    .4.3.3.

0060: 33 00 65 00 36 00 39 00   3.e.6.9.

0068: 39 00 20 00 69 00 6e 00   9. .i.n.

0070: 20 00 6b 00 65 00 72 00    .k.e.r.

0078: 6e 00 65 00 6c 00 33 00   n.e.l.3.

0080: 32 00 2e 00 64 00 6c 00   2...d.l.

0088: 6c 00 20 00 35 00 2e 00   l. .5...

0090: 31 00 2e 00 32 00 36 00   1...2.6.

0098: 30 00 30 00 2e 00 35 00   0.0...5.

00a0: 37 00 38 00 31 00 20 00   7.8.1. .

00a8: 34 00 39 00 63 00 34 00   4.9.c.4.

00b0: 66 00 34 00 38 00 32 00   f.4.8.2.

00b8: 20 00 66 00 44 00 65 00    .f.D.e.

00c0: 62 00 75 00 67 00 20 00   b.u.g. .

00c8: 30 00 20 00 61 00 74 00   0. .a.t.

00d0: 20 00 6f 00 66 00 66 00    .o.f.f.

00d8: 73 00 65 00 74 00 20 00   s.e.t. .

00e0: 30 00 30 00 30 00 31 00

00e8: 32 00 61 00 66 00 62 00   2.a.f.b.

00f0: 0d 00 0a 00               ....   



.Net Frame Work

Event Type:        Error

Event Source:    .NET Runtime

Event Category:                None

Event ID:              1023

Date:                     7/20/2010

Time:                     5:03:37 PM

User:                     N/A

Computer:          PC068670


.NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error (7A2E10D2) (0)


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.




Hi and thanks.


I'm getting an error on serveral reports that I built  in VWD2005 (express) using the reportviewer control.  Trying to edit the rdlc file in VS2010, VS2010 asks if i want to convert the file to RDLC 2008 format and I click ok.  When I build the site, I get this error (and of course also when the report is ran):


Error 1 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded. C:\inetpub\wwwroot\mastercardlcm\Reports\WorkLists\OpenSRStatus.rdlc 1 


Here is my web.config concerning the RDLC assemblies, etc.

			<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
		<compilation debug="true">
				<add assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="Microsoft.ReportViewer.ProcessingObjectModel, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>			</buildProviders>

The DLLs are in my site's bin folder and the target framework is 2.0.  After a couple days reading up on the errors, it appears this error is generally thrown by RDL files, not RDLC and also when installing Sql Server 2008 and the visual studio that comes with it butts heads with another installed version of visual studio.  In my case, I have clean installs of OS build, VS2010 and am using sql server 2005 management studio to remote into a sql server 2000 database.  Any ideas on how to get this issue behind me?







How to link multiple DataSets (why SSRS call it a DataSet even there is only one bunch of data fields in it) using keys, then put data fields from multiple DataSets into one Data Region? The reason I have to do this is: There will be 6 major DataSets to be used together few times in same report, it is not make sense to build a huge Matrix for all of them together. (in some data region I use data from dataset A and B, some times I use data from dataset A and C, D ...)







I have source table called customer. And data from this table is transfered to another database  with same table name.

that is database1(customer table) ----> database 2(customer table)

now in database 2, First time my program runs and it randomly get any name and ssn and then updates the first name, last name, ssn of all the customer_ID's in the customer table (I use RAND function)

Now second when i run the program, it recreates the name and ssn again but different, for the same customer_id.

So i want that once the particular customer_ID is updated, next time if i run the program. it shold not update the those updated customer id's

Thanks, Any help is appreciated.



Hi, I read Chris Hay's article on how to do dynamic grouping in SSRS (http://blogs.msdn.com/b/chrishays/archive/2004/07/15/dynamicgrouping.aspx) and it works fabulously when you have one dataset, however most if not all of my reports will have multiple datasets. As such, it gets very confusing with how to set up your group expressions. So, my question is, if currently for my optional group expression I have the following:

=iif(Parameters!Group1.Value is Nothing,1,Fields(iif(Parameters!Group1.Value is Nothing, "loc_name",Parameters!Group1.Value)).Value)

What do I do with the "loc_name" portion of the string when I add other datasets? How can I amend the expression to include the name of the dataset that loc_name should be pulled from?   If I don't, the report won't run because it is looking in the wrong dataset and saying that field name doesn't exist in it. Any help would be most appreciated. I've fooled around with 20 different ways of trying to get the dataset name in there, but none work.



I am wondering what the best practice would be with this scenario.

I am building a app where the user can open multiple reports in multiple DataGrids.  Some of these reports can actually be edited but the user can only open one instance of each of these editable reports.  The reports that can't be edited the user could open multiple isntances of each of those reports.  I am databinding the table(s) to the datagrid from the dataset.

Now should I use a dataset for each report?  Or should I just use one global dataset for all the reports?


I'm using SSRS 2005. I'm working on a SSRS that has three data set: one for client information display, the other for chart (graph) and third for Report Parameter to select Clients Name. Clients can have one of more facilities.

The issue I'm running into is that when a user selects a client from the parameter, I get multiple facilities info for the client selected and and one Graph at the end. For example, if I have client ABC and client ABC has 3 facilities: Fac1, Fac2 and Fac3. The info for each facilities is displayed, but only one Graph is displayed at the end of the page; I understand this is because I'm using a List to display the info using a separate Dataset and a separate dataset for the chart.

My question is there a way that facilities information and chart can be displaced on one page? For example, Fac1 information and the chart associated with it on one page and next page would be Fac2's info and chart and so on.


I have a flat file with 320k rows.  Each row contains generic data such as a supplier number, plant name, and dock code.  Each row also contains 5 sets of 4 fields route name, region code, arrival date and departure date.  Each of the 4 fields begin SX_ where the X is the set number.  So for example the column names per row are:


What I need to do, using the flat file as a source, is to read the generic fields into one dataset and the SX fields into another.  I then need to copy these datasets to an OLE DB destination into their respective tables.  This is very easy using a Windows Service and VB.NET.  Anyone have any ideas how to accomplish this using SSIS 2008?



First i want to mention that it's my first engagement with reports in CRM 4.0. I created a new report in CRM 4.0 and tested it and it works fine, after that i tried to created one using report builder 2.0 and it worked fine too, but there was one difference between both of them. When i select an contact for example and click run report then i select the report created using report builder, i didn't get the "select records" dialog on the other hand it appears when i run the report created by the CRM, So why is that ? Is there something i miss to make this dialog appear ?


I tried to export the two reports and check the generated XML in both of them and i noticed that the command text is totally different, Is there a toll to convert the T-sql command text to the one generated using the CRm report wizard ?

Last thing, I opened the exported report created by the CRM report wizard with SQl Server business intelligence studio and added another dataset, When i tried to import this report this report to the CRM again i got an error MSG , Is this because each DS has a different connection string and a different command text format ?


Thank you.



Is there a way to have series from different datasets in a RS chart?


I've two Tablix-Controls on a Report with diffrent datasets (property 'DatasetName' is set). Now I would fill the Fields in the Tablix-Controls with the values from dataset.

    Textbox1.Value = Fields!Column1.Value

raises a error '...Report item expressions can only refer to fields within the current dataset scope...'

I don't need a aggregate-function (like sum(..., dadaset1)), I'm looking for the current value, like

    Textbox1.Value = dataset1.Fields!Column1.Value

but this doesn't work. How is the correct syntax to fill the Textbox with the value of the current row?





<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure