Active Reports 7 - Grand Total of each row in Detail Section - activereports

I have a report in which I need to calculate some totals for each rows in detail. I need to get the DataField 'Movie_Code' of each and make a sum of his columns to have a grand total at the end of the page. The code can be in multiple places since it's regrouped by Client.

If you wish to display the GrandTotal for the details rows on each page then I would suggest you to place a textbox in the PageFooter section and set the following properties for it:
DataField: Movie_Code
SummaryFunction: SUM
SummaryRunning: All
SummaryType: GrandTotal
This will show the total of each rows in the detail section for the current page and the detail rows on the previous pages.

You will have to add the GroupHeader/Groupfooter sections and the Summary field in the GroupFooter.
Set the DataField property for GroupFooter Section and then place a textbox in GroupFooter and set the SummaryType and Summaryfunction properties. Refer to the given link for details :
http://helpcentral.componentone.com/nethelp/AR7Help/OnlineEn/CreateaSummaryReport.html
You may add the field in the detail section itself and set the mentioned properties accordingly.
Regards,
Mohita

Related

Crystal Report: skip page if detail section is null

I have a subreport to filter the processing of specific products within a selected week set by the user. The subreport has 5 groups section and a detail section.
Specifically, the groups filter the data like this:
Group1: filters the starting date of the process
Group2: filters the products' group
Group3: filters the products' code
Group4: filters the products' number
Group5: filters the products' sub-number
I use group1 section for writing some simple text. In the detail section, I put some fields. Now when I have no record in the detail section, the sub-report prints the text of group1. For example, because in the day of the print there isn't any processing work.
How can I skip the page if the detail section has no records? (Or perhaps it is necessary to suppress the group1?)
Try to right click on the section, go to section expert, and check suppress blank section. This should hide the section if there are no values for that particular day
You should try supressing the group 1 if the details section is null. I'm not sure that you can actually skip a page.
If you are wondering how to know if the details section is null, maybe using a shared variable inside that section, which will count how many records will be inside the details section, to be used in the supression formula for the group 1.

Crystal Report Show Total Only On Last Page

I have a formula that calculated price total of an invoice eg. #vtotal. The invoice page could span from 1 to n page. I would like to show the total only on last page. How do I do that?
I have searched and tried on some suggestions using report footer, but it does not work as it implies, the report footer always show in tandem with page footer.
I have also tried using formula:
if PageNumber = TotalPageCount then
{#vtotal}
It still display 0 on pages with PageNumber < TotalPage Count.
How to do it correctly to only show on last page? And nothing on other.
Create group over invoice ID (or whatever field identifies invoice uniquely) and show your formula in group footer.
/edit after comments/
Alternative way is to supress some formulas in page footer section. Place your {#vtotal} into page footer (like it was initially) and create suppress formula for it, with content like
{PageNumber < TotalPageCount}
You need to somehow account for situations, when you print more than single invoice - if this is possible for your setup of course.
You Can write Grand Total in Report Footer. So it will display in only last page.

Display information at end of each record not last record-crystal reports

I want to display a footer note at the end of each record. Most records only span one page so the footer displays at the end of the page. Although some records span two pages (because of a lot of data) and the footer display on both pages.
What I want is to only have the footer display on the last page if the record spans two pages.
I've placed my information in the page footer but can't figure out how to make it appear on the last page of each record.
Any ideas?
Thanks
You can achieve it in two ways.
Use grouping if each record has a unique column. Insert a Group for that unique column. You can use Group Expert to achieve that. Hide/suppress the Group Header Section and put your footer information in the Group Footer Section.
If grouping is not achievable then you can sub-section your Details Section. To achieve that Right click on your Details section and select Insert Section Below. A new sub-section under details will be created. Writer your footer information in this sub-section. If there are multiple sub-section of Details Section then this footer sub-section must be the last sub-section.
To move your sub-sections / groups up and down you can use options available in Section Expert

Set size of detail section in Crystal Report

I m generating Bill report using crystal report in VS2008..in that, details section size is dynamic.
i.e. depend on number of records, it changes. so if I've 10 records the report view is full page that is k ..but if i have 2 records in details sections, then whole page footer section getting stick to details page..so whole alignment is getting change
so is there any way to set details section fixed i.e. for 10 records and if records exceed more, then all records on same page and remaining data will go on next page i.e report footer,page footer.
Is there any setting in crystal report
Ok, i can give you some tips on how you can approach your desired outcome.
The Crystal Reports engine has the following characteristics.
The Report Header appears on the top side of the first page only.
The Page Header appears on the top side of every page (on the first page it is under the Report Header).
The Report Footer appears only once, on the bottom side of the detail section on the last page.
The Page Footer appears on the bottom side of every page.
There is a capability in every section that allows you to suppress it if you don't need it. It can be done by right clicking the bar of the section that you want to suppress and pressing the suppress choice from the menu that will appear.
Consider the 2 following cases.
If you want to achieve the first case, change the height of the Page Footer to a value that will allow only 10 records to show on the Details section, include all the footer information in the Page Footer and suppress the Report Footer. If you want the same result but with the footer information appearing only on the last page, right click the bar of the Page Footer and select Section Expert. From there, press the x+2 sign next to the Suppress CheckBox and add the following code there.
if pagenumber <> totalpagecount then
true
else
false
If you want to achieve the second case, change the height of the Page Footer to a value which will allow only 10 records to show on the Details section and include all the footer information in the Report Footer section.
In both cases the Report Header is suppressed.
Go to Section Expert
select report footer
Tick the Print at bottom page and Keep together option
Problem will be solved
First of all fix height detail section by right click on detail section Detail Section->Section Expert click on paging Tab->Check in New Page Before checkbox and beside it (x+2)button write formula-> (Suppose you want 8 rows to display in your report per page and additional rows(9th row,10th row and so on... to another page) IF Remainder (RecordNumber, 9) = 0 THEN TRUE ELSE FALSE so now your height is fixed.. and for blank rows suppose 2 records/rows are coming from data table/data source then from 8 fixed rows , 6 rows should be blank rows for that.. design your detail section with fields and keep report footer(section 4) blank with with some spaces(i want 8 rows fixed so keep size of 8 rows blank assuming in report footer) and put footer details in your section 5(page footer)..
if your header or footer is not visible on another page then put all header parts details in page header and footer details in page footer
:)

In Crystal Reports, How do I count all the rows in the Details section and place that count in the header?

I've tried adding a new formula and used this code:
whileprintingrecords;
numbervar x;
x := x + 1;
Problem is, if I place the formula that displays the count on the header section, it only shows the first value since it hasn't yet incremented.
I need a total count of the rows in every page and just show it in the header. how do I do this?
Wait I just realized it is placed in a group not in the details section. Let me revise my question. How do I get the value of the display formula in the last page of the report? Makes sense?
The simplest way to get a total count of all the rows within the report and place it in the page header is to create a new formula, with the value:
Count ({Table.Value})
and place it in your page header (where Table.Value is a field in your dataset).
EDIT: To get a total count of all the groups, change the formula to:
DistinctCount ({Table.GroupField})
Right-click on any field in Details section, Insert Summary, select Count(), drag resulting field into page (report, group) header.
I just summarized the field with Count and put it to Group Header That's It.