dbTalk Databases Forums  

Printing to a fax machine.

comp.databases.paradox comp.databases.paradox


Discuss Printing to a fax machine. in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Craig Futterman
 
Posts: n/a

Default Printing to a fax machine. - 12-25-2006 , 02:06 PM






Before I dive into the next project I need to know if this is possible:

I have written some software which creates a letter to a referring physician
about a patient admitted to the hospital. It prints a fax cover sheet and
the appropriate letter. It works very well and the 2 pages are printed as 2
jobs and then faxed by an administrative support person. The program is
being used so much that the administrative support person is getting behind.

They have asked me if can I make it print to WinFax Pro (or some other fax
software).
2 questions:
1) Is that possible and how automatic is it for the user?
a) Can I get Paradox to give the fax software the phone # so they don't
have to punch it into the machine?
2) Can I get the cover sheet and the letter (2 separate reports) to fax at
the same time?

(Most of these physicans do not recieve business e-mail at this time to be
able to do this electronically).

Thanks and I hope all of you (to whom it applies) had a Merry Christmas and
everyone has a happy, healthy, prosporous and safe New Year!

Craig



Reply With Quote
  #2  
Old   
Liz McGuire
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-25-2006 , 02:25 PM






There have been a few posts over the years on using WinFax's OLEAuto
control for faxing. It can be 100% automated if you have a modem
connected - no need for a fax machine.

The other option would be an email server which includes a faxing option
(Exchange and GroupWise have these) where you email
<faxnumber>@domain.com and it sends the email as a fax to the specified
number...

Also, you could try using a faxing app which does import / export (but
these are usually ugly as the fax is a text file). I've got a system at
work that does this with a version of HotFax Share.

I found this, as an example of OLE, on one of the old Corel groups:

Quote:
Here is a sample of using WinFax Pro 9.02 automation server with Paradox
7.0/32:

;----------------
var
oaSend OleAuto
iFaxErr LongInt
endVar

if oaSend.open("WinFax.SDKSend") then
oaSend.LeaveRunning()
oaSend.ShowSendScreen(0) ; don't show the send screen
oaSend.SetPreviewFax(0) ; don't preview fax

oaSend.SetHold(0) ; send fax immediately
; or:
; oaSend.SetHold(1) ; hold the fax & send later

; set cover page
oaSend.SetQuickCover(1) ; use quick cover page
; or, to use your own cover page:
; oaSend.SetQuickCover(0)
; oaSend.SetCoverFile("Full path to cover page fax file")
oaSend.SetSubject("Subject for the fax")
oaSend.SetCoverText("Cover page text")
oaSend.SetUseCover(1)
; or, to not send a cover page:
; oaSend.SetUseCover(0)

; repeat the following statements for each recipient
oaSend.SetTo("Mr. Recipient")
oaSend.SetCompany("Company Name")

; oaSend.SetCountryCode("") ; for foreign phone#
oaSend.SetAreaCode("212")
oaSend.setNumber("555-1212")
oaSend.AddRecipient()
; end of recipient statements

oaSend.AddAttachmentFile("") ; don't create attachment
oaSend.SetPrintFromApp(1) ; fax will be sent to WinFax printer
driver
oaSend.Send(0)

; wait until WinFax is ready
sleep() ; let other windows processes run
while oaSend.IsReadyToPrint() = 0
sleep()
endWhile

;; now print the report to WinFax printer driver
;; can use Paradox report, Crystal Reports or whatever

; wait for WinFax to finish printing
while oaSend.IsReadyToPrint() = 0
sleep()
endWhile

; check for faxing error
if oaSend.IsError() = 1 then
iFaxErr = oaSend.GetLastError()
msgStop("Error","WinFax Send Error: " + strVal(iFaxErr))
endif

oaSend.Done()
oaSend.close() ; close the automation object for each fax job
endif
;----------------
--
....you could make one report where the first page is the cover letter
and the remaining pages are the fax.

FWIW,

Liz


Craig Futterman wrote:
Quote:
Before I dive into the next project I need to know if this is possible:

I have written some software which creates a letter to a referring physician
about a patient admitted to the hospital. It prints a fax cover sheet and
the appropriate letter. It works very well and the 2 pages are printed as 2
jobs and then faxed by an administrative support person. The program is
being used so much that the administrative support person is getting behind.

They have asked me if can I make it print to WinFax Pro (or some other fax
software).
2 questions:
1) Is that possible and how automatic is it for the user?
a) Can I get Paradox to give the fax software the phone # so they don't
have to punch it into the machine?
2) Can I get the cover sheet and the letter (2 separate reports) to fax at
the same time?

(Most of these physicans do not recieve business e-mail at this time to be
able to do this electronically).

Thanks and I hope all of you (to whom it applies) had a Merry Christmas and
everyone has a happy, healthy, prosporous and safe New Year!

Craig



Reply With Quote
  #3  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-26-2006 , 12:31 PM



Craig,

Our solution is simple, robust and versatile.

We use Paradox together with ActFax to do all of the things you want, and
more. For example, you can tell ActFax to send the fax via modem or email
(with the fax as a pdf attachment). ActFax can also receive and print
faxes. We send/receive on average 70 faxes per day with virtually total
reliability. Have been doing so for several years.

What's more, no oleauto required. Just use Paradox to generate a simple
command string either in a text file or imbedded in the document, and ActFax
will do as requested. We prefer the text file approach for 100%
reliability. You can also attach data files to ActFax emails, though we
currently have no need for this feature.

Next to Paradox, ActFax is the finest software application I've ever seen.

If you want to implement ActFax, I'll be happy to help out.

Jean



"Craig Futterman" <craig.futterman (AT) nospam (DOT) comcast.net> wrote

Quote:
Before I dive into the next project I need to know if this is possible:

I have written some software which creates a letter to a referring
physician
about a patient admitted to the hospital. It prints a fax cover sheet and
the appropriate letter. It works very well and the 2 pages are printed as
2
jobs and then faxed by an administrative support person. The program is
being used so much that the administrative support person is getting
behind.

They have asked me if can I make it print to WinFax Pro (or some other fax
software).
2 questions:
1) Is that possible and how automatic is it for the user?
a) Can I get Paradox to give the fax software the phone # so they don't
have to punch it into the machine?
2) Can I get the cover sheet and the letter (2 separate reports) to fax at
the same time?

(Most of these physicans do not recieve business e-mail at this time to be
able to do this electronically).

Thanks and I hope all of you (to whom it applies) had a Merry Christmas
and
everyone has a happy, healthy, prosporous and safe New Year!

Craig





Reply With Quote
  #4  
Old   
Larry DiGiovanni
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-26-2006 , 02:36 PM



Craig Futterman wrote:

Quote:
They have asked me if can I make it print to WinFax Pro
(or some other fax software).
If they have a fax modem and phone line on their computer, you can do it
with Windows only.

Quote:
2 questions:
1) Is that possible and how automatic is it for the user?
a) Can I get Paradox to give the fax software the phone # so they don't
have to punch it into the machine?
I assume you can send this to the job through the prnReportInfo object but
I've never tried. The Windows fax is just another printer you can pick and
set options for.

Quote:
2) Can I get the cover sheet and the letter (2 separate reports) to fax at
the same time?
Not unless you also intercept the job control with the Win32 job functions,
which is really really messy.

Granted, the info you are currently sending in your custom cover page could
possibly just be pushed to one of the default pages.

--
Larry DiGiovanni
Digico, Inc.
IT Consulting and Staffing Solutions
www.digicoinc.com
Check out www.thedbcommunity.com for Paradox resources.



Reply With Quote
  #5  
Old   
marco
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-28-2006 , 03:06 PM



Jean Friedberg wrote:

Quote:
What's more, no oleauto required. Just use Paradox to generate a simple
command string either in a text file or imbedded in the document, and ActFax
will do as requested. We prefer the text file approach for 100%
reliability.

I dont find clear, can you give an example of some code which does not
require to fill manually a fax number, please?


Reply With Quote
  #6  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-29-2006 , 04:14 PM




"marco" <n_sp_hum_marco.foglia (AT) tucsoft (DOT) com> wrote


Quote:
I dont find clear, can you give an example of some code which does not
require to fill manually a fax number, please?
Glad to:

SWITCH
CASE ptrname="activefax" :
intSetResolution= 2
intPrintFromApp = 1
intSetUseCover = 0
intSetHold = 1
intSetPriority = 25
STsetHold = strval(intSetHold)
faxSubject = xxSubject+" / ["+mylib.getuserid()+"]"
faxTo =
iif(Supp_contact.isblank()=false,suppid+"/"+supp_contact,suppid+"/"+name1)
faxNumber = phoneNum ; from form or table lookup
faxSetPriority = strval(intSetPriority)

; make ActFax command string
STdatafield=""
STdatafield="@F5010@"
STdatafield=STdatafield+"@F311"+mylib.getusername( )+"@" ; User name
STdatafield=STdatafield+"@F201"+faxTo+"@" ; Fax to
STdatafield=STdatafield+"@F315"+userID+"@" ; Userid
STdatafield=STdatafield+"@F308"+faxCompany+"@" ; Fax company
STdatafield=STdatafield+"@F307"+faxSubject+"@" ; Fax subject
STdatafield=STdatafield+"@F314"+STsetHold+"@" ; Hold (True=1)
STdatafield=STdatafield+"@F301"+faxSetPriority+"@" ; Priority (H=25/N=50)
STdatafield=STdatafield+"@F3132@" ; Resolution
STdatafield=STdatafield+"@F211"+faxNumber+"@"

; set printer options
repPrintinfo.paneloptions=printcliptowidth
repPrintInfo.nCopies = 1
repPrintInfo.Orient = 1

; write command string to hard drive and use to control print options
success=false
if mylib.makeFieldsDat0(STdatafield)
then sleep()
if POrpt.print(repPrintinfo) ; ActFax automatically looks for command
string in specified location on hard drive
then sleep()
success=true
if porpt.close() then sleep() endif
endif
endif
OTHERWISE :
ENDSWITCH

Jean




Reply With Quote
  #7  
Old   
marco
 
Posts: n/a

Default Re: Printing to a fax machine. - 12-31-2006 , 02:36 AM




Quote:
SWITCH
CASE ptrname="activefax" :
intSetResolution= 2
intPrintFromApp = 1
intSetUseCover = 0
intSetHold = 1
intSetPriority = 25
STsetHold = strval(intSetHold)
faxSubject = xxSubject+" / ["+mylib.getuserid()+"]"
faxTo =
iif(Supp_contact.isblank()=false,suppid+"/"+supp_contact,suppid+"/"+name1)
faxNumber = phoneNum ; from form or table lookup
faxSetPriority = strval(intSetPriority)

; make ActFax command string
STdatafield=""
STdatafield="@F5010@"
STdatafield=STdatafield+"@F311"+mylib.getusername( )+"@" ; User name
STdatafield=STdatafield+"@F201"+faxTo+"@" ; Fax to
STdatafield=STdatafield+"@F315"+userID+"@" ; Userid
STdatafield=STdatafield+"@F308"+faxCompany+"@" ; Fax company
STdatafield=STdatafield+"@F307"+faxSubject+"@" ; Fax subject
STdatafield=STdatafield+"@F314"+STsetHold+"@" ; Hold (True=1)
STdatafield=STdatafield+"@F301"+faxSetPriority+"@" ; Priority (H=25/N=50)
STdatafield=STdatafield+"@F3132@" ; Resolution
STdatafield=STdatafield+"@F211"+faxNumber+"@"

; set printer options
repPrintinfo.paneloptions=printcliptowidth
repPrintInfo.nCopies = 1
repPrintInfo.Orient = 1

; write command string to hard drive and use to control print options
success=false
if mylib.makeFieldsDat0(STdatafield)
then sleep()
if POrpt.print(repPrintinfo) ; ActFax automatically looks for command
string in specified location on hard drive
then sleep()
success=true
if porpt.close() then sleep() endif
endif
endif
OTHERWISE :
ENDSWITCH

Salut Jean,

"@F..." are not very evocative commands...
Your code does not show how command STdatafield is sent to actfax, maybe
it is inside makeFieldsDat0()?

thanks
marco




Reply With Quote
  #8  
Old   
Jean Friedberg
 
Posts: n/a

Default Re: Printing to a fax machine. - 01-02-2007 , 09:55 AM




"marco" <n_sp_hum_marco.foglia (AT) tucsoft (DOT) com> wrote

Quote:
"@F..." are not very evocative commands...
What's your point? Those are ActFax codes, and with the codes the user has
a complete command set that avoids the necessity of oleauto programming.

Quote:
Your code does not show how command STdatafield is sent to actfax, maybe
it is inside makeFieldsDat0()?
Yes it does:

; write command string to text file on hard drive and use to control print
options
success=false
if mylib.makeFieldsDat0(STdatafield) ; this library function writes the
command string to a text file on the hard drive
then sleep()
if POrpt.print(repPrintinfo) ; on the command to print, ActFax
automatically finds the command string and prints the report
; as a fax
endif




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.