• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 164
  • Last Modified:

Remote print to thin client

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
richard2378
Asked:
richard2378
  • 6
  • 5
1 Solution
 
ZylochCommented:
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
 
richard2378Author Commented:
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
 
ZylochCommented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
richard2378Author Commented:
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
 
ZylochCommented:
What type of thin client are you using and what browser does it have?
0
 
richard2378Author Commented:
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
 
ZylochCommented:
Are you sure the thin client supports ActiveX?
0
 
richard2378Author Commented:
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
 
ZylochCommented:
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
 
richard2378Author Commented:
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
 
ZylochCommented:
If you find anything interesting, or have any problems, please post here.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now