How to get workflow approvals user names to display in report

Suppose I have a doctype name workflow Test. It has a workflow approvals system. I want to add every approvals user name on the docs report view.
When user A approves first step then his/her name will be added on that doc
then user B approves 2nd step then his/her name will be added on that doc also dynamically.

How can I do this?

Might not be the best approach but can be very effective and easily implemented, you can do this through custom fields.

yap, But the client requirement was something like this. So I have to do this. Anyway thanks for your suggestion.

Not sure what specially your client is asking for but my proposed solution is to create 2 custom fields in your doc let’s call them “first_approver” & “second_approver” which will hold the user who did the workflow action.

Then map them based on your workflow states (let’s say “Primary Approval”, “Approved”);

frappe.ui.form.on("Whatever doc this is", {
  validate: (frm) => {
    if(frm.doc.workflow_state === 'Primary Approval'){
      frm.doc.first_approver = frappe.session.user
    } else if(frm.doc.workflow_state === 'Approved'){
      frm.doc.second_approver = frappe.session.user

Disable the visibility of those fields, then add them to your report/print.
Not tested, might not be the best solution.

Good Luck

it’s not working… :frowning_face:
is there any default system or efficient way to show the approvals name on the print format?