Zip it, MIME it, FT it, then use Accuterm to "ESC STX <" and un-MIME
it back to ZIP, un-ZIP it, then send it to the user's local printer.
An alternative to the MIME/FT process is to leave the file on your FTP
site, then instruct Accuterm to FTP the file into the user's PC, then
unzip and print as above. That might be faster but it does require
you to have an FTP server open to local and/or remote users.
Sure, the size will increase during the MIME and performance will take
a hit during the compression and file transfer, but this is the way
you've chosen to do it so this is how it has to work.
A method that might be more performant is to put report generation
code on the client and then pipe data into it. Crystal Reports or MS
Access would be good for this. That way you don't need to mess with
PS and you don't have to send gobs of data over the net.
Related to that, this is a good application for PDP.NET or mv.NET.
Once the data is available on the server, AccuTerm can fire-up a
separate dialog that can show the user with a progress bar that their
data is being downloaded and sent to the printer. This frees the
Accuterm session for the user to continue their data entry. Why use
..NET? Because it integrates well with Crystal Reports and many other
VERY impressive reporting tools, and data access is fast and stable.
Again you only transfer the data, not the visual attributes of the
report which is really just a lot of code repeated for as many pages
as you need. For examples of reporting tools, see:
Active Reports: http://www.datadynamics.com
XtraReports and XtraPrinting:
http://www.devexpress.com/Products/NET/XtraReports/
http://www.devexpress.com/Products/NET/XtraPrinting/
I think mv.NET might be best for this application because with the
large amount of data being transfered, the end-user might terminate it
intentionally or accidentally. mv.NET would probably hold up better
because it has a feature called "fetch on demand" which allows it to
pull up data in batches rather than trying to do it all at once. This
is in fact one of the benefits of ADO.NET and the distributed data
architecture. In this scenario, only a part of the selected records
would be called to the client, then as the client is rendering that
data, the connection to the server is free for someone else to use,
and the user can terminate the session without locking up the server.
The client code automatically picks up where it left off until all
records are processed. I need to check PDP.NET v3.0 to see how it
behaves in this regard. I can code up a sample of this synchronous
reporting method in action with mv.NET, but I'll do so only for
someone who's really interested in adopting the technology. Hmm, now
that I think about it, for an added bonus the same code can be used on
the server side just in case your user actually does want reports
generated and then sent to them.
Back on performance, if you're asking the user to print a 12MB file,
data transfer is only 1/2 of your performance problems - the user will
need to wait a good long time for the printer to load and render that
much data.
HTH,
Tony
TG@ yet another application for dotnetNebula-RnD .com
"skypirate" <singdad (AT) singdad (DOT) no-ip.com> wrote:
Quote:
Thx Larry and Ross!
May be I should give the whole picture :-
I tried to send out a Postscript report to the remote client so that
they can print the report locally.
But the problem is... the file is 12meg+ or may be more (depends on the
seletion range) it will take a long time in some slow connection
office (128K or 256K).
I manage to zip it and the file will reduce to 1/10 size.
Problem 1. : FT won't support binary data
Problem 2. : the data need real time so can't be send via email
Rgds, |