FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To Antonio : Preview in FWH 10.12
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Sat Jan 22, 2011 04:01 AM

Mr. Bayron's posting is indicative of what FWH may not provide for natively in their libraries.

As individual programmers, we have many choices like nconvert, image2pdf, etc., which we can implement in our software. FWH provided a very easy way to integrate our interface with RPreview. It is probably more welcome if FWH, in its future versions, provides greater flexibility to customize the interface, allowing us to remove some built-in features, substitute them and to add our own features.

Providing export to excel from report should be easy for FWH. Export to PDF without depending on MSWord or any other third-party libraries also may not be that difficult for FWH to provide.

Our past experience with FWH shows, what most users want, FWH will provide soon.

Regards



G. N. Rao.

Hyderabad, India
Posts: 883
Joined: Thu Dec 24, 2009 12:46 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Sat Jan 22, 2011 04:28 AM

Thanks for your answer, FiveWin has implemented many new controls and classes, and new ones is that motivate us to Upgrade and Get new Releases, I really admire your work and the lessons that you give us.

=====>

Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala

FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10

FiveWin, One line of code and it's done...

Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: To Antonio : Preview in FWH 10.12
Posted: Sat Jan 22, 2011 09:51 AM
Mr Nao,

Thank you for the reply. Yes, the best option is that FW provides native export to Word, Excel, PDF, TXT and HTML.

In the meanwhile I suggested an option that works, as Image2PDF sometimes fails.

In addition, I would like to suggest that the preview also offers the posibility to send the exported documment via mail using DEFINE MAIL command.

Regarding the look, this is what I have for my C++ aplications:



Thank you for excelent and quick support.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: To Antonio : Preview in FWH 10.12
Posted: Mon Jan 24, 2011 05:41 PM

HI, someone try this: make an preview, so miniminize this, go to your application e close all, the preview stay alive, and dont close... only with finalize program of windows and got an error, this is right?
thanks

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 12:31 AM

Hello,

Is there anyone who found a solution for the problem I mentionel at the beginning of this topic ?

Antonio ?

Thanks a lot in advance.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 01:47 AM
driessen wrote:Hello,

Is there anyone who found a solution for the problem I mentionel at the beginning of this topic ?

Antonio ?

Thanks a lot in advance.

We are unable to reproduce. As I requested earlier, if you can provide a sample reproducing the error with bcc582, we can try and find a solution. You had mentioned that on the simple sample program I provided it works properly.

I also advise you to download the revised build and try. In this revised build stage wise error messages are provided so that we know at what stage the operation is failing.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 08:48 AM

I tested your example once again.

I'm very sorry but I didn't see the button "Excel", which I didn't test the previous time (I'm not used in using xBrowse).

If I click on the button "Excel", the test is quited also without any error message.

I'm using xHarbour Builder. Might that be the cause of the problem ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 09:04 AM
I'm using xHarbour Builder. Might that be the cause of the problem ?


Yes. This could be the problem.

We need to make this work with XHb too and I hope you can help us.

As the first step, if you please confirm that both export and report are working well in my small sample above with bcc582 but not with xHb, we shall then try to isolate which function is giving the problem in xHb. Then we can find a solution.
Regards



G. N. Rao.

Hyderabad, India
Posts: 566
Joined: Thu Aug 30, 2007 03:40 PM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 09:19 AM

HI, im using xharbour cvs and bcc 582, and the preview still alive when i quit the application.

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 11:03 AM

Mr. Rao,

Thanks a lot for your reaction.

I never used the standard xHarbour, distributed by FiveTech, I only use xHarbour Builder Professional. If your example is working fine with the standard xHarbour, the problem has to be caused by xHarbour Builder.

If I can be of any help, please ask. The new function to export reports to PDF or Word is a fantastic one for which my customers ask a long time.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 02:10 PM
norberto wrote:HI, im using xharbour cvs and bcc 582, and the preview still alive when i quit the application.

I am also aware of this issue in some cases. One friend told me he commented out the line
Code (fw): Select all Collapse
        StopUntil( { || ::lExit } )
and this solved the problem for him.
You can find this at line no:162 of RPreview.Prg in version 10.12.

Please try if this helps you.
I have not tested this. We are yet to await official reaction from FWH.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 02:20 PM
Mr. Michel
If I can be of any help, please ask.

You can be of a great help if you can spend some time.

In the new version 10.12 there is a new program file "olefuncs.prg" in \fwh\source\function folder. This module contains new functions ExcelObj() and WinWordObj(), etc. XBrowse while exporting to Excel now uses this function instead of creating excel object in its own module. Same way, RPreview uses the function in this module for creating Word object. I have a suspicion that these function are giving trouble in xHb.

Can you please take trouble of testing these functions?
Code (fw): Select all Collapse
#include 'fivewin.ch'
function main()
local obj
msginfo( 'Start', 'ExcelObj' )
obj := ExcelObj()
msginfo( obj:ClassName )
return (0)

Please also link olefuncs.prg and test.
Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 05:22 PM
Hi.

Code (fw): Select all Collapse
    RPrevUserBtns( { |oPreview, oBar| addExportBtns( oPreview, oBar, Self ) } )
...

*--------------------------------------------------------------------------------------
function AddExportBtns( oPreview, oBar, oReport )
Local cName := GetTempDir() + ;
    AllTrim( StrTran( StrTran( oPreview:oDevice:cDocument, "/", "-" ), " ", "_" ) )

    DEFINE BUTTON OF oBar ;
        RESOURCE "excel" ;
        TOOLTIP "Export report to Excel" ;
        ACTION ( cName := alltrim( cName ) + ".xls", oReport:SaveAs( "EXCEL" ) )
        
    DEFINE BUTTON OF oBar ;
        RESOURCE "pdf" ;
        TOOLTIP "Save as PDF" ;
        ACTION ( cName := alltrim( cName ) + ".pdf", ;
            BuildPdf( oPreview:oDevice:aMeta, cName, .f., .t. ) )

RETURN NIL


Here the problem:


Notice the text "factor" overlaps the exit button. Can someone help?

Another thing is that it seems like the new rpreview will NOT take into consideration when the app is themed to add the new buttons...?

Reinaldo.
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 07:06 PM

Mr. Nao,

Like you told me, I build a test, using your source and OLEFUNCS.PRG.

When I run the test, I got a message "Start", titled "Excelobj" and then nothing anymore.

I think I should have had a second msginfo, isn't it ?

Thanks a lot.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: To Antonio : Preview in FWH 10.12
Posted: Wed Jan 26, 2011 08:58 PM

Hi,

I confirm Michel.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06