Print Preview problem

Print Preview problem

Postby dtussman » 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?
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Print Preview problem

Postby dtussman » 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?
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Print Preview problem

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Print Preview problem

Postby Rick Lipkin » Sat Jan 07, 2017 3: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: Select all  Expand view

TPreview():lListViewHide := .T.
 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2633
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Print Preview problem

Postby dtussman » Mon Jan 09, 2017 6:23 pm

Thanks Rick, those thumbnails are useless anyway
dtussman
 
Posts: 97
Joined: Sat Jun 06, 2015 6:57 pm

Re: Print Preview problem

Postby artu01 » 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: Select all  Expand view

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
artu01
 
Posts: 397
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: Print Preview problem

Postby nageswaragunupudi » Wed Dec 21, 2022 5:06 am

Please try this function anywhere in your application
Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Willi Quintana and 30 guests