According to the details you have provided, it appears that you are facing the problem of repetitive entries in your Crystal Reports 2010 because of multiple categories of leaves having different start and end dates for the same employee. To fix this matter and prevent the occurrence of recurring entries, you can follow the below-mentioned steps:
- Create a new formula field in Crystal Reports to calculate the hours for each leave type within the specified date range. In the Field Explorer, right-click on "Formula Fields" and select "New." Give a name to the formula, such as "AdjustedHours."
- Insert a new summarized field in Crystal Reports to sum the adjusted hours.
- Drag and drop the "AdjustedHours" formula field created in the previous step to the desired section of the report (e.g., Details section).
- Right-click on the field, go to "Insert," and select "Summary."
- In the "Summarize Field" dialog, choose the appropriate summary operation (e.g., Sum) and place it in the desired section (e.g., Report Footer).
After following these steps you should be able to calculate the total hours and the adjusted hours (excluding hours within the specified leave type and date range) without duplicating the records.
Hope it helps!