Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

display data for every Customer Expand / Collapse
Author
Message
Posted Wednesday, May 15, 2013 5:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 5, 2014 10:24 PM
Points: 48, Visits: 370
Hello

I have two data sets dataset1 contains Center Id, Customer Id and dataset2 Contains Customer Id and few information of customers.i have two parameters Center Id, Customer Id .
when I enter center Id it should display all the customer information in list format
if i enter both it should display only that customer information how can i achieve this ????
Any help would be appreciated

Thanks
-----------
swat
Post #1453018
Posted Wednesday, May 15, 2013 5:19 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Thursday, September 4, 2014 7:40 AM
Points: 3,545, Visits: 2,652
Swat, a simple if...else condition may help you. Did you tried something of your own ?
Post #1453020
Posted Wednesday, May 15, 2013 7:04 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, August 21, 2014 7:49 PM
Points: 171, Visits: 501
Unless you can create a dataset that joins the tables together from the two datasets you have now, you will have to use a LookupSet function to return each value from dataset2 that matches the CustomerID associated with the selected CenterID. Because LookupSet can only return one type of value at at time, you will need a separate LookupSet function for each customer value you want to return.

Assuming your tablix is built upon dataset1, the syntax would be something like =LookupSet(Fields!CustomerID.Value, Fields!CustomerID.Value, Fields!CustomerName.Value, "dataset2")

In a query, this would be a simple join between the two tables represented in each currently defined dataset, but if you cannot write your own query against the data, LookupSet may be your only option.
Post #1453073
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse