add header title to the groups in Microsoft reporting - reporting-services

I am very new to Microsoft reporting. I have a table and I need to show the Category Name and the count how many times the category existed in the report so for e.g, I have the following:
CategoryName Id
Normal 1
High 2
Normal 3
Low 4
Normal 5
Normal 6
Normal 7
Normal 8
Low 9
Low 10
Low 11
High 12
I want to display something like this:
Category Count
Normal 6
Low 4
High 2
I was able to display the category ( Normal, Low and High) and the associated count with the category. The problem is, I cannot put the title "Category" and "count" at the top because I put the CategoryName and count in the header column and I deleted the data column like I showed in the image below. How can I put the title in the above table.
The image after adding the group filed looks like this:
any help will be greatly appreciated.

Your Problem:
Category and Count as Title of your Tablix.
It's pretty easy. Just go to you Header Click on Cell where you wish to put Category.
You can write Category just like a TextBox

Related

How to sum only one of repeated values from joined data in RDLC

I'm not sure if SSRS is dumb, or I am (I'm leaning towards both).
I have a dataset that (as a result of joins etc) has some columns with the same values duplicated across every row (fairly standard database stuff):
rid cnt bid flg1 flg2
-------------------------------
4 2882 1 17 3
5 2784 1 17 3
6 1293 1 17 3
18 9288 2 4 9
20 762 2 4 9
Reporting based on cnt is straightforward enough. I can also make a tablix that shows the following:
bid flg1 flg2
------------------
1 17 3
2 4 9
(Where the tablix is grouped by Fields!bid.Value and the columns are just Fields!flg1.Value and Fields!flg2.Value respectively.)
What I can't figure out is how to display the sum of these values -- specifically I want to show that the sum of flg1 is 21 and the sum of flg2 is 12 -- not the sum of every row in the dataset (counting each value more than once).
(Note that I'm not looking for a sum of distinct values, as they may not be unique. I want a sum of one value from each bid group, because it's from a table join so they will always have the same value.)
If possible, I'd also like to be able to do a similar calculation at the top level of the report (not in any tablix); although I'd settle for hiding the detail row if that's the only way.
Obviously, Sum(Fields!flg1.Value) isn't the answer, as this either returns 51 (if on the first row inside the group) or 59 (if outside it).
I also tried Sum(Fields!flg1.Value, "bid") but this wasn't considered a valid scope.
I also tried Sum(First(Fields!flg1.Value, "bid")) but apparently you're not allowed to sum first values for some weird reason (and may have had the same scope problem anyway).
Using Sum(Max(Fields!flg1.Value, "bid")) does work, but feels wrong. Is there a better way to do this?
(Related: is there a good way to save the result of that calculation so that I can later also show a Sum of those totals without an even hairier expression?)
There are two basic ways to do this.
Do what you have already done (Sum(Max(Fields!flg1.Value, "bid")))
Sum the rendered values. To do this check the name of the cell containing the data you want (check it's properties) and then use something like =SUM(ReportItems!flg1.Value) where flg1 is the name of the textbox, which is not necessarily always the same name as the field.

aggregate of the group columns along with the group in a table

I am very new to Microsoft reporting. I have the following table in my database:
CategoryName Id
Normal 1
High 2
Normal 3
Low 4
Normal 5
Normal 6
Normal 7
Normal 8
Low 9
Low 10
Low 11
High 12
I want to group by Category and also show the count of each category. Here is what I did:
I inserted a two column table and I grouped by the categoryName in the first column and in the second column, I tried doing
=CountDistinct(Fields!CategoryName.Value)
This is what I am seeing in the report
High 1
1
Normal 1
1
1
1
1
1
1
Low 1
1
1
1
I want to see something like this:
Category Count
Normal 6
Low 4
High 2
any help will be highly appreciated
Delete the Detail row and put the Count epxression in the Group row.
You'd probably be better off doing this in the query. Easier and leaves less room for error. Something like the following should work.
SELECT categoryName, COUNT(*)
FROM your table
GROUP BY categoryName

Microsoft Access returns multiple rows, but I only want to display one

I'm using Microsoft Access 2007 to query two separate SharePoint sources.
The first has most of the data I need. The unique ID number for each row in the first has a corresponding column in the second. The ID from the first can occur multiple times in the second. (It's a mapping between two different databases of defects.)first.
What I want to do is this: find all the ID's from table one that occur in the second, and list ID's from the second for each item that corresponds with the first. For starters, I want something a bit like this:
Table 1 ID Table 2 ID's
5 9, 13, 23
10 11, 15
20 8
But there's also more data from Table 1 I want to display for each item.
What I'm getting is this:
Table 1 ID Table 2 ID Table 1 Data
5 9 Row 5 Additional Data
5 13 Row 5 Additional Data
5 23 Row 5 Additional Data
10 11 Row 10 Additional Data
10 15 Row 10 Additional Data
20 8 Row 20 Additional Data
What I want is something like this:
Table 1 ID Table 2 ID's Table 1 Data
5 9, 13, 23 Row 5 Additional Data
10 11, 15 Row 10 Additional Data
20 8 Row 20 Additional Data
Or perhaps:
Table 1 ID Table 2 ID's
5 9, 13, 23
Row 5 Additional Data
10 11, 15
Row 10 Additional Data
20 8
Row 20 Additional Data
How can I create a report like that?
Comma-separated list from multiple records
Grouping of multiple data rows into a comma-separated list is not a built-in feature of Access. There are various ways to do this, but I most often see links to Allen Browne's tutorial.
Multi-line row details
The difference between your last two examples is just a matter of formatting a Form or Report in Design View. A Report (here capitalized) in Access is a specific type of object for generating custom, formatted views of your data, often for printing or read-only viewing. A Form is a dynamic, on-screen view of your data. I suspect that your use of "report" is of a more general sense.
First of all, there is no way to make multiple lines using the default Datasheet View of tables and queries. To get multiple lines per row of data, you need to create a Form or Report object in Access. In Design View, you can move the data controls around the detail area to produce multiple lines for each data row. I suggest searching for tutorials on the web for creating Access Forms and Reports.
See Guide to designing reports.

Remove Duplicates in SSRS Subreport

I have an SSRS report the links a line item subreport to my main report by an order number. When a customer orders 2 line items, 2 order numbers come in with contact info, etc. In the SSRS report, the order number shows up twice and the multiple line items fall below. What I would like is the 1 order number with the line items following.
As I have it now it looks like:
Order# Contact User
1234 J. Smith JS1
LineItem Qty Order Date
1 3 05/15/2015
2 2 05/15/2015
Order# Contact User
1234 J. Smith JS1
LineItem Qty Order Date
1 3 05/15/2015
2 2 05/15/2015
I tried =Fields!LineItem.Value =PREVIOUS(Fields!LineItem.Value) but because the dup isn't directly previous that didn't work.
But I'd like to have just one single result. Any help would be great.
At the bottom of your design screen should be the Row Groups window. Many times, you will already have a group created. If you right click on it and click the properties it should look something like the image below:
Thanks.

How to realize a navigation through a tag cloud in MySQL

I want to write a web application to order my photos. Instead of putting them into categories, I want to add tags to certain pictures. I thought of having 2 tables, one for the images:
uniqueID imagename
1 photo1.jpg
2 photo2.jpg
3 photo3.jpeg
4 pic4.jpeg
and one table for the tags:
ID tag
1 California
1 Peter
1 beach
2 California
2 L.A.
2 Peter
3 California
3 Susan
4 Kansas
4 Claudia
After starting the application the tags are shown in a size accoring to the number of occurences in the database. When I click on a tag (e.g. "California") all the remaining tags of images, that also have the selected tag should be shown on the next page (here: "Peter", "beach", "L.A.", "Susan" but NOT "Kansas" and "Claudia"). When I afterwards click for example on the tag "peter" all the remaining tags of photo 1 and 2 should be shown ("beach", "L.A.").
Is it possible to realize those two things with a single query?
Select image-names from the image table, that have all selected tags in the the tag-table
Select all remaining tags and their COUNT() for those images (IDs) that also have the selected tags in the tag-table.
Thanks for your help
Sven
For 1) You must use a SELECT query with JOINS. For example:
SELECT *
FROM images i
INNER JOIN categories c
ON i.id = c.id
For 2) I'm not quite sure I understand what you mean by remaining tags.