RPreview FWH 13.07 Bug?

RPreview FWH 13.07 Bug?

Postby David Williams » Sat Aug 03, 2013 3:53 pm

Hi,

I am getting a number of errors in preview when clicking the PDF, Email buttons etc. in FWH 13.07 & XHarbour latest.

See errors below. Has anyone else managed to fix rpreview.prg before I attempt patching it?

TIA
David

** Export to PDF **

Error description: Error BASE/1004 Class: 'NIL' has no exported method: CNAME
Args:
[ 1] = U

Stack Calls
===========
Called from: => CNAME( 0 )
Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:BUILDBUTTONBAR( 383 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 471 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 662 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1719 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1465 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3183 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 274 )

** Send by email as PDF **

Error description: Error BASE/1004 Class: 'NIL' has no exported method: CNAME
Args:
[ 1] = U

Stack Calls
===========
Called from: => CNAME( 0 )
Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:SENDEMAIL( 1836 )
Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:BUILDBUTTONBAR( 388 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 471 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP( 662 )
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT( 1719 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT( 1465 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3183 )
Called from: => DIALOGBOX( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 274 )

** Export to MS Word **

No Problems, it works well.

** Export to Excel **

Nothing Happens?
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland

Re: RPreview FWH 13.07 Bug?

Postby elvira » Sat Aug 03, 2013 3:59 pm

Hello,

Any update?.
Last edited by elvira on Sat Aug 24, 2013 5:55 pm, edited 1 time in total.
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: RPreview FWH 13.07 Bug?

Postby David Williams » Sat Aug 03, 2013 4:32 pm

Elvira

Prev32sp.dll and Prev32uk.dll in fwh\samples or fwh\dll, have all bitmaps OK, but not Prev32.dll

David
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sat Aug 03, 2013 5:05 pm

William,

Yes, it fails on direct previews from the printer. From reports is fine.

We are fixing it and it will be available in the next minutes. We will email you the fixed libs :-)

Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sat Aug 03, 2013 5:22 pm

In rpreview.prg these changes are required:

remove: ACTION FWSavePreviewToPDF( Self, ::oReport:cName + ".pdf", .T. ) ;

add: ACTION FWSavePreviewToPDF( Self ) ;

in several places.

In Method SendEmail():
Code: Select all  Expand view
METHOD SendEmail() CLASS TPreview

   local oMail
   local cName := If( ::oReport != nil, ::oReport:cName, ::oDevice:cDocument ) + ;
                  " " + DtoS( Date() ) + StrTran( Time(), ":", "" ) + ".pdf"

   FWSavePreviewToPDF( Self )

   cName = hb_CurDrive() + ":\" + CurDir() + "\" + AllTrim( cName )

   ...


In source/function/prv2pdf.prg:
Code: Select all  Expand view

remove:
-   DEFAULT cPDF   := cGetFile( "PDF File (*.pdf)|*.pdf|", "Select PDF File to Save", ;
-                               CurDir(), .t. )

Add:
+   DEFAULT cPDF   := cGetFile( "PDF files | *.pdf |",;
+                               "Select PDF File to Save",, ;
+                               CurDir(), .T.,,,;
+                               hb_CurDrive() + ":\" + CurDir() + "\" + ;
+                               If( oDevice:IsKindOf( "
TPreview" ),;
+                               oDevice:cName, oDevice:cDocument ) + "
.pdf"  )


And finally in source/winapi/getfile.c:
Code: Select all  Expand view


remove:   BOOL bSave = IF( hb_pcount() > 4 && HB_ISLOG( 5 ), hb_parl( 5 ), FALSE );
add:   BOOL bSave = IF( HB_ISLOG( 5 ), hb_parl( 5 ), FALSE || hb_parc( 8 ) );

 


We are going to publish a revised build (sorry, but it is a must). Thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby elvira » Sat Aug 03, 2013 6:02 pm

Antonio,

At rpreview.prg, messageboxes are only in English, so they should be also in spanish:

method buildwindow()

MsgStop( ::cResFile + " not found, imposible to continue",;
"FiveWin Printing Error" )


method saveas()

cMsg := If( lPDF, "PDF", "Doc" ) + ;
" File to Save( " + cExt + ") |" + cExt + "|"

if Empty( cFile := cGetFile( cMsg, "File to Save", 1, CurDir(), , .t. ) )

lView := MsgYesNo( "View " + cFile + "?" )

MsgInfo( "PDF Plugin Error" )



method sendmail()

MsgInfo( "done" ) // how to get the same focus effect ?



function convertoword()

MsgAlert( "MS Word not installed" )
MsgAlert( "Failed to Create Word Document" )
MsgAlert( "There is no output for export" )



Function ToWordDocViaWriter( oPreview, aFiles, cFileType )


MsgAlert( "There is no output for export" )
Return nil
Endif

if ( oWriter := SunCalcObj() ) == nil
MsgAlert( "No .Doc file manipulation software installed" )


cMsg := If( cFileType == "W", "Doc", "PDF" ) + ;
" File to Save( " + cExt + ") |" + cExt + "|"
if Empty( cFile := cGetFile( cMsg, "File to Save", 1, CurDir(), , .t. ) )



Many thanks;)))
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sat Aug 03, 2013 6:18 pm

Elvira,

Yes, right, still there are some missing names to be translated. thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sat Aug 03, 2013 6:28 pm

David,

I just emailed you the libs, thanks

Now, we are going to fix what Elvira commented and then we will publish a revised build.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby elvira » Sat Aug 03, 2013 6:36 pm

Dear Antonio,

Thank you.

I think this post could help you:
viewtopic.php?f=6&t=23303&hilit=traducir&start=15

Many thanks ;))
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: RPreview FWH 13.07 Bug?

Postby elvira » Sun Aug 04, 2013 8:45 am

Antonio,

In order to avoid the use of many prev.dll versions (16, 32 and 64 versions, plus seveal languages), maybe you can convert the bitmaps into a function, and the dialog into a dialog with coordinates,

Also, for the texts if you implement a function like MsgStop( FWString( "Preview.dll not found" ), FWString( "Error" ) ), no more prev.dll will be needed!!.

What doi you think?.

Thank you so much ;).
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sun Aug 04, 2013 8:59 am

Elvira,

thats what I am thinking about, to completely remove the preview dlls :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby David Williams » Sun Aug 04, 2013 12:43 pm

Thanks Antonio,

But I think you sent the old libs. The error persists.

David :|
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sun Aug 04, 2013 2:12 pm

David,

What error is it ? the same one ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RPreview FWH 13.07 Bug?

Postby David Williams » Sun Aug 04, 2013 2:48 pm

Yes Antonio,

I'm using the libs you sent last night, but don't worry about it today and we have a fiesta tomorrow :)

David

PDF Button

Error description: Error BASE/1004 Class: 'NIL' has no exported method: CNAME
Args:
[ 1] = U

Stack Calls
===========
Called from: => CNAME( 0 )
Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:BUILDBUTTONBAR( 383 )
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK( 471 )

Email Button

Error description: Error BASE/1004 Class: 'NIL' has no exported method: CNAME
Args:
[ 1] = U

Stack Calls
===========
Called from: => CNAME( 0 )
Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:SENDEMAIL( 1836 )
Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:BUILDBUTTONBAR( 388 )

Excel Button still Nothing!!
User avatar
David Williams
 
Posts: 82
Joined: Fri Mar 03, 2006 6:26 pm
Location: Ireland

Re: RPreview FWH 13.07 Bug?

Postby Antonio Linares » Sun Aug 04, 2013 8:15 pm

David,

Are you using Borland ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests