Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to display a record in multiple groups

Crystal Reports

We perform Preventive Maintenance on equipment and there is a field called {PLT_PREVENTIVE_MAINTENANCE.NEXT_SCHEDULED_DATE} . If I were to run a report, I could display all the PMs grouped by next scheduled date. The problem is that some of the PMs are recurring. I want my monthly PMs to display again for each month, quarterlies to display every 3 months etc.

The formula I tried was

if {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY} = 1 and {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY_MEASURE} = "months"

then  DateAdd ( "m", +0 ,{PLT_PREVENTIVE_MAINTENANCE.NEXT_SCHEDULED_DATE} )

else

f {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY} = 1 and {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY_MEASURE} = "months"

then  DateAdd ( "m", +1 ,{PLT_PREVENTIVE_MAINTENANCE.NEXT_SCHEDULED_DATE} )

else

f {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY} = 1 and {PLT_PREVENTIVE_MAINTENANCE.FREQUENCY_MEASURE} = "months"

then  DateAdd ( "m", +2 ,{PLT_PREVENTIVE_MAINTENANCE.NEXT_SCHEDULED_DATE} )

etc

The result of the above should have a monthly PM appear in the month of its next scheduled date, and again in each of the following months.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question