SSRS Count Fields in DataSet for Map Report - reporting-services

So I have these 2 lists in SharePoint i.e. Producer & Movies.
Now I need to create a single dataset with information about a producer (Name & Nationality) and a count of his/her movies. So an example record from the dataset should look like this for example: Steven Spielberg | USA | 20
I have been looking for way to do this but I couldn't find anything. Everything I tried resulted in an error on the report at runtime. Like when I tried to use a LookUpSet-function that should have worked if it were allowed to use a LookUpSet-function in a DataSet.
Does anyone know how I would be able to achieve something like this?
Sorry if I'm not clear with the title but I didn't know how else to describe it, so any suggestions are appreciated as well. :)
Kind regards
Gravinco

By default, we can only get values from one list in one query, which means we can only have one list in one dataset. Even you can create a calculated fields to return the related movies of the producer, it's still not supported to use aggregation function in it to get the count value. So for your requirement, You have to create two datasets and do the aggregation on producer group level in table.

Related

Access how do i create a report that shows how many of same including if only 1

I have a db of some 20k error code entries, and i would like to generate a report that show
how many of each is stored.
The user creates a entry when working on a specific error and they get it from another table
example
I tried creating Queries with the selected data for the report and then using the report wizard to help.
but the SUM function add's the codes together, and the count records counts ALL together.
I am looking to create a report that i group by "Area" which is working fine.
and under each area i den count "example from the screenshot" like this
Error: - >
Do you have any idea's or is there report software that can help me achieve this?
EDIT:
One solution is i found is -
https://support.microsoft.com/en-us/office/count-data-by-using-a-query-b84cdfd8-07ba-49a7-b067-e1024ccfcca8
Count records in a group or category
But then the problem is i am missing a column with the actual reference of the AlarmNo because now i am counting them, and i am still insterested in getting the Original number.
AlarmNo - Count of these.
Sorry i cannot share data or tables not my data.
Allright i found out what i was doing wrong, it was my sql query.
I changed the queries for each area like this.
This one for England, and it now works when i generate a report.
What i was missing was the "Count" AS CountOfAlarmCode.
Thank you for looking anyway.
´´SELECT Data2020.[Country], Data2020.[Site], Data2020.[AlarmCode], Count(Data2020.AlarmCode) AS CountOfAlarmCode, Data2020.[AlarmText]
FROM Data2020
GROUP BY Data2020.[Country], Data2020.[Site], Data2020.[AlarmCode], Data2020.[AlarmText]
HAVING (((Data2020.[Country])="England"));´´

How to create a query that is able to sort data into 2 groups?

so I'm very new to Access - just started learning it this week. I have data comprised of a bunch of policy numbers with corresponding ratings and premium values.
What I'm trying to do is create a query table that aggregates this data by rating (=1 or >1), this is the part I can't figure out. In design mode, I have put criteria =1 or >1, but it's not doing anything; when I switch to datasheet view, it just lists all of the ratings instead of two boxes that say =1 and >1. If anyone could give me insight on how to do this, I'd appreciate it!
From what I understand after reading your question, you want a query that shows two columns, one that counts the records with a rating of 1 and one that counts the records with a rating of greater than 1.
The best way to do this is to set up two expression columns, both wrapped in a count as you can see below:
SELECT Count(IIf([Rating]=1,[Rating],Null)) AS [=1], Count(IIf([Rating]>1,[Rating],Null)) AS [>1]
FROM tblSortRating;
If you have any questions or I've misunderstood your question leave a comment and I'll get back to you.

ConcatRelated Returning Multiple Values

I am new to MS Access and am trying to build a database that includes a text roll up (effectively summarising staff feedback collectively to the manager). I have set it up using ConcatRelated (http://allenbrowne.com/func-concat.html) and this works as expected. The only issue is that I cannot seem to ensure that only the first instance of a value is returned, rather than every instance. For example:
The function is bringing back the top view, but I only want it to bring back the Distinct values - please note, as this is a manager view, the same value can appear multiple times in the data retrieved. As such, I almost need the text to de-dupe if it is already there.
Full disclosure - my SQL is not great, so I am using the Expression Builder from the design view
Any help will be appreciated
EDIT for more detail:
The image shows a sample of the data and the output. In this, Mary is the team leader and so is responsible for the areas of John, Steven, Erin, and Harriet. The UID refers to the responsibility area.
As you can see, the dataset has the "minimum target" referenced against the area of responsibility and the output I am getting is duplicating the comments (which I presume is because the value is returned twice), but I am trying to ensure that commentary is summarised, not duplicated.
Note, in the summary output, I am not interested in the areas of responsibility, just the commentary against the staff names.
I hope that makes sense
Build a query that retrieves distinct Comments values for each person:
SELECT DISTINCT Person, Comments FROM table;
or
SELECT Person, Comments FROM table GROUP BY Person, Comments;
Now reference that query in ConcatRelated function as source for Comments values.
Be aware that calling a function like this in query along with aggregating can cause slow performance with large dataset.

Report builder 3.0 Using Reportitems!TexboxXX.Value sometimes creates multiple boxes. Why?

I have 6 Datasets each one is the same query but has a different WHERE clause based on employee type. They generate 6 tables. At the top of the report there is a summary table which uses reportitems!textboxXX.value to grab the totals for 2 particular fields from all the tables. I'm also using a StartDate and EndDate parameter. Each reportitems! expression in the table comes from a different dataset in the report if that is relevant.
When I run the report using dates from yesterday back to the 9th of May I get the desired output.
But when I go to the 8th I get multiple rows all the same.
and as I go even further back I get even more rows of the same information. To my knowledge nothing interesting or different happened on the 8th of May and the tables further down the report look exactly the same. Any idea what might be causing this? The design view looks like this if that helps. There's no grouping or filters on the table.
Still not certain about the mechanics behind this but I found a 'solution' so I figured I'd post it. I just made a new dataset for my summary tables where the query was simply SELECT 1. Now I get a single row every time.

Can't figure how to use lookup() in SSRS 2008 R2

In the report I am building I have 2 data sets: one gives me, per user, per day, the total amount in that status; the other one gives me, per user, how many days in the date range the user actually showed up at work. Each of these data sets comes from its respective stored procedure. See screenshot.
The problem I have is that I need to report not the total time in status per user, but the average per day. So in the screenshot you can see that one user has 5 entries for 5 days worked and the other one has 3 entries for 4 days worked. simply because in one of those 4 days he didn't had that status at all.
I tried adding a calculated field to my "status" data set by using the lookup() function but it kept on giving me errors, which makes me think I don't quite know how to use it.
I also tried using group variables, and I was able to define it under group properties, but it never come up as an option to be used when writing an expression.
Any ideas using lookup(), variables or otherwise?
You're on the right track. Sounds like the Lookup function is exactly what you want.
Instead of trying to add the calculated field to the dataset, try putting it directly in the report item where you want this displayed.
Something along these lines should work:
=SUM(Fields!Available.Value)
/ Lookup(Fields!UserId.Value, Fields!UserId.Value, Fields!Days.Value , "NameOfDaysDataset")
If this isn't working, please post a few more details of your data sets, field names, and where you need this to appear.