So, 'intranet' and 'client' and 'server'. A network is involved. Is
this web-based or forms-based? Or something else?
'want to push the print button'..where? What 'print button'? In an
app? On a page? From a browser menu? The print screen key combo on the
keyboard? What?
Without more clarity, I'd suggest you use a PDF printer to print the
screen image, and then have your app upload/copy to a server
directory. If you can share the drive, even better, just 'print pdf to
file' from the client machine to the shared server directory.
I'd probably use ActivePDF or Snagit, depending on where you're
putting the screen data and where it's coming from. Snagit can have a
profile configured to even respond to the print screen
button...capture a scrolling window to a PDF and ftp it to your
server.
So there's a web page minimally populated from the DB. The user enters
in a bunch more data, and rather than saving it to the DB again, you
just want to preserve the visual image when they click a button, on
paper and/or in a file.
Given the environment...this seems fairly easy to do in an aspx page,
and even put in some validation.
1. Page state #1, no job number; waits for user to enter one and click a button.
<click for postback>
2. Page state #2, job number, skeleton data retrieved; waits for user
to enter data and click a button.
<click for postback>
3. If there is any validation to do, do it, and if validation fails,
print messages to that effect, and go back to State #2. Otherwise,
validation passes and..
4. Page state #3, user sees page without any input fields, and perhaps
a 'please wait'. Codebehind reads all the data from the page, putting
it into an object, and then uses that object to create a PDF in
memory. PDF is then sent with a specific filename to the shared
directory, and sent to the user's printer of choice. When saving and
printing is all done, tell the user, and either just go to Page State
#1, or give them a 'click here to continue' button (the latter would
be annoying after a while, but you could give them the opportunity to
print again if there was a problem outside of program control.
It's SO annoying to do by hand.