print preview
Moderator: Rathinagiri
print preview
I have a new client and when using print preview she picks print to the disc (file) then program seems to loose it`s current file and index.
I would like to take the disc out of print preview... is this possible.
Thanks in advance,
Franco
I would like to take the disc out of print preview... is this possible.
Thanks in advance,
Franco
All The Best,
Franco
Canada
Franco
Canada
Re: print preview
Maybe using the controls nosavebutton, haven't tried it yet
Robert
Robert
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: print preview
Hola Franco no entiendo muy bien lo que te pasa. Creo entender que cuando terminas la rutina del REPORT y regresas al control del programa los registros del fichero activo se te han perdido y no se muestran en pantalla (GRID,BROWSE....).

Si es eso, te diré que a mi también me ocurrió y lo solucione así,
Code: Select all
cAlias:=DBF() // Me guardo la DBF Activa
_ALREPORT()
DBSELECTAREA(cAlias) // Regreso el control

Espero te sea de ayuda, saludo virtual
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. 

Re: print preview
Thanks guys,
Robert I will try, makes sense.
Sal.. I have a few files open with relations. This seems to me a problem with all reports. No one has ever used the disk before. Works ok if pick
down arrow and pick file instead of default printer or any printer.
I would like to go into print.ch and take out the disk,
Anymore thoughts.
Robert I will try, makes sense.
Sal.. I have a few files open with relations. This seems to me a problem with all reports. No one has ever used the disk before. Works ok if pick
down arrow and pick file instead of default printer or any printer.
I would like to go into print.ch and take out the disk,
Anymore thoughts.
All The Best,
Franco
Canada
Franco
Canada
Re: print preview
This is because when saving a printout, the current working folder is changed.
There are two solutions:
1. By changing the HMG sources: in the h_controlmisc.prg file in the _HMG_PRINTER_SavePages function find the line
Code: Select all
cFullName := PutFile ( acFilter, NIL, cFolder, .F., cFileName, @cExtFile, i )
2.Without the required changes to the HMG sources: store the current working folder before start print and then restore the original path of the working folder right after end print
Code: Select all
cCWD := HB_CWD()
START PRINTDOC
(...)
END PRINTDOC
HB_CWD( cCWD )
Re: print preview
SALINETAS24, I tried nosavebutton does not seem to work. execute report re nosavebutton preview select printer.
execute report re preview nosavebutton select printer.... execute report re preview select printer nosavebutton
Tied all of the above.
EDK , I tried changing the source and buildalllib32.bat and rebuild project. Does not seem to work.
Setting the cCWD may work but I need to add it to all my print procedures. Also in print preview it does not leave the preview after
disk save so when printing to printer there is still a problem.
I still think by removing the disk on the preview screen is what i need. or make it not work in a _h program with a msg.
execute report re preview nosavebutton select printer.... execute report re preview select printer nosavebutton
Tied all of the above.
EDK , I tried changing the source and buildalllib32.bat and rebuild project. Does not seem to work.
Setting the cCWD may work but I need to add it to all my print procedures. Also in print preview it does not leave the preview after
disk save so when printing to printer there is still a problem.
I still think by removing the disk on the preview screen is what i need. or make it not work in a _h program with a msg.
All The Best,
Franco
Canada
Franco
Canada
Re: print preview
Franco, try to prepare a small example to illustrate your issue. It's possible that I misunderstood.
Re: print preview
When I use
execute report ?.. preview select printer
I get a pick menu with print preview < > << >> (go to page) (thumb nail) (hour glass) (printer) (disk) (return arrow)
I want to remove the disk from the context menu, customer can not print to file from here.
execute report ?.. preview select printer
I get a pick menu with print preview < > << >> (go to page) (thumb nail) (hour glass) (printer) (disk) (return arrow)
I want to remove the disk from the context menu, customer can not print to file from here.
All The Best,
Franco
Canada
Franco
Canada
Re: print preview
If you want to permanently disable the save button in the print preview, replace the i_print.ch file from the attachment and rebuild the HMG.
If you want to extend the functionality of Execute report with the optional disabling of the save button, I will try to prepare something for tomorrow.
If you want to extend the functionality of Execute report with the optional disabling of the save button, I will try to prepare something for tomorrow.
- Attachments
-
- i_print.zip
- (6.29 KiB) Downloaded 114 times