SSRS mutiple database source to be joined - mysql

Just stuck on getting information from two sources, we have a MYSQL database for repairs information which I have in SSRS, this brings back 7000 rows. We have another Repairs database in Oracle which brings back over 3 million rows.
I can't seem to bring the one from oracle as it exceeds the maximum limit, but is there any way do a left join using so i can bring only the two columns i need from the oracle one into the MySQl one which would mean i have 7000 rows plus the 2 columns from Oracle which have a common Primary key. I can't seem to join on two dataset with it being on two database.
Can anyone help.
THank you in advance

You can use the Lookup function in SSRS to find a value from one dataset based on a common key.
=Lookup(Fields!SaleProdId.Value, Fields!ProductID.Value, Fields!Name.Value, "Product")
Use Lookup to retrieve the value from the specified dataset for a
name-value pair where there is a 1-to-1 relationship. For example, for
an ID field in a table, you can use Lookup to retrieve the
corresponding Name field from a dataset that is not bound to the data
region.
(BIDs Description)
In the above example, the SalesProdID from one dataset is being used to relate to the ProductID in the Product table to get the Name field.
This will only return one value, though. This may or may not be OK depending on your data. If you need to return multiple values, use LookupSet.
=LookupSet(Fields!TerritoryGroupID.Value, Fields!TerritoryID.Value, Fields!StoreName.value, "Stores")
Use LookupSet to retrieve a set of values from the specified dataset
for a name-value pair where there is a 1-to-many relationship. For
example, for a customer identifier in a table, you can use LookupSet
to retrieve all the associated phone numbers for that customer from a
dataset that is not bound to the data region.
Unfortunately, you might need to SUM a Lookup but that isn't supported by a function in SSRS. Fortunately, users created a function for it:
SSRS Count Occurances based on multiple columns

Related

I need to join four dataset results into one tablix

I have four datasets that get information for four different things (a unique set of fields for each one), but that can be joined using a field they share. I need to get them all into a tablix that will have four rows, one for each dataset per the linking field. How do I do that?
Currently I can only put in values from one dataset.
Often the best idea would be to create a query that joins the datasets in the sql. If that is not possible, you can look into using the Lookup function to find info from other datasets in your report. The related Lookupset function is able to retrieve sets of information and may be useful as well.

In SSRS How can I do a gradual lookup?

I have two datasets. In each dataset it is possible to have the same item (or even string created by different columns of Dataset1 per row ) multiple times.
How can I 1) do a lookup,
2) find the first match between datasets
3) return the matching value
4) and then proceed the lookup with the remaining rows of Dataset2, instead of looking up the second row of Dataset1 with the entire list of Dataset2? .
I do steps 1-3 but I don't know how I can ensure that all items in dataset2 have been compared.
Thank you
You can use LookUpSet to retrieve all the values that match criteria from one dataset to another.
Use LookupSet to retrieve a set of values from the specified dataset
for a name-value pair where there is a 1-to-many relationship. For
example, for a customer identifier in a table, you can use LookupSet
to retrieve all the associated phone numbers for that customer from a
dataset that is not bound to the data region.
You might need to use JOIN to convert the array to a string.
=JOIN(Parameters!Status.Value, ", ")

Get value of table row

I've got two tables binded to two different datasets. I'm trying to reference one of the rows from one of the tables (Table A) from Table B.
Since it's outside the scope of the table, I can't use ReportItems![Textbox name].Value
Any ideas?
You can use the SSRS Lookup() or LookupSet() function to retrieve the data directly from the other dataset.
I found the MSDN pages a bit unclear, the syntax goes like this:
=LOOKUP(Fields!sourceMatchingField.Value,
Fields!targetMatchingField.Value,
Fields!targetReturnField.Value,
"Name of Second Dataset"
)
Fields!sourceMatchingField.Value is from the dataset that is
currently in scope.
Fields!targetMatchingField.Value is from the other data set you need to get information from and equals Fields!sourceMatchingField.Value.
These two parameter values for the Lookup function make the join criteria for the two datasets. They can be more complicated than simply two field references (such as using functions to manipulate on or both), but I'm just showing the simplest way to do it.
Fields!targetReturnField.Value is the field from the second dataset that you want to return. This should just be a reference to a field.
"Name of Second Dataset" is just what you've named the other dataset that you're joining to.

SSRS 2005 Return the parameters that do not return a matching record

I am using SSRS 2005. I have a report that has a single parameter "#Serial". Our support technicians enter computer serial numbers into the parameter field and generate a report returning the matching records from the database table. The count of serial numbers is not hard set and ranges from 1 to 100++.
My ultimate goal is to list the serial numbers that do not return a matching record.
In SSRS I have tried using the =JOIN(Parameters!Serial.Value,",") to list all of the parameter values (serial numbers) into a text field. This works fine to list ALL of the parameters passed but I do not know the correct expression to convert the list so it only contains only the un-matched serial numbers.
It was suggested that I use a Left Join in the SQL query, however, I don't know how to get the parameters entered by the technician into a temp table in SQL so that I can Join the two tables.
Any help on either method is appreciated, and alternatives to these two methods are welcome.
wouldn't you use the CountDistinct control for the parameter values

How to create a flatfile from a series of tables in Access?

I have a series of tables in an Access 2007 database. I am trying to find a way of outputting a flat-file to an excel spreadsheet that combines all of the tables so that each row of the flatfile represents a unique combination of the table rows from each table.
For example, these tables:
Would combine to make this output table:
The challenges I'm facing are:
The 'input' tables can vary in number of rows and columns, as well as quantity
The total number of rows in the final output table can get quite large (200,000+ rows)
I know Excel and VBA (in Excel) well but almost nothing about Access
Is there a way to do this in Access? Is there some native functionality in Access that I'm completely overlooking? Any pointers (even if it's "you need to read into X and Y") would be greatly appreciated!
Thanks,
Adam
As noted above:
Create a new query. Select your 3 tables as the data sources. If desired, set up joins between tables by dragging a line between a field in one table to a field in another. Without joins you will get a Cartesian Product ... every from 1st table paired with every row of 2nd table, and then each of those combination paired with every row of 3rd table. Select the fields you want included in the result set. When the query returns what you need, save it and give it a name. Then you can export that named query to Excel.
If the table is large, you could hit Excel's row / column limit though.