Skip to Content
author's profile photo Former Member
Former Member

Auto Print From Browser

I have a requirement to "automatically" print a particular report to the printer.

I know that there's a server side print capability provided. But this needs printer configuration on the server end.

But I would prefer to print to the "default" printer configured on user's desktop instead.

Is this possible?

I'm also aware, that CR XI provides a configurable print button on the report itself, but customer doesnt want to click on multiple buttons; to reduce steps and avoid confusion. They just want to click on 1 button, that will bring up the print dialog on user's desktop where user can go ahead and print.

Environment

Currently using CR XI Java Components and Jboss as app server. So the reports are accessed using a web browser.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Jul 24, 2008 at 02:15 PM

    Hello Amit,

    There's not a specific API that would allow for client-side printing.

    The DHTML viewer invokes a JavaScript on the DHTML viewer page to trigger the postback for the print request.

    Last time I accomplished something similar to what you're trying to do, I viewed a report in the viewer, looked at the HTML source, found the JavaScript method being triggered by the print button, used [Charles|http://www.charlesproxy.com/] to find the argument required for that method. Then I coded the viewer to take up a 1x1 size space (so it's hidden), then coded a JavaScript to trigger that method when a link was clicked.

    There's been some sample code kicking around, hopefully someone has a copy (I lost mine).

    Sincerely,

    Ted Ueda

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 02:00 PM

    Hello,

    please see some possible workaround [here|http://www.javascript-page.com/printpage.html].

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 04:26 PM

    Here's one sample. It doesn't set the viewer size to 1x1, but it does all the rest.

    Shawn

    Note: This was for version 11- the javascript method name may have changed - so just view a report in your current version - view the source, and you can check what the function name is.

    Edited by: Shawn Penner on Jul 24, 2008 6:39 PM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.