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
char * __cdecl _strdup(const char *);
char * __cdecl _strupr(char *);
char * __cdecl _strlwr(char *);
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
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
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
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?
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?
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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 44 guests