Page 1 of 2

New FWH 13.07 revised build

PostPosted: Tue Aug 13, 2013 11:25 am
by Antonio Linares

Re: New FWH 13.07 revised build

PostPosted: Tue Aug 20, 2013 3:33 pm
by TimStone
Note for xhb.com users:

FWH 13.07 uses standard C language functions strlwr() and strdup(), but unfortunately the C compiler used by xhb.com (PellesC) does not provide them:

http://www.diplom.org/~njudge/cxref/strdup.c.src.html

http://www.cprogramming.com/snippets/so ... trlwr-in-c

For those that don't know to implement this code in their apps, we will provide them a modified FWH library that does not require them.

And our best advise for you: Migrate to Harbour :-)


Antonio,

As you know I have two builds, one with xHarbour ( .com ) and one with Harbour/MSVC2012. I would love to swtich over to the Harbour builds, but I still have the inability to use it with ADS 7 & 8 which is owned by many of my clients. For them to upgrade is expensive ( for some $ 2,000 US ) and they won't benefit with more features. So for now, my distribution is stuck using FWH 13.06.

Is there a work around for this ? I certainly don't want to have to use alternative libraries with each release. That's a major nuisance for you. Is there an object file we could link in to do the implementation that would work with Pelles ?

As for the suggestion to go to FREE xHarbour, there is not a recent version for the Pelles compiler, and right now the xBuild option is very solid for me and my clients.

Thanks.

Tim

Re: New FWH 13.07 revised build

PostPosted: Tue Aug 20, 2013 5:31 pm
by Antonio Linares
Tim,

We have already solved it. I am emailing you the modified libs, thanks :-)

Re: New FWH 13.07 revised build

PostPosted: Wed Aug 21, 2013 12:31 pm
by Horizon
Hi Antonio,

Can you please send me also?

Thanks.

Re: New FWH 13.07 revised build

PostPosted: Wed Aug 21, 2013 1:18 pm
by norberto
Antonio, me too... i have revised version. thanks

Re: New FWH 13.07 revised build

PostPosted: Wed Aug 21, 2013 5:23 pm
by TimStone
It is now building correctly. Thank you. I'm a little slow to respond ... back from vacation but wishing I was still at the beach !

Tim

Re: New FWH 13.07 revised build

PostPosted: Wed Aug 21, 2013 5:36 pm
by Antonio Linares
Hakan,

Already sent

Norberto,

This enhancement is only for xhb.com users

Re: New FWH 13.07 revised build

PostPosted: Wed Aug 21, 2013 10:57 pm
by nageswaragunupudi
I have a demo version of xHb installed with me. When I checked the c header files, I found in c:\xhb\c_include\string.h
Code: Select all  Expand view
char * __cdecl _strdup(const char *);
char * __cdecl _strupr(char *);
char * __cdecl _strlwr(char *);
 

I think both the functions strdup() and strlwr() should be available in the xhb libraries. Why are they not getting linked in?

Re: New FWH 13.07 revised build

PostPosted: Thu Aug 22, 2013 7:16 am
by Antonio Linares
They use a leading underscore, thats why they were not found.

Anyhow, we no longer need them :-)

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 9:54 am
by driessen
Antonio,

I started to use FWH 13.07 today and I got these errors while rebuilding my application with xHarbour Builder :

Unresolved external symbol '_strdup referenced from FiveHCM.lib (BITMAPS.obj)'
Unresolved external symbol '_strlwr referenced from FiveHCM.lib (BITMAPS.obj)'

What is the way to solve this problem ?

Thanks.

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 11:24 am
by Antonio Linares
Michel,

I have just emailed you the right libs, thanks :-)

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 11:52 am
by driessen
Antonio,

Thanks a lot. My application can be build now.

But I have 3 questions :

1. I tried the new feature of sending a report from the preview in an email. I alsways got a gpf. Why is that? How can this be solved?
2. From preview, I try to export my report to MS-Word. I get the message : "No .doc manipulation software installed". Which software do I need? The report is exported though as a picture in a Word-document.
3. From preview, I try to export my report to MS-Excel. I get the message : "Export to Excel is available only for Report with ::bInit defined". Can you explain?

Thanks a lot in advance.

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 2:01 pm
by nageswaragunupudi
2. From preview, I try to export my report to MS-Word. I get the message : "No .doc manipulation software installed". Which software do I need? The report is exported


This is an unnecessary message. Please make the following correction in rpreview.prg.

Please locate function ConvertToWordDoc( oPreview ) in rpreview.prg.

You will see these lines at the beginning
Code: Select all  Expand view
function ConvertToWordDoc( oPreview )

   local aFiles   := oPreview:oDevice:aMeta
   local oWord, oDoc, cEMF

   if Len( aFiles ) > 0
      oDoc := ToWordDocViaWriter( oPreview, aFiles, "W" )  // W -> Word Doc, P -> PDF
      if ( oWord := WinWordObj() ) == nil
 

Please comment out oDoc := ToWordDoc................(.......) immediately next to the line "if Len( aFiles ) > 0".
Modified function looks like this:
Code: Select all  Expand view
function ConvertToWordDoc( oPreview )

   local aFiles   := oPreview:oDevice:aMeta
   local oWord, oDoc, cEMF

   if Len( aFiles ) > 0
//      oDoc := ToWordDocViaWriter( oPreview, aFiles, "W" )  // W -> Word Doc, P -> PDF
      if ( oWord := WinWordObj() ) == nil
 


This will avoid this message.
This is fixed at our end for the next version.

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 2:10 pm
by nageswaragunupudi
3. From preview, I try to export my report to MS-Excel. I get the message : "Export to Excel is available only for Report with ::bInit defined". Can you explain?


You will appreciate that every preview can not be exported to Excel.
Only report object has the method ToExcel(). When the preview is generated from a report only then the report object's toexcel() methodi is invoked.

Report object traverses forward only, starting where the programmer set the data pointer and stopping where the while condition returns false. Report object does not know what datasource it is reporting and where it should start printing. Therefore it is not possible for the report object to decide ReStart position.
When ToExcel() method was introduced, users were advised to set the starting point in oReport:bInit codeblock. This may usually be DbGoTop() but can be anything else. So, ToExcel() method works only when bInit is assigned with a codeblock.

Alternatively the user can set oReport:bExportToExcel codeblock to handle excel export all by himself. Even in that case Export to Excel button works.

Re: New FWH 13.07 revised build

PostPosted: Fri Aug 23, 2013 2:23 pm
by nageswaragunupudi
1. I tried the new feature of sending a report from the preview in an email. I alsways got a gpf. Why is that? How can this be solved?


This is working for me with bcc582 and (x)Harbour well. We need to investigate why you are getting a GPF. We may need your help in putting trace.

I suggest you first try with a small report.
Press PDF export button on the buttonbar and see if it is working well.
If this is ok, then please include msginfo() trace in the function.
I suggest putting msginfo() as suggested below:
Code: Select all  Expand view
METHOD SendEmail() CLASS TPreview

   local oMail, cName, cFile

msginfo( "start" )
   cName := If( ::oReport != nil, ::oReport:cName, ::oDevice:cDocument )
msginfo( "cname" )
   cFile := cFilePath( ::oDevice:aMeta[ 1 ] ) + StrTran( cName, '.', '' ) + ;
            Left( HB_TToS( HB_DateTime() ), 14 ) + ".pdf"
msginfo( "cfile" )
   CursorWait()
   if ::bSaveAsPDF == nil
      cFile := FWSavePreviewToPDF( Self, cFile, .f. )
   else
      cFile := Eval( ::bSaveAsPDF, Self, cFile, .f. )
   endif
   CursorArrow()
msginfo( cfile )
   if ! File( cFile )
      MsgInfo( FWString( "PDF not saved to send Email" ) )
   else
      DEFINE MAIL oMail ;
         SUBJECT cName ;
         TEXT "" ;
         FILES cFile, cFile ;
         FROM USER
msginfo( "activate mail"
      ACTIVATE MAIL oMail
msginfo( "activated" )
      // MsgInfo( oMail:nRetCode )  check the returned code!
   endif

   ::oMeta1:SetFocus()

return nil
 

We appreciate your cooperation.