FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RPreview FWH 13.07 Bug?
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 03: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?

Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 03:59 PM

Hello,

Any update?.

Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 04:32 PM

Elvira

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

David

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 05: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 05:22 PM
In rpreview.prg these changes are required:

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

add: ACTION FWSavePreviewToPDF( Self ) ;

in several places.

In Method SendEmail():
Code (fw): Select all Collapse
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 (fw): Select all Collapse
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 (fw): Select all Collapse
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
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 06: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;)))

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 06:18 PM

Elvira,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 06: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
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sat Aug 03, 2013 06:36 PM

Dear Antonio,

Thank you.

I think this post could help you:

viewtopic.php?f=6t=23303hilit=traducirstart=15

Many thanks ;))

&&&

Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 08: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 :-).
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 08:59 AM

Elvira,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 12:43 PM

Thanks Antonio,

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

David :|

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 02:12 PM

David,

What error is it ? the same one ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 82
Joined: Fri Mar 03, 2006 06:26 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 02: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!!

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview FWH 13.07 Bug?
Posted: Sun Aug 04, 2013 08:15 PM

David,

Are you using Borland ?

regards, saludos

Antonio Linares
www.fivetechsoft.com