Beginning with the power up and after a lot of disk activity, presumably because of those mysterious updates, something seems to have affected A5v11. I have been using my application for years with no problems until 6/23/14. Alpha will no longer recognize more than one printer. It appears to only recognize the last printer installed. I removed and installed both of my printers several times and in different order and A5 only recognizes the last one installed regardless of which one it is. I can print fine to either printer from all applications outside of Alpha. I can even print preview and send to PDF any reports and then print the PDF to either printer.
What I normally do is to set the default printer to the one of choice prior to each report/letter printing using the following:
Tbl = table.open("SysPrntrs",FILE_RW_SHARED)
nrecs = tbl.records_get()
tbl.fetch_first()
while cnt < nrecs + 1
if tbl.Report_Printer = .t.
Rprt_Prntr = tbl.Name
fnd = .t.
'set the printer override, and capture the current override printer name to a variable
a5_previous_printer_name = :report.Printer_override(Rprt_Prntr)
tbl.fetch_next()
cnt = cnt + 1
else
tbl.fetch_next()
cnt = cnt + 1
end if
End While
This has worked fine for years but now after running the above code and then
filter = "vcode = [varC->parameter1]"
query.filter = replace_parameters(filter,local_variables())
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Print
prompt_result = ui_get_print_or_preview("Print")
If prompt_result = "Print" then
:Report.Print("Print_Prgm",query.filter,query.order)
the :Report_Print line generates an error indicating that A5 has trouble communicating with the printer.
Anybody else experiencing this problem?
Thanks for your attention and help.
Gene FitzPatrick
What I normally do is to set the default printer to the one of choice prior to each report/letter printing using the following:
Tbl = table.open("SysPrntrs",FILE_RW_SHARED)
nrecs = tbl.records_get()
tbl.fetch_first()
while cnt < nrecs + 1
if tbl.Report_Printer = .t.
Rprt_Prntr = tbl.Name
fnd = .t.
'set the printer override, and capture the current override printer name to a variable
a5_previous_printer_name = :report.Printer_override(Rprt_Prntr)
tbl.fetch_next()
cnt = cnt + 1
else
tbl.fetch_next()
cnt = cnt + 1
end if
End While
This has worked fine for years but now after running the above code and then
filter = "vcode = [varC->parameter1]"
query.filter = replace_parameters(filter,local_variables())
query.order = ""
'Prompt user whether to print, or preview the layout. Set default to Print
prompt_result = ui_get_print_or_preview("Print")
If prompt_result = "Print" then
:Report.Print("Print_Prgm",query.filter,query.order)
the :Report_Print line generates an error indicating that A5 has trouble communicating with the printer.
Anybody else experiencing this problem?
Thanks for your attention and help.
Gene FitzPatrick
Comment