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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

working with multiple data sets

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
i am new to ssrs and looking for guidance : i need to develop a report based on multiple tables: general ledger, customer ledger and customer master... the purpose of report is to have customer segment wise sales and expense information.... for given month and YTD. customer segments are defined in customer master, sales is in customer ledger and expenses are in general ledger.. the problem i am facing are: 1. I need to display all customer segments, and if no sales /expenese for any segment, then show 0 values.. .however, if i join tables and apply WHERE clause for date..i am missing some segments due to lack of data within where condition 2. i believe having subqueries is expensive when u r dealing with millon records. further i want to know how to have a calculated field based on two different dataset fields.  

View Complete Post

More Related Resource Links

Introduction to strongly Typed Data Sets

This article teaches how to create a strongly-typed dataset class library in your C# database applications. Our objectives are as follows:

.Learn what an strongly-Typed Data Set is
.Let Visual Studio Create a ST Data Set
.(Semi)Manually create a ST Data Set using XSD (Xml Schema Definition)

data from multiple row



I have a dataset in my SSRS report where I am getting the data like this. It has 3 rows.

ID Parameter Value

1. Client Name-  XYZ

2. Client Email - xyz@s.com

3. Clinet Phone- 234567

I need to check condition in expression, so If parameter is Client name then It will show in client name textbox of Report. How can write expression for this.

Linq to sql does not return appropriate multiple result sets with "If exists" conditions in the stor


Hello All,

I have a stored proc that returns 4 resultsets, they are in the format.

ALTER PROCEDURE [dbo].[pGetManagerEmployeeSummaryDummy]

    @ManagerStaffID int,
    @PeriodID int



IF EXISTS (select 1 from dbo.temployee e
    inner join dbo.temployeedetail ed
        on e.staffindividualid = ed.staffindividualid
        and ed.periodid = @PeriodID  
    inner join Incentive.tRole r
        on rm.IncentiveRoleID = r.RoleID
    where ed.ManagerIndividualStaffID = @ManagerStaffID
    AND r.RoleID = 1) --Closer
        SELECT e.StaffIndividualID, e.LastName, e.FirstName, r.RoleName, e.xname, e.yname

from dbo.temployee e

inner join dbo.temployeedetail ed
            on e.staffindividualid = ed.staffindividualid
            and ed.periodid = @PeriodID

where ed.ManagerIndividualStaffID = @ManagerStaffID

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.

Creating .NET Assemblies That Aggregate Data from Multiple External Systems for Business Connectivit

This article describes a quick, four-step process for creating a .NET assembly that BCS can use to retrieve external data for SharePoint Server 2010 by using Visual Studio 2010.

Using the single *.rpt file with multiple data sources


I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:

protected void BTN_RunReport_Click(object sender, ImageClickEventArgs e)
CrystalReportViewer_ClientLetter.Visible = true;

ConnectionInfo con = new ConnectionInfo();
con.ServerName = Constants.ServerIP;
con.DatabaseName = Constants.DatabaseName;
con.UserID = Constants.UserID;
con.Password = Constants.Password;

CrystalReportViewer_ClientLetter.ReportSource = Server.MapPath(Constants.ClientLetters);
ParameterFields parameter = CrystalReportViewer_ClientLetter.ParameterFieldInfo;
ParameterField batchdate = new ParameterField();
batchdate.Name = "@BatchDate";
ParameterDiscreteValue batchdate_value = new ParameterDiscreteValue();
batchdate_value.Value = Convert.ToDateTime(txtBatchDate.Text);

foreach (TableLogOnInfo tlf in CrystalReportViewer_ClientLetter.LogOnInfo)
tlf.ConnectionInfo = con;

Data flow task with multiple destinations randomly hangs

I have a package whose control flow consisting of a single data flow task with multiple destinations continues to hang at random locations.  The data flow task is fairly simple: - One OLE DB source (one query of selecting about 10 fields from one table) - 9 lookups that serve basically as left joins to capture which data "drops off" (does a row redirect on on lookup errors to an "error flow") - Two destinations: one the captures all the data that doesn't drop off from the lookups, and another to capture the data that does drop off; these write to two tables unrelated to each other, and unrelated to any of the tables I'm reading from I have tried the following: - Changed one or both destinations from OLE DB to flat file -- still randomly hangs - Removed both destinations altogether -- this always suceeds.   - Removed destination A and leave destination B -- this always succeeds - Removed destination B and leave destination A -- this always succeeds I took great care in making sure I get no warnings when the package runs, even resolving the unneeded column warnings, and the duplicate keys on all my lookups, but it still hangs. However, once I give up and stop the package, the following error is thrown (among others that appear to be a byproduct of the root issue): Error: 0xC02020C4 at Data Flow Task, OLE_SRC AP12 [1]: The attempt to

DataGrid ValidationRule or IDataErrorInfo validation code called multiple times for each data change

Following my enquiry regarding a problem in Datagrid validation, for which managing exceptions is apparently a problem, I tested the two other methods: using validation rules, or implementing the IDataErrorInfo interface. I ran into other problems there, more insidious this time. This has been done on Windows7 (32-bit), .NET 4.0.30319. 1) IDataErrorInfo When this interface is implemented, the this[string columnName] property is called four times for each modification: two times before the cell enters edit mode (with the old value in the corresponding property) two times when the new value has to be validated (with the new value) It strikes me as not really efficient, is there something wrong with my code? Here's the C# part: using System; using System.Windows; using System.Collections.ObjectModel; using System.ComponentModel; namespace DataGridTest2 { public partial class MainWindow : Window { ObservableCollection<User> users; public MainWindow() { InitializeComponent(); users = new ObservableCollection<User>() { new User { Name = "Teddy", Age = "2" }, new User { Name = "Avi", Age = "19" } }; datagrid.ItemsSource = users; datagrid.Focus(); } } public class User : INotifyPropertyChanged, IDataErrorInfo { string name; public string Name

Storing multiple data types in a class?

I need help writing a class that will contain three values per item.  I'll be passing parameters to a report: Parameter Name, Data type (int, string, date, etc), and Value. When I pass those values to the report using the class they should be in original form (i.e. an integer should be a numeric, a string should be a string, etc.).  I can do it converting the data's value to strings on one end, and reconverting to the original data type on the other, which seems like a lot of runaround. Is there a simple way?  Also, if I'm able to store & retrieve the data in it's native format I don't need the "Data type" stored. Any help or tips will be appreciated.

Data Binding a DataGrid to a list fetch the same data multiple times

Hi, I'm using DataGrid to show data through data binding. My data are provided in a list. The setup I have is the following: DataGrid "binded" to the default view of my list that implement IList<T> and IList interfaces (MyList<T> : IList<T>, IList, INotifyCollectionChanged)             CollectionViewSource.GetDefaultView(_myList);             // Set the data context             DataContext = view; T: is here my 'business object' that hold the data, called 'MyRow'. Then the columns of the DataGrid are bound to public properties of 'MyRow' object. MyRow class has a public property of type 'object' (public object data[int index]) and first column of datagrid is bound to myRow.data[0], second column is bound to myRow.data[1] and so on.   When the datagrid is displayed, databinding kick in and my data are showed in the control. The issue I'm having is that data fetching is very repetitive even for the same rows. For example for a datagrid with 20 visible rows, the first row is fetched multiple times even if the datagrid is not resized or moved. I put break point inside my list (MyList<T> into This[T] property (public T this[int index]) and i got multiple hits into the property for the same index. Fetc

Data Collection in SQL 2008 not working

I am trying to use “Data Collection” feature in SQL 2008. I created it but I am not able to see any report. I am getting blank report. I saw all the jobs related to Data collection are failing and throwing following error:-     The step did not generate any output.  Process Exit Code 4.  The step failed. Any idea what needs to be done? This is SQL Server 2008 64 bits.   Thanks Saumen 

Collecting data from multiple servers

I have a list of about 500 servers that I am trying to connect to and collect various amounts of information from these servers through one query. I'd like to have something that doesn't involve OS batch scripting or using SQLCMD as the SQL Instances range from SQL 2000 through SQL 2008 R2. Does anyone have any suggestions or ideas on what to do to accomplish this?Big Ern

SSIS multiple data flows accessing the same raw file

I have multiple data flow tasks accessing the same raw file at virtually the same time.  I would like to know if the data flow tasks lock the raw file during read?  Can multiple data flow tasks read the same raw file at the same time.  I'm currently developing with a very small data set, but I would like to know if I should be concerned with the possibility of the data flow tasks competing for access to the same raw file. Thanks.

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?

Select All on multiple data grids on the same page

Hi gurus, I have two data grids on one page and both have first colums as a check box list. I want to implement a check All button for both the grids independently, now here is the problem I am using the following code to do that and even though I write individual functions for both the grids, when i check the Check All check box for grid one it checks everything on grid one as well as grid two. <HeaderStyle HorizontalAlign="Justify"> </HeaderStyle> <ItemStyle HorizontalAlign="Center" BackColor="Lime"> </ItemStyle> <HeaderTemplate> <asp:CheckBox ID="CheckAll" OnClick="javascript: return select_deselectAll (this.checked, this.id);" runat="server" /> <img src="../Images/email.GIF"> </HeaderTemplate> <script language="javascript"> //checks all DataGrid CheckBoxes with the given name with the given value function select_deselectAll (chkVal, idVal) { var frm = document.forms[0]; // Loop through all elements for (i=0; i<frm.length; i++) { // Look for our Header Template's Checkbox if (idVal.indexOf ('CheckAll') != -1) { // Check if main checkbox is checked, then select or deselect datagrid checkboxes if(chkVal == true) {

SQLCE 3.5 connection from multiple application, data refresh

I have a native application (wm 6.5) using oledb to connect to a database. *******************************************************************************   result=CoCreateInstance(CLSID_SQLSERVERCE_3_5,0,CLSCTX_INPROC_SERVER,IID_IDBInitialize, (void**)&database);   ... // set properties  database->Initialize(); ******************************************************************************* This part of the app simply queries a single table for all records (query wrapped in a transaction of it own). I believe it is recommended that you keep a single connection for as long as possible, and therefore just create a new session each time I query the table. There is a second application (c#) which my application executes and then waits for. It updates and inserts new records. when the c# app closes and I get control back, my app then runs another query to see if anything has changed. My issue is that, the only way I can get the updated data is to un-initialize and re-initialize the database (IDBInitialize) interface created above.  Is there some properties I should be setting on the session/database in order for this to work. Or do I really have to spawn a new connection for every query?   Thanks in advance. Dylan

ASP.NET Dynamic Data Filtering not working

 Hello. I am trying to use this DLL to make searches on dynamic data pageshttp://www.codeplex.com/DynamicDataFilteringI pasted the following code, but nothing happens    <cc1:DynamicFilterForm ID="DynamicFilterForm1" DataSourceID="GridDataSource" runat="server">             <FilterTemplate>                                             <table>                <tr>                    <td>                        Nombre activo</td>                    <td>                          <cc1:DynamicFilterControl ID="DynamicFilterControl3
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