Page 2 of 3

Re: To Antonio : Preview in FWH 10.12

Posted: Sat Jan 22, 2011 4:01 am
by nageswaragunupudi
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Sat Jan 22, 2011 4:28 am
by Bayron
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Sat Jan 22, 2011 9:51 am
by ukservice
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:

Image

Thank you for excelent and quick support.

Re: To Antonio : Preview in FWH 10.12

Posted: Mon Jan 24, 2011 5:41 pm
by norberto
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

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 12:31 am
by driessen
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 1:47 am
by nageswaragunupudi
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 8:48 am
by driessen
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 9:04 am
by nageswaragunupudi
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 9:19 am
by norberto
HI, im using xharbour cvs and bcc 582, and the preview still alive when i quit the application.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 11:03 am
by driessen
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 2:10 pm
by nageswaragunupudi
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: Select all | Expand

       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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 2:20 pm
by nageswaragunupudi
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: Select all | Expand

#include 'fivewin.ch'
function main()
local obj
msginfo( 'Start', 'ExcelObj' )
obj := ExcelObj()
msginfo( obj:ClassName )
return (0)
 

Please also link olefuncs.prg and test.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 5:22 pm
by reinaldocrespo
Hi.

Code: Select all | Expand

    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:
Image

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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 7:06 pm
by driessen
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.

Re: To Antonio : Preview in FWH 10.12

Posted: Wed Jan 26, 2011 8:58 pm
by Horizon
Hi,

I confirm Michel.