Solved

Remote print to thin client

Posted on 2004-09-02
13
155 Views
Last Modified: 2010-07-27
I have an HTML envelope with a pdi report file which is created by an application that runs on a WEB server. When you click on the HTML file it brings up the browser ready to print the report. IF I know the ip address of a client, how do I send this HTML file to the client automatically after the server generates the report? Is it possible to have the client browser automatically launch to print this report?

The following is the HTML envelope, which prints the report:

<HTML><HEAD>
<TITLE>Report Viewer Control Document</TITLE>
</HEAD><BODY>
<OBJECT WIDTH=100% HEIGHT=100%
  CLASSID="CLSID:66960E23-DE25-11CF-876F-444553540000"
  CODEBASE="c:\rr\rrprview.cab#Version=2,0,0,5">
  <PARAM NAME="LanguageID" VALUE="0409">
  <PARAM NAME="ReportURL" VALUE="c:\home\FREQREPT.pdi">
<EMBED WIDTH=85% HEIGHT=85%
  CLASSID="CLSID:66960E23-DE25-11CF-876F-444553540000"
  CODEBASE="c:\rr\rrprview.cab#Version=2,0,0,5"
  TYPE="application/oleobject"
  PARAM_ReportURL="c:\home\FREQREPT.pdi">
</OBJECT>
</BODY>
</HTML>

I would prefer to use HTML code is possible, but I am open to just about anything. Hope someone out there can help.

Richard

0
Comment
Question by:richard2378
  • 6
  • 5
13 Comments
 
LVL 36

Accepted Solution

by:
Zyloch earned 250 total points
ID: 11965248
Hi

You can use ScriptX's free version. Before I post it, let me tell you that putting it on your site may make the client mad since his printer will just start printing (maybe he just wants to see the report or set some different settings in the Print Dialog). Having said that, here it is:

<HTML><HEAD>
<TITLE>Report Viewer Control Document</TITLE>
</HEAD><BODY onload="stopDialog.DoPrint(false);">
<object id="stopDialog" style="display:none"
classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" viewastext codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=6,1,431,8">
</object>
<OBJECT WIDTH=100% HEIGHT=100%
  CLASSID="CLSID:66960E23-DE25-11CF-876F-444553540000"
  CODEBASE="c:\rr\rrprview.cab#Version=2,0,0,5">
  <PARAM NAME="LanguageID" VALUE="0409">
  <PARAM NAME="ReportURL" VALUE="c:\home\FREQREPT.pdi">
<EMBED WIDTH=85% HEIGHT=85%
  CLASSID="CLSID:66960E23-DE25-11CF-876F-444553540000"
  CODEBASE="c:\rr\rrprview.cab#Version=2,0,0,5"
  TYPE="application/oleobject"
  PARAM_ReportURL="c:\home\FREQREPT.pdi">
</OBJECT>
</BODY>
</HTML>

Regards,
Zyloch
0
 

Author Comment

by:richard2378
ID: 11967171
Thanks for the code update.
 It does make the file print directly to the printer without stopping. Is there a way to change this code so that it only displays to the screen, then the client can choose to print?
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 11968889
Er.. sure. Notice the <body onload> Put that code in an input button, for instance, <input type="button" value="Print Without Dialog" onclick="stopDialog.DoPrint(false);">
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:richard2378
ID: 12000768
This is working greate if I manually click on the file using explore. The browser start up and the report prints, however when the thin client creates this HTML on the server, nothing happens. There is a momentary flash of a character screen on the server and the report doesn't print.

This routine must get lost when the thin client creates and executes it. I must be missing something but I cannot figure what it is. What can I do to make this routine run and print the report on the thin client?

Richard
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12000810
What type of thin client are you using and what browser does it have?
0
 

Author Comment

by:richard2378
ID: 12001061
This is a thin client by zortec. It is an executible than runs by itself, however, there is an active x  version that will run in a browser. I am using microsoft explorer ver 6.

Richard
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12001132
Are you sure the thin client supports ActiveX?
0
 

Author Comment

by:richard2378
ID: 12001225
I have been told by the zortec folks that this thin client version uses active x controls. I have an email into them to find out what is required to set up this version.

Richard
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12001326
If the version above works in IE browsers normally, then it's most likely an incompatibility problem between the thin client and the ActiveX
0
 

Author Comment

by:richard2378
ID: 12001480
I think that I did not explain the thin client topology very well. My fault. There are two versions of the zortec thin client. One uses an exe that runs on the client without a browser, the other is the active x version that runs inside a browser on the client. You must be right the exe version may pose problems with active x logic. Both setups talk to a zortec server and run the applications on the server. I am currently in the process of setting up the active x version but am going to have to do some experimenting, for the documentation on this version is very sparse. (and I am new to this stuff) It seems to me, after thinking more and communicating with you, that the active x version may offer more possible options for printing through a browser.

Richard
0
 
LVL 36

Expert Comment

by:Zyloch
ID: 12090028
If you find anything interesting, or have any problems, please post here.
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question