4

How to add running total in crystal reports having multiple columns?

e.g I have created a report with Multiple Columns layout(Down then across). Apart from the first column no column shown in the report so how should i suppose to add running totals of those fields that are not displayed in the designer.

Kindly view the designer image

enter image description here

Thanks

manav inder
  • 3,531
  • 16
  • 45
  • 62

2 Answers2

0

By right-clicking on Running Total Fields and selecting New... in the Field Explorer pane within the Crystal Reports designer, for each required running total.

You will need to drag and drop each running total field from the Field Explorer to the appropriate point in the report.

  • Hi Mark, thanks for your input, i believe i did not clear my question, kindly see my EDIT – manav inder Feb 18 '12 at 04:51
  • @MSingh: Hi - the above should cover it; create running totals of the desired fields, then drag and drop them into the desired position on the report layout. If there is something missing from this description, then please could you explain the problem in more detail? –  Feb 18 '12 at 11:37
  • I was too sure that this won't work, but still i test it as you were so sure, but it didn't work, kindly check my edit. i add new screenshots. i believe you are not getting MULTICOLUMN LAYOUT – manav inder Feb 18 '12 at 15:50
  • @MSingh: You didn't say that you wanted these to appear in the page footer - so I assumed you wanted to add them to your details section. Why not adapt craig's answer to your previous question: http://stackoverflow.com/questions/9111301/page-total-for-multicolumn-in-crystal-report ? –  Feb 18 '12 at 16:09
0

The solution is similar to your previous question.

You can download my sample http://tickett.net/downloads/crystal/column_totals.rpt

In page header create and add a formula:

whileprintingrecords;
global numbervar col1 := 0;
global numbervar col2 := 0;

In the detail section create and add a formula:

whileprintingrecords;
global numbervar col1;
global numbervar col2;
if recordnumber mod 2 = 1 then col1 := col1 + {value_field} else col2 := col2 + {value_field};

In the page footer create and add two fomulas:

whileprintingrecords;
global numbervar col1;

And:

whileprintingrecords;
global numbervar col1;
Lee Tickett
  • 5,847
  • 8
  • 31
  • 55
  • Hi lee, i've tries your approach, that works fine for 'AcrossThenDown' but what should we suppose to do if we need to go with 'DownThenAcross' – manav inder Feb 28 '12 at 03:56
  • the only way i can think is if you can guarantee the number of rows per column? or how about approaching it differently- could you split the dataset in 2 and use a subreport for the left column and another subreport for the right? – Lee Tickett Feb 28 '12 at 07:21
  • 1
    As compare to these, your above specified solution is fine, atleast now i have other two options in hand, if a want to change my layout to 'DownThenAcross'. Thanks – manav inder Feb 28 '12 at 11:40