Search code examples
crystal-reports

How to add grandtotal to a crystal reports crosstab report


I created a crosstab crystal report (2013). I have it in a group header, I want a grand report total for each column: fluidspart, shopfee, standardlabor, standardpart, standardservices, tirepart. I'm not sure how to go about doing that part. Picture can be found here of the report:

http://i.imgur.com/TDBbvim.png


Solution

  • Take one more cross tab in Report Footer and place all the fields that you have place in first cross tab and display.

    Edit---------------------------------------------------------------------

    To get the prefix

    Assuming your parent database field is parent.

    Create a formula @Prefix write below code and use that formula to group.

    {Parent}[1]+{Parent}[2]
    

    This will pick RC and group by the formula

    Edit2------------------------------------------------------------------------------

    Follow below process to supress.

    1. Create a formula @Reset and place in group header.

      Shared Numbervar count;
      count:=0
      
    2. Create one more formula @Increment and place in details.. if your customers are in detail

      Shared Numbervar count;
      count:=count+1;
      
    3. Now in supress of the Parent group footer write below formula.

      EvaluateAfter({@Increment});
      Shared Numbervar count;
      
      if (count>1)
      Then true
      Else False
      

    This will supress the group total