FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Print Preview problem
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM

Print Preview problem

Posted: Fri Jan 06, 2017 11:14 PM

In the last few days a few of my customers have been having problems with the Preview function, and I have noticed it as well. Sometimes when generating a report it will take an extra long time for the Preview screen to pop up, and then oddly all the pages will be blank, even though the thumbnail images at the left will all be filled in. Usually if you close the program and reopen it that will fix it. Any ideas what could be causing this?

Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM

Re: Print Preview problem

Posted: Fri Jan 06, 2017 11:20 PM

Also I noticed that using the Preview function if you click the button to save it as a Microsoft Word document it saves it as an image and so you can't edit the text at all. Is that the best we can do?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Print Preview problem

Posted: Fri Jan 06, 2017 11:53 PM
dtussman wrote:Also I noticed that using the Preview function if you click the button to save it as a Microsoft Word document it saves it as an image and so you can't edit the text at all. Is that the best we can do?


Yes.

The preview program itself receives images in the form of metafiles ( *.emf ). It does not have any idea of the contents of these images. What preview program does is to simply display these images and where required embed these images into Word or PDF files for export.

If we want contents to be exported to Word, the appropriate stage is when we generate report. Instead of sending to printer or preview, we need to send it to Word.

If we want to export from XBrowse, we can use oBrw:ToWord(). This exports the contents to a Word Table.
If we generate our own report, then we need to write our own routine to export to Word.
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: Print Preview problem

Posted: Sat Jan 07, 2017 03:51 PM
dtussman

If you would like to globally turn off the previewer thumbnails .. add this to the top of your program .. this may solve your intermittent problem by not showing the thumbnails at all ....
Code (fw): Select all Collapse
TPreview():lListViewHide := .T.


Rick Lipkin
Posts: 102
Joined: Sat Jun 06, 2015 06:57 PM

Re: Print Preview problem

Posted: Mon Jan 09, 2017 06:23 PM

Thanks Rick, those thumbnails are useless anyway

Posts: 400
Joined: Fri May 11, 2007 08:20 PM

Re: Print Preview problem

Posted: Tue Dec 20, 2022 11:18 PM
Mr. Rao
I have installed msword into my computer
but i got this message : word is not installed
Code (fw): Select all Collapse
REDEFINE BTNBMP oBtn ID 4014 OF oDlgDet UPDATE PIXEL 2007 NOBORDER CENTER  ;           //38
ACTION (  oExcel:=oBrwDet:ToWord()       )
oBtn:cTooltip := "Exportar Lote"
Why?
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Print Preview problem

Posted: Wed Dec 21, 2022 05:06 AM
Please try this function anywhere in your application
Code (fw): Select all Collapse
function test()
local oExcel, oWord

oExcel := ExcelObj()
oWord := WinWordObj()

? "Excel " + If( oExcel == nil, "not ", "" ) + "installed"
? "Word " + If( oWord == nil, "not ", "" ) + "installed"

return nil

Please let us know the result.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion