Finding card values when document was last in issued state

I am working on a report in this report I need to show the document properties / card values for the selected document when it was last in the state issued.

Where I am stuck at the moment is finding the version / revision of the document that relates to the last time that document was in the issued state.

Any help will be appreciated thanks

SolidworksSolidworks Pdm enterprise Pdm