Can't get rid of duplicates in an Access sub report - ms-access

I'm having an issue with a report containing a subreport in Access 2007. Let me preface this by saying that I didn't create this database, it was already in place and I've just kinda been put in the position of taking it over, and I don't know too much about access.
Basically I need my report to pull my customer history and payment history, group them based on the phone number, display all history below, and finally being sorted by received date.
What is happening though is I'm getting duplicates of all payment info.
Here's currently what is being output:
555-1212
john smith
123 whatever dr
hometown, usa 90210
sold date received date amount agentname
1/1/2013 1/4/2013 50 jack
6/1/2012 6/6/2012 25 jim
sold date received date amount agentname
1/1/2013 1/4/2013 50 jack
6/1/2012 6/6/2012 25 jim
So as you can see, it is grouping the sales correctly on the phone number, as shown by the phone number, name, and address only being displayed once. However for each instance that the subreport pulls, it shows all the info again. I need only one set of sale information to display per customer.
I have two tables, two queries, and two reports doing all of this.
One table contains customer information, the other contains sale information.
The queries simply pull the needed info.
My main report has the phone number, name, and address inside the header section. This is set to group on phone number, and to keep the group together on one page.
My subreport contains all the sale info inside the detail section. This is set to sort by received date.
I've tried a ton of combinations of grouping, sorting, and moving the subreport in and out of the header and detail sections but to no avail. One way or another there's always duplicates and I can't figure out how to sort the whole shebang by received date when all is said and done. Any help would be greatly appreciated!

Create a phone number group section and move the top line with phone number, name, and address AND the sales information subreport inside this new group header. Then, minimize the detail section.
From your example, John Smith has two sales info records. Therefore, the sub report placed in the detail section will repeat twice for its two appearances in the main report. Recall any item in detail section will repeat for the number in the recordsource. Yet positioning items in a distinct group section will remove the duplication.

Related

A row missing from company report (SSRS Dynamics)

I'd like advice for how to investigate this issue - I have a ticket open with Microsoft, but I haven't received a response from them yet. I have a Fetch/XML report that creates a profile of each company and their products, per year purchased. The report works well, but one employee found an error, and I can't explain it.
The report has a tablix that contains 3 columns "Product" "Year" and "Amount". "Year" is a calculated field: =year(Fields!ab_new_yearpurchased.Value). The field ab_new_yearplanted.Value actually contains a full date, but I'm just interested in the year.
The report is missing one of the products. If I change the purchased year in the product (from Feb. 1 2020 to Feb. 1 2019, the product appears on the report.)
If I create a brand new listing for the product, with the correct info, it won't appear on the report. If I change it to a 2019 date, it appears.
As far as I can tell, this error is only happening with one company.
I assumed the problem was the =year formula somehow, so I redid the report without the formula, just per purchase date. The row is also missing, but the total sum of the tablix includes the amount of the missing row.
Other than waiting for Microsoft to get back to me, can anyone recommend what else I can check here? Thank you.

Ssrs multi tablix merging

I got a request from a sales manager. He needs a report that can show the sales volumes per department per customer per reason of purchase for a given period.
Since each department accounts for its sales differently, I developed 12 procedures to get the required data. Some departments need to list the items, and some don't.
All good to this point. So when I put my data into the report, I can't make the 12 tablix go together. E.g., the customer tablix will print all the customer's info, and then the department one tablix will show all the sales and so on.
What I would like to see is a tablix that host the data from the first customer, then the department one tablix, then department two tablix, and so on until all departments are done for the given customer. Then move to the next customer and so on and so.
I can't use the lookup since the customer tablix has no relation to the reason in the other tablix; however, they all relate to the customer code.
I try to copy the tablix one into their customer tablix, hoping to see the break in customers and department one complete data set. But I got an error saying the customer table has no relation to the reasons.
The expectation is to see:
Customer one
Name
Address
Phone
Department one: reason 1, reason 2, reason 3,reason 4
Department two: reason 1, reason 2, reason 3, reason 4
Customer two
Name
Address
Phone
Department one: reason 1, reason 2, reason 3, reason 4```
Ok. In the end, I was unable to make it with the matrix approach. I ended up with a central customer tablix. Then inside the group, I would create a new line for each category, giving them the corresponding label and adding a new sub-report. The subreport would be bound by the customer's I'd to the main tablix. I also had to change all the procedures to use the customer's id; this change allowed me to bound them to the main tablix. Since I already have all the rolling values, I also added a set of independent tablix to summarize the report's beginning.
Not the best solution, but you need to deliver something.

Hide Control Key Group Value in SSRS

I have been using SSRS off and on since SQL Server 2008. There are a number of typical SSRS pitfalls and gotchas. One of these I need to go over with some one.
This should be pretty easy for an experienced SSRS resource / expert.
Let me explain the scenario
I have an Invoice Header and Detail. The header contains the Invoice number and InvID. The INVID is the link column for the Invoice detail or the FK in the Invoice detail. I guess that must be pretty obvious to all.
Now I need a simple report that displays Invoices and their items.
For some reasons I do not want to use the Invoice number to group the invoices in the report. I want to use the INVID.
But I want to hide the value of the INVID and display only the invoice number.
In other words the report should look something like follows
Invoice Number Date / Descriptio Qty Rate Tax Amount
11001 12/52016
Item No 1 10 10 2 102
Item No 2 20 10 2 202
So on and so forth....
I know this is very easy. Any inputs would be welcome...
Plus any good recommendations in terms of resources for refreshing my knowledge of SSRS
Regards
With SSRS you have the flexibility to set the grouping conditions independently of what is displayed in the table. As the others mentioned, add a Row Parent Group by INVID. The group properties should look like this:
The basic table layout should look something like this:
So the outer group will repeat for each individual, but display the invoice number. The inner group will repeat for each applicable item.
This should point you in the right direction. I'm not sure of a good resource to direct you to. For me, trial and error has been the most helpful.
All you need to do is bring InvId in in main dataset which you are using in main Tablix, on Tablix you can apply grouping on any field of dataset.

How can I display two different tables from the same dataset in Reporting services?

There is a lot of posts that talk about using different sources for this, but I haven't found any that cover my scenario using the same data, while page breaking in between common groupings. I cannot adjust the stored procedure due to some compatibility issues, and am trying to figure out how to do this in the report itself.
Here is what I need to accomplish:
We deliver items to various people in the same job order. Each person will get his own shipment list, so I group by the person delivered to, and page break after his list is finished.
The list of sent items that the person gets should not include pending items. Rather, that should display as a separate table right below the first shipment list of what the person was sent.
The data returned in the stored procedure will include a flag on each detail indicating if the item is pending or not.
Our report should look like this:
---- Report header information ----
---- Deliver to John Joe -----
(Table with all items sent) // These need to belong to just John Joe's group
(Table with all items pending) // These need to belong to just John Joe's group
Page break, then on a different page
---- Report header information ----
---- Deliver to Max Manny --------
(Table with all items sent) // These need to belong to just Max Manny's group
(Table with all items pending) // These need to belong to just Max Manny's group
What I've found so far:
Can't nest tablix controls, since dynamic cant nest inside dynamic
It's almost like I need to be able to apply a grouped bit of data to a data context, such as a rectangle, and have both tables feed off of the same source, but havn't found a way to do this.
If i just do two tablix controls on top of each other, the page breaking doesn't work right, since I need to break after each instance of group. But this happens for both tablix controls if I set this, so the result ordering gets messed up.
Thanks for any comments or suggestions you can provide, it's much appreciated!
The suggestion in the comments by #Martin Soles will work nicely. Another way I've done this in the past is to use nested tables: first add a row group for the recipient, set this group to page break, add some extra rows in the group, and merge cells on the remaining rows:
Next select your empty row and insert a table:
Finally add a filter on each nested table to only show sent or pending items. This can also be useful when you want a different number of columns on each inner table.

Show page total in all pages in SSRS

i want to show page total in all pages which is called running total in crystal report.
the output will be like
Page 1
Employee Name Salary
------------- -------
keith 2000
Robin 4000
Mou 3000
Sub Total 9000
Page 2
Employee Name Salary
------------- -------
Markc 1000
Poll 2500
Sam 1500
Sub Total 5000
in this way sub total will come in all page. i am using table and tablix.
i got a trick from this site to show page total in all pages like
In SSRS 2008, you have the Tablix control. It defaults to a Header row and a Data row. Right-click on the data row, and select Insert Row -> Outside Group - Below. Then you have a footer row that you can add to the same way was in SSRS 2005.
the url is SSRS adding a footer row to a table - CSV output
please have a look and give me right solution to achieve my output. thanks
I think a found a solution for your problem, facing the same task (also adding a carry forward amount on the header of the page, so you can skip that part). I'm not grouping data here, but the technique is rather simple (no coding)
I created a blogpost on my website on it, explaining the details
http://www.tricks-and-tips.nl/tips-and-tricks/sql/ssrs-carry-forward-previous-page-and-running-totals-in-header-and-footer
Hope it can help you.
Peter