SSRS report is not showing the data as exected - sql-server

I am trying to create SSRS report with following information. I have class_name and Class_Location column at the same Level. but, Class has many students and it can be listed once i click + sign on the student names for that class. So, can anyone help witht his report

There are a few things you need to do.
Delete Class_Name and Class_Location columns from your report.
Make sure you only have Student_Name column in the Details group of the report.
In the Row Groups section right click on Details group and add a Parent Group, which will add an extra line in your report.
Drag and Drop Class_Name and Class_Location columns in to the parent group.
At this point your report will show Student_Name column grouped by Class_Name and Class_Location columns.
Now comes the part where you want to add the toggle function in your report, go to Row Groups section right click on Details group and go to Properties --> Visibility and make the following selections:
Display can be toggled by this report Item select your parent group there and it should work.

Drilldown reports tutorial may help to solve the issue. link : https://www.youtube.com/watch?v=KB1Y4m4Uxw0

Related

SSRS two datasets in one report

I have a SSRS report with two datasets. My report has one table with all fields from dataset 1. Is it possible to show the field from dataset 2 if the id field from dataset 1 = the id field from dataset 2?
I've tried using an expression on the field in the table to point to the field in dataset 2 but there is no link between the 2 datasets which I think I need. are you able to do a select clause within the expression on the report?
any guidance would be appreciated
I have tried the below as the expression but it doesn't work :
=iif Sum(Fields!ID.Value, "DataSet2")=Sum(Fields!ID.Value, "DataSet3") then First(Fields!total.Value, "DataSet3")
Your question is very classic case of SSRS.
You have 2 ways to achieve this
SubReports (Which I personally like)
Lookup functions (which I sometimes find difficult dealing with)
Method1: Use subreport to display one report in another report
.Create another report as the subreport and insert the child row data.
Create a parameter named ID in the subreport.
In the main report, right-click to insert a subreport in the child row.
Right-click the subpeort to open the Subreport Properties, and select the subreport name in the drop-down list.
In the left panel of the Subreport Properties dialog box, click Parameters.
Select Name in the drop-down list of ID, and select [ID] in the drop-down list of Value.
Method2: Use lookupset function in SSRS
In the Expression dialog box, modify the expression to look like this:
=join(Lookupset(Fields!ID.Value,Fields!ID.Value,Fields!Subject.Value,"DataSet2"),",")
The following screenshot is for your reference(The tablix is to use DataSet1):
Refrences:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f30ff0d2-ba37-4bb8-b0a0-a6e06b3273fd/two-datasets-inside-a-same-tablix?forum=sqlreportingservices
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2e6dfb5a-2de2-4d2f-96e5-4cb94543c6ec/asigning-two-data-sets-to-one-table-in-ssrs

Drill down SSRS: hide columns based on drill down in ssrs

Before drill down summary report:
After drill down :
I have tried this and not able to hide project Name column,it should show only when I drill down the human resource fields.
I can suggest an workaround for this. However ProjectName Column heading will not be visible in this case.
The following is the process.
1) Remove the column heading of ProjectName (only text keep column as it is).
2) Merge 1st and 2nd column headings and for the group as well.
Now it looks as follows in design mode:
It will show as no column visible for Project name but data is visible once we expand the group.
output will be shown as follows:

Creating a Batch Report

I am trying to create a batch report of multiple invoices using SSRS 2008 R2.
I have created the initial invoice report and have it set up with a parameter; the parameter uses an InvoiceID to populate the data within the invoice report.
I have created another report using lists, inside the list contains the information that was in my original invoice report but using a different parameter (BatchID). The problem I am running into with this is that instead of creating a single invoice for each invoiceID it is creating an invoice for each line item within each invoice. i.e.~ Instead of incorporating multiple items based on the InvoiceID (as the original report did) it is creating a report for each of the items.
What would be the best way of running a batch of these invoices? Am I going about this the wrong way or am I on the right track but missing something?
Thanks in advance!
SELECT i.InvoiceId, i.InvoiceNumber, i.BillTo_Line1, i.BillTo_Line2, i.BillTo_City, i.BillTo_StateOrProvince, i.BillTo_PostalCode, i.CustomerIdName,
i.ce_OutstandingBalance, i.ce_BillToDate, i.ce_BillFromDate, i.TotalAmount, id.ProductIdName, id.ce_customeridName, id.ce_CustomerProductName,
id.InvoiceDetailId, id.BaseAmount, id.PricePerUnit, id.ce_rate
FROM
Invoice AS i RIGHT OUTER JOIN
InvoiceDetail AS id ON i.InvoiceId = id.InvoiceId
Once I enter the invoiceID I get my report
My intent is to be able to run the report against multiple invoicesid numbers without having to select the invoice number itself. I have another table that collects the invoiceid's based on a batchid that they are run in.
So far I have attempted to create a subreport with the original report and Create a separate report that uses a list and attempt to group by InvoiceID for each batchid. Though with each of these I have so far been unsuccessful.
I am new to SSRS and have been pouring over documentation from MSDN about SSRS and the different abilities.
For this sort of repeating list, it's a matter of understanding how a list/grouping works.
Lists, Tables and Matrixes are all the same underlying object - the Tablix.
A List is a Tablix with one detail row (i.e. one Tablix row for each row in the Dataset), one textbox in that row, and a Rectangle in that textbox. The Rectangle can have various embedded elements like more textboxes and as such provides a repeating free-form item for each row in the Dataset.
You can see this when you create a List in the designer:
I assume your report query takes a BatchID and returns a number of invoices and their invoice details. I've taken some liberties with your data and created a simplified sample Dataset:
You want the Rectangle to repeat for every InvoiceNo. Currently the Row Group has no grouping item - change this to InvoiceNo under the Group properties and expand the Rectangle as required.
You can start adding in elements such as textboxes for the Invoice level items, something like:
Note that the left side of the Tablix has changed from lines to a bracket - this is because a grouping item was added to the Row Group.
This will repeat once for each InvoiceNo. Now we want to add the line items - you can do this by dragging a new Table into the Rectangle. Since we have a Row Group in place this table will only display items in that group:
When run for the sample data, this gives an ugly but functional repeating invoice report:
This could be tidied up as required, and page groups inserted between Group items in the Group properties as required.
Hopefully this at least gives you a rough idea of how you might go about your task.

tablix returns only 1 record for dataset

I have a tablix on an SSRS report:
When I run the report it only returns 1 record!
I did a sql server trace, and the query that is being executed is returning 14 rows.
On the same report, I dropped another table, and put just one field on it, and it returns 14 as expected. I noticed that the difference between the one that works and that one that doesnt is:
How can I get those 3 horizontal lines on the one that doesn't work?
What could be my issue? What did I do wrong?
The screen shot shows you don't have any groups. You deleted the details group from the Tablix. You can add it back in by inserting a new group or building a new tablix object from scratch.
To add a group, click on a cell in the row that should have a group, in this case the [ReferredBy] cell. Select Add Group -> Row Group -> Adjacent Above. If your data is already grouped at the correct level of granularity, then select Show detail data in the Tablix Group screen. This will add the details triple bar in a row above your current row. If you need to group on something, then pick the field to group on. This will add a ) in a row above your current row. Copy and paste the contents of the cells in your existing row into the new row and delete your original row.
One row when you expect multiple sounds like a grouping issue. Debugging something like this I would create a new table element below the current one and drag and drop a single column from the dataset. If it returns 14 you know it is not the dataset being evaluated as a problem but the table's expression. If it is also only returning one you probably have a predicate, filter expression, or parameter setting limiting the scope down as well.
Probably, you set the expression for Textbox and not for the RowGroup.
Just find the Group Properties then put the same expression in Group On.

Adding an order for a customer selected from a list view in Access

I followed this great guide to help me add a search feature to my Access database:
http://www.techrepublic.com/blog/howdoi/how-do-i-populate-an-access-list-control-with-the-results-of-a-dynamic-search/108
At the end it says:
"If you’re building a quote or order, use the list control’s Click or Double Click event to copy record(s) to a temporary table. It’s easy to implement using a fixed query for each search task."
I have managed to display all search results in a list box and I would like to be able to click on a customer to highlight them, and then press a button to add an order to the selected customer. I've been thinking how I could do it and I really can't get my head around it.
Any help would be appreciated.
It depends on how you build your database. My guess is that one easy way would be:
Create a table with customers;
Create an "Order" table with orders where you link the customers through a foreign key
You load the customers in a listbox. While making the name visible, it is actually the ID that you retrieve when clicking the listbox. You can configure this via the wizard in the design view of a table. You can make other forms appear by events on the listbox (eg. on click).
If you managed to retrieve the ID of the customer, and you have the data related to the order (data that can easily be extracted from form objects and loaded into variables ) what you need is an insert statement and insert the values in the "Order" tabel (including the customer ID, which is linked through the foreign key).
This way all order records are linked to the customer and can be queried later.
Due to my limited knowledge on your other requests, I cannot help you any further on the rest of your database design.
I hope that my reply could help you and that I understood your question correctly.
You can access info from a listbox via:
List.Value
Or if it is not the first column then:
List.Column(0,0)
0 being the column and row references.
You may also consider using a listview over a listbox and then you can access the relevant parts of a listview control with the following code:
ListView.SelectedItem
Or if it is not the first column then:
ListView.SelectedItem.SubItems(3)
3 being the column reference

Resources