• Below are instructions for handling your concern in SSRS, the case expression should handle it in SQL.

    I set up a simple data set to make this work, containing the following:

    select

    'c' as event_type,

    1 as incident_ref

    What I gathered from the original Crystal report is that it checks the value of the "event_type" and if it is "c" then it takes the value in "incident_ref" and applies some formatting to it.

    Below is the code to make it do that in SSRS (note the ".value" after both the event_type and incident_ref field references):

    =iif(Fields!Event_Type.Value = "c","R" + Format(Fields!incident_ref.Value,"00000"),iif(Fields!Event_Type.value = "i",Format(Fields!incident_ref.Value,"00000"),"P" + Format(Fields!incident_ref.Value,"00000")))

    With the sample data the report returns the expected result as you can see in the picture.