How to report out the frontmost process as text

Is there a way to get the result of this script to report out as text?

tell application "System Events"
	set frontmostProcess to first process where it is frontmost
display dialog frontmostProcess as text
end tell

I’m not sure how to coerce this information into text.

Also, bonus points to anyone who can tell me if there is a way for me to report out which documents the frontmost process has open (this process doesn’t have a an applescript dictionary).

tell application "System Events"
	set frontmostProcess to name of application processes whose frontmost is true
end tell
display dialog frontmostProcess

It’s easy to get the name of the windows.

tell application "System Events" to tell process "Preview"
	set frontmost to true
	name of windows --> {"Everyday AppleScriptObjC 3ed.pdf (page 1 sur 153)", "Crédit Agricole Provence Côte d'Azur - diversification.pdf (page 1 sur 4)"}
	title of windows --> {"Everyday AppleScriptObjC 3ed.pdf (page 1 sur 153)", "Crédit Agricole Provence Côte d'Azur - diversification.pdf (page 1 sur 4)"}
	document of windows --> {missing value, missing value}
end tell

As you may see, it’s not always the name of the document.
In such case a bit of cleaning is required.
You may also see that document of window may fail to return useful infos.

Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) jeudi 23 mars 2017 11:59:57