Show page total in all pages in SSRS - reporting-services

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

Related

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.

Grouping does not create in master details rdlc report formatting

I want to create a rdlc report using Microsoft Report Designer. Due to complexity of my data (the given below is just an example) I do not use View on Database side. So, I have to use seperate tables (data sources) for my report design. Now, as it can be seen the example below I have one report page and I want to show PERSONAL, FAMILY and JOB INFO for each person.
There are Textboxes on PERSONAL INFO section. The data is come from table_Personal,
There are a Table on FAMILY INFO section. The data is come from Table_Famiy,
There are a Table on JOB INFO section. The data is come from Table_Job
and all the three tables contain Person_Id column.
PERSONAL INFO
Name : Christof
Surname : Robin
Age : 45
FAMILY INFO
No----- Name----- Age----- Birt Place
1------ Sarah----- 12------ London
2------ Albert----- 16------ Manchester
3------ David----- 23------ NY
JOB INFO
No------ Company----- Start Year
1------- Xyz----------- 2005
2------- T Mobile------- 1999
3------- Day Inn------- 1993
My question is;
1) I do not want to use Subreport and do not combine these tables in db side by using view (I have searchhed, but for 3 or more tables it is impossible I think).
So, is it possible to create a master-detail report like above by grouping items (table, list, etc.) and without using subreport on rdlc? If so, could you explain a little bit please?
2) I have tried to create such a kind of report like that; I use a List and inserted all the textboxes and three tables above
to this list. I assign all the three tables as Report Data Sources. I make List.DataSetName = Table_Personal and List.Grouping settings
select Group on : Person_Id and some other combination. But, unfortunately I have not managed to create such a kind of report group like above.
Could you help me please by giving some advice and if you have some sample rdlc page source please? ...Shohel
Yes it is possible but I'd done it like 6 months ago, so I don't have any sample code right now.
I have done a lot of similar cases. One such case is there are a list of students and each student has a list of marks, a list of achievements, etc.
If I remember correctly I used one storedprocedure to get all the details of all the students. One dataset. And put 'em all in one tablix and grouped 'em.
The sub-lists (like the list of marks) are separate tablixes themselves and are inserted in textboxes of the main tablix.
Hope it helps! :)

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

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.

Microsoft report - how to have two tables with grouping that should shown different records from the same set based on exclusive condition

Maybe the question title is a little confusing, so I'll try to clarify things
In a report I receive a dataset with a datatable which contain records to be shown. I cannot change that (it's not under my control).
The records have a field, RetirementDate, which can be filled or null. Based on this, the records must be shown on two distinct tables on the same report.
Both reports have the same grouping (two groups, on Department an Category, and Category is included inside department).
So reports should looks like this
Table 1 - Non retired (RetirementDate is null)
Department 1
Categ 1
Details ....
....
Categ n
Details ....
Department 2
Categ 1
Details ....
....
Categ n
Details ....
Table 2 - Retired (RetirementDate is not null)
Department 1
Categ 1
Details ....
....
Categ n
Details ....
Department 2
Categ 1
Details ....
....
Categ n
Details ....
What I was tried was to set Filter for table 1 Trim(RetiredDate&"")="" and for table 2 Trim(RetiredDate&"")!=""
But that didn't worked. Table 1 wasn't even shown (even if 90% of records have RetiredDate=null), it just show grand total band, and most records were shown in table 2.
Obvious I missunderstand how Filter on table works
I managed to temporary sort of workaround by setting condition above on Hidden prop on details band of each table, and it kinda worked (except it shows me Department Header / categ header for all dept / categs combinations, no matter they have or no details records - which, obvious, is not good).
Can anyone tell how can I accomplish what I needed? I thought Filter on table should work, but obvious it didn't the way I thought of.
I'm using SSRS 2005, and actually the report is used in offline mode, where the dataset is "pushed" in report before opening by client app and report is loaded in web-based viewer. That's why I cannot change what data I get.
Thank you
You have the right approach. Try using the IsNothing function. In 2008, you can apply a filter to a table. I think there is similar functionality in 2005. If it is like 2008, where you can set multiple formulas (versus the one formula in visibility) then I usually set both formulas to return a string and compare those. So the first formula would be
=IIF(IsNothing(Fields!RetiredDate.value), "Show", "Hide")
Then the second would be ="Show" and I would require that they match.
To debug something like this, you can add the formulas (temporarily) as fields in your table. This will let you see if things are evaluating as you'd expect.
Actually I made it finally by creating a new group, outermost, on IsNothing(RetirementDate), and gathered all data on the same, single table