"Auto" Print.

Stimulsoft Reports.WEB discussion
Post Reply
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

"Auto" Print.

Post by brianj774 »

Hi,

I'm looking for a feature which we had on the Flex client, but which I've been unable to find on the MVC viewer.

I have a feature which requests a variable from our datastore, and then, at receipt generation time, controls whether or not the client should "auto" print the document.

Essentially, I need a way to fire the click event for the print button in the UI, as if the user had clicked it.

Is this possible?
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: "Auto" Print.

Post by Vladimir »

Hello,

Please confirm if we have understood you correctly.
You need a way to programmatically (using Javascript) click the Print button in the MvcViewerFx component to display the print dialog?

Thank you.
brianj774
Posts: 177
Joined: Tue Jan 11, 2011 7:15 am
Location: Minnesota

Re: "Auto" Print.

Post by brianj774 »

I won't say 'how' it should work, only that the original app, based in Flex, was able to procedurally determine if we should 'auto-print', and if so, displayed the browsers print dialog.

If that kind of functionality isn't available on the MVC platform, can you make a suggestion of some other way I might implement this?

The use case in question for us is receipt printing. After our end-users have finished collecting payments, we present a receipt document. Based on user configuration, the report should actually print, if their settings say to, otherwise, bypass.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: "Auto" Print.

Post by Vladimir »

Hello,

To print the report just call Javascript function postPrint('PrintWithoutPreview'), it is located in the jsMvcViewer object, where MvcViewer - viewer ID. For example:

Code: Select all

<div width="10" height="10" style="background: black;" onclick="jsMvcViewer.postPrint('PrintWithoutPreview');" />
Thank you.
Post Reply