Skip to Content

I need to take out duplicates from date column in cross tab in crystal report

In cross Tab:

One column is date. I need to show only month in following order fiscal year order:

April

May

june

July

August

September

october

november

december

january

febuary

march.

It should not be more than one time. While I am trying I am getting duplicates months in the column. So month should not be more than one time. I am using crystal report 8.0

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 26, 2017 at 10:56 PM

    Hi,

    When you group your date, are you grouping for each month?

    Are you selecting a specific fiscal year?

    My guess as to why you are getting repeating months is because you are including multiple years, that is if you are grouping by month.

    Have a look at the Group Options in the Crosstab Expert for the month field.

    Brian

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Create your FY as:

      If Month ({Orders.Order Date}) In [4 to 12] Then 
          Year ({Orders.Order Date}) 
      Else Year ({Orders.Order Date}) - 1; 

      Create your FM as:

      Select Month ({Orders.Order Date}) 
          Case 4: 1 
          Case 5: 2 
          Case 6: 3
          Case 7: 4 
          Case 8: 5 
          Case 9: 6 
          Case 10: 7 
          Case 11: 8 
          Case 12: 9
          Case 1: 10 
          Case 2: 11 
          Case 3: 12 
          Default: 0; 

      To display the month as a name instead of a number, go into the Group Options for the FM formula and in the Options tab select Use a Formula as Group Name as use this formula:

      ["April", "May", "June", "July", "August", "September", "October", "November", "December", "January", "February", "March"] [{@FM}];

      That should do it.

      Brian