Solved

Remote print to thin client

Posted on 2004-09-02
13
154 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
 

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now