Value only showing the first item in SSRS report - sql

So my problem here is that I have a Part number which lives in two warehouses hence it has two bin locations. If I just use =Fields!PrimBin.Value it only ever returns the first location. I need to display the PrimBin if the location is from a specific warehouse. To get the warehouse I use =Fields!WarehouseCode.value
What I need to do is only show the PrimBin.Value of MAINWHSE and not CELLWHSE
Thanks in advance.
Ok so the database it quite vast. However, for the information required I am using two tables. Part and PimWhse.
Part shares the Product ID to PrimWhse. In PrimWhse each partID has two locations "MAINWHSE", "CELLWHSE "and 1 bin to pick in each warehouse giving to possible locations.
So WarehouseCode.Value will have the information for which warehouse the part is located. and PrimBin.Value will have the warehouse position ID stored in it.
This is all setup via report style within the Epicor system. When I create a query in business activity to look in MAINWHSE it shows the correct information.
However, in the report data builder I'm not able to set this query so I assume SSRS will be able to see of both theses possible values for PrimBin.Value!? If not I guess I need to work out how to add a query to report data builder, which at the moment does no seem possible?
Thanks again.

Related

BIRT Filter by Parameters Return a Blank Report When it Shouldn't

let me further elaborate on my concern:
I am working on some test reports on BIRT to be familiarized with it and came across an unsettling problem.
I created a data source that connects to a test SQL Server database, a data source that will return building, floor, room, and the number of employees that contain more than one employee, and two String parameters that lets the user choose the building and floor so the report filters by just that one.
The problem happens when I test it with a building and floor that I know are in the result set. For some reason the report filters a blank result, as if the building and floors are not present in the data set result.
I tried filtering by just the building first and then the floor but the same thing happens. If I take out the filter then the report shows up without a problem.
Why does this happen? I am assuming it's the way I input the parameters, but I am not sure.
Can anyone help me? Thanks!

Managing PerformancePoint Filters With Slowly Changing Dimensions

Just a bit of background info:
I have dimension table which uses SCD2 to track user changes in our company (team changes, job title changes etc) See example below:
I've built an Analysis Services Cube and created all the necessary hierarchy's for the dimensions and it works well when navigating and drilling down through the fact table.
The problem I have is with the filters on the PerformancePoint dashboard. As I'm using the User Dimension table with it's multiple instances of users it's showing duplicates up in the list. I can understand why as the surrogate ID is being referenced on the Dimension. But if I choose the first instance of the A-team I will see all their sales for a particular period and if I choose the second instance I will see all their sales for a different period.
What is the best way to handle this type of behavior? Ideally I'd like to see a distinct list of teams in alphabetical order and when I choose the team name it shows all of their data over time.
I've considered using MDX query filters but I'd like to see if there's anything I haven't thought about.
I realise this isn't an easy and quick question but any help would be appreciated!
The answer was simple after having a trawl through my User Dimension table on the Cube.
Under my user dimension I added 2 duplicate attributes to my attributes list ("Team Filter" is a copy of "Team", "User Filter" a copy of "User Name") these will be used only for filtering the dashboard.
Under the attribute properties for each duplicate I then set AttributeHierarchyOptimizedState to "Not Optimized", I also set their AttributeHierarchyVisible to false as I'd shown the two duplicate attributes in the hierarchy window in the middle.
Deploy your Cube to the server and go in to PerformancePoint. Create a new MDX Filter (this image shows the finished filter)
This is the code I used, it only shows dimension members which have a fact against them (reduces the list a considerable amount) and by using allmembers at the dimension it also gives me the option to show "All" at the top of the list.
Deploy the new filters and now you can see the distinct list of users and teams, works perfectly and selects every instance (regardless of the SCD2 row)

SRSS: Dynamic amount of subreports in a report

it might be possible I'm searching for the wrong keywords, but so far I couldn't find anything useful.
My problem is quite simple: At the moment I get a list of individual Ids through a report parameter, I pass them to a procedure and show the results.
The new request is like this: Instead of showing the list for all individuals at once, there should be a list for each individual id.
Since I'm quite a beginner in srss, I thought the easiest approach would be the best: Create a subreport, copy the shown list, and create a subreport per individual id.
The amount of this IDs is dynamic, so I have to create a dynamic amount of subreports.
Funny enought, this doesnt seem to be possible. This http://forums.asp.net/t/1397645.aspx url doesnt show exactly the problem, but it shows the limit of the subreports.
I even ran trough the whole msdn pages starting http://technet.microsoft.com/en-us/library/dd220581.aspx but I couldnt find anything there.
So is there a possibility, to create a loop like:
For each Individual ID in Individual IDs, create a subreport and pass ONE ID to this?
Or is there another approach I should use to make this work?
I tried to create a 'Fake'-Dataset with no sql query but just for iterating the id list, but it seems the dataset needs a data-source...
As usual, thanks so far for all answers!
Matthias Müller
Or is there another approach I should use to make this work?
You didn't provide much detail about what sort of information needs to be included in the subreport, but assuming it's a small amount of data (say, showing a personnel record), and not a huge amount (such as a persons sales for the last year), a List might be the way to go.
I tried to create a 'Fake'-Dataset with no sql query but just for iterating the id list, but it seems the dataset needs a data-source...
All datasets require a data source, though if you're merely hard-coding some fake return data, any data source will do, even a local SQL instance with nothing in it.

Making rdlc datasource filter from other datasource

So to summarise the problem, I have a report which has two datasources - and is really two reports stuck to each other. I want the second part of the report to display data based on what the first part of the report is showing.
To go into more detail, the situation is as follows. I have two database tables - lets call one Customers, and the other Orders.
Customers contains data about the customers.
Orders contains a link to customers and contains the person's orders.
The report itself is supposed to display some sort of letter in part 1:
"Hello [CustomerName], you have an ongoing balance of [TotalBalance] bla bla bla..."
and a list of all the orders he has made in part 2
"Order 1: Item 1: 1 euro
Order 2: Item 2: 2 euro ..."
Originally these were two separate reports which we were generating one record at a time, outputting as pdf files and merging them using third party software such that the letter and the list of orders were next to each other. The problem is that this system will need to generate hundreds of them at a time, and it was taking ages. So now I want to pass a pair of large data sources and generate them in batches (call them 600 at a time) - which works faster.
So how can I force the second tablix which uses a different datasource, to filter based on what is in the first tablix with its own datasource?
I've looked at subreports, but they only work using reporting server and these are local reports.
Anything I can do ? I'm worried that its not possible.
There's no reason subreports won't work with local reports.
I recommend you download the samples from this site ReportViewer Samples. The project named "SupplyingData" shows how to load data into a subreport.

problem in subreport

suppose i have 2 schema,i.e. fy0910 and fy1011.so when i see the report in schema fy0910 or in fy1011 i have to change every time the schema reference for the subreport,but when i see the report in the specific schema after setting the schema reference then there is no problem in subreport but when i go to another schema then again i have to change the schema reference for sub report.For your kind information there is absolutely no problem in main report.so plz give solution to me i will be thankful to u.
What I have done with my reports is to generate a generic result table schema, such as FYDetails instead of your FY0910 and FY1011. Your query to the database can be exactly the same, but with your obvious date limit parameters that only show respective fiscal year. Then, add the FYDetails schema to your report as the binding basis and do a global search / replace on your report file from the fy0910 to FYDetails and save.
Then, whenever you run your queries, just ensure you change the data table result name and your good to go. I almost never hard-code reports to a specific table name that are a direct result of a specific filtered set.
HTH