Crystal Reports 2013: Inconsistent Page Header Formula Fields - reporting-services

Background
I am using Crystal Reports 2013 SP1 to create a customized invoicing report for a client. This client requires invoicing to be combined onto one 'consolidated invoice' for each of their products. Client invoices are typically created at each originating location of the work for each version of each product. As you might imagine, a client with many products can receive many invoices! So, in order to achieve this consolidation, I created two Formulas:
ProdNameNoDig - A string field that removes the word 'Digital' so that versions are grouped together (i.e. both 'traditional' version charges and 'digital' version charges are included on the same 'consolidated invoice').
InvLocation - A string field that indicates a region so that multiple originating locations can be grouped together (e.g. invoices normally be split by City1, City2, City3, but will now all be included as Region1 on the same 'consolidated invoice').
I then grouped the data by ProdNameNoDig, then InvLocation, then InvoiceNumber, then LineItem. Here is a snapshot of the Design View with the Group Expert open:
When I view the reports, they are grouped properly- all of the invoices for a product's versions are grouped by region, and all of the details display as I intend.
The Problem
Here is the issue occurring when the report is created:
Product A, Region 1- Everything looks fine.
Product A, Region 2- Everything looks fine.
Product B, Region 1- Green circled areas of the report have the correct data. Red circled areas of the report use the ProdNameNoDig and InvLocation of Product A, Region 2
Product B, Region 2 - Everything looks fine.
Product C, Region 1- Green circled areas of the report have the correct data. Red circled areas of the report use the ProdNameNoDig and InvLocation of Product B, Region 2
This continues through the entire report
After the final product's last region, a blank (includes only the Page Header and Page Footer) page is created with the ProdNameNoDig and InvLocation of the final product's last region.
The Page Header is not properly displaying ProdNameNoDig or InvLocation (circled in Red) after a change in Group 1 (ProdNameNoDig). The SAME FIELD shown twice elsewhere on the report (circled in green) displays the correct information for the group being reported. The Page Header displays the information for the previous group! Why is a reference to the same Formula Field displaying different information in different parts of the report?

What you can do is create a section B on your location group, move everything from A to B and copy the info on you PH to A. Then suppress you PH when pagenumber <> 1 and same for section A, but when pagenumber = 1. In that way your info will be changing once your group change.

To the extent I understand your problem... whenever there is new Group you are facing this issue where last group2 and group1 are displayed in page header.
Without knowing how your data is getting printed as how group2 extends and where group1 starts.. my assumption is group1 is not starting when a new page starts and hence it still holds the previous value of group2 and group1...
one wayout would be instead of page header create one more group section of Group1 and display there your data.
Coming to the green area where data is correctly displayed.
One is in group2 which holds the group1 data as group2 comes after group1 and displayed correct.
second is page footer which comes after the group1 changes its values and correct data.
Let me know if it is not clear

Related

SSRS Total by Type

I am new to SSRS. I have a report that goes like this
Type Amount
A 500
B 200
A 100
C 400
C 200
I want to convert this to a report like this
Type Total Amount
A 600
B 200
C 600
Basically get distinct Types on the left column and th totals for those types in the right column. Is there a way i can do that easily?
Thanks
Starting with you simple report which just lists the records in your DataSet:
Design:
Results:
Right click on (Details)in the Row Groups section and choose Add Group -> Parent Group:
Choose the field you want to group by (Type in our example) from the Group by: dropdown, choose to add either a group header or footer and click OK:
Your table will now look something like this:
You can delete the second column and the third row - or second row if you chose to add a group footer earlier - entirely (clicking OK when deleting the row and being prompted to delete the associated group), leaving a layout like this:
Now just click the field selector for the empty cell in the table and choose your Amount field:
or right click on the empty cell, choose Expression from the context menu and enter the following expression:
=Sum(Fields!Amount.Value)
either of which should result in the formula being placed into the cell:
Now run your report and you should get the expected result:
There's loads of places online with similar guides and resources which you can also consult:
MSDN Reporting Services Tutorial (Adding Grouping and Totals)
MS TechNet (Calculating Totals and Other Aggregates)
MSDN (Add a Total to a Group or Tablix Data Region)
There are also several other similar questions here on SO which you'll find if you just search for them.

Display footer once in a multiple-page in SSRS

I am customising a SSRS report in MS report builder 2014.
Current Condition
In this report, the body displays invoice info per customer ID, which may varies from 1 to multiple pages. e.g. the customer TEST001, there are 100 invoice line from INVC10001.... to INVC10100 with coresponding amount info, which is pirnted in 3 pages.
The report will start a new page for each customer ID.
The Remittance info (contains variable data and dynamic data) in the footer currently displays on every single page of the report. Take TEST001 as example, the payment bank info will be printed 3 pages under TEST001.
New Requirement
for those customer ID report lasting more than 1 pages, how can I display the remittance info on last page of the footer only under that customer ID(e.g. only print the bank info on page 3)?
Place this code in the Hidden property for any objects you only want to show on the final page.
=iif(Globals!PageNumber=Globals!TotalPages,false,true)

Microsoft Access reporting -GROUPBY

I'm trying to build a report in microsoft access. I have a company name called "FRPP" and I need to display number of employees, etc. The issue is, I have many subdivisions of FRPP that are in different locations. So I have:
FRPP - ASIA
FRPP - EUROPE
FRPP - AFRICA
FRPP - SOUTH AMERICA
Now, what I'm trying to do is GROUPBY by 'FRPP'. How would I do that? So I only have one instance of FRPP with a Employees: SUM(employees).
Unfortunately I normally do all this sort of thing in my SQL Server backend, so not 100% sure it will work in Access, but try something like
SELECT SUM(Employees), LEFT(CompanyName,4) AS MainCompany FROM Company GROUP BY LEFT(CompanyName,4)
If company names are all different lengths you will have to work out a way to calculate how much should be in the Left function (Use Instr to get the index of a space?)
In the Report Design Tools, on the Design tab, there is a button for Group & Sort. Click that, and then click on the Add A Group button that appears on the bottom of your form. Group by your Unique ID and add that to the Header section of the form. Add each field you want into the Detail section, and change the formulas to
=Sum([YourFieldName])
Change YourFieldName above to whatever your actual field name is.

Show column from database in report footer of SSRS

Is it possible to show data from database in SSRS footer?
I tried but the only option present is to show first record from dataset. But I want to show all records (I just need to show one column) one by one on each page.
Is it possible?
Based on your comment I believe this link Display on Page Footer is what you are looking for.
I tried this and it works on Page Footer.
One way to do this is by making your report a list of subreports.
Make a new report with a List item and a dataset that gets a set of all the departments you are going to get. Consider this to be your "List" report.
Populate the list with the dataset. Put a page break between List item members.
Make another report (or modify your existing one so) that is designed to be a single-page report about a single department, so #department will be one of the parameters. It contains all the data you want on each page of your report, including the footer with the Department name, which it gets from the department parameter, so it doesn't need to get it from a dataset. Consider this your "Base" report.
Going back to your List report, put a sub-report in your List item, point the sub-report to your Base report, and populate the department parameter with the value from the dataset that is populating the List.
Yes, it is possible using the "Lookup" aggregate function.
Assume, your report has a dataset named "Department_DataSet" which contains all the department's data plus one additional column e.g. PageNum, that contains an integer sequence starting from 1, giving you, basically, a sequence of the report page numbers:
PageNum | DepartmentName | Address | etc.
--------+------------------+------------+-----
1 | Department 1 | ... | ...
2 | Department 2 | ... | ...
...
N | Department N | ... | ...
Now, add a Textbox into the footer and assign the following expression to it:
=Lookup(Globals!PageNumber, Fields!PageNum.Value, Fields!DepartmentName.Value, "Department_DataSet")
and it will show the department name as required, but please ensure that the page numbers go in the same order as the departments in your detail report.

Creating multiple-page reports in Access (new page for each group)

I'm looking to create a report which is specifically designed to be over multiple pages, based on one condition. The condition is that when the grouped item (call it invoice) changes, it starts a new page, instead of putting all the data on as little pages as possible.
At the moment it runs like this,
Invoice, Date, ID
------------------
2 , Now , 1
------------------
3 , Now , 1
------------------
I want to insert a page break between the invoice numbers, but can't figure how to do it, is it possible?
In the Group Header for "Invoice" on your report you can set the Force New Page property to Before Section to start each invoice on a new page. For details, see
Print each group of your Access report on a separate page