Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can we add hyperlink in report
Message
From
02/08/2005 13:14:15
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01033373
Message ID:
01037918
Views:
37
Very strange, not throwing an error even...

Maybe Doug will see this and jump in.

Thanks for your time Sergey.


>I'm out of ideas, sorry.
>
>>Still no go...
>>
>>Here is what i have now in my test project:
>> (i compile this as test_object.exe to run)
>>
>>
>>*-- main prg in my project called test_object.prg
>>
>>#INCLUDE HOME()+ "VFPSOURCE\REPORTOUTPUT\FOXPRO_REPORTING.H"
>>#INCLUDE HOME()+ "VFPSOURCE\REPORTOUTPUT\REPORTLISTENERS.H"
>>#INCLUDE HOME()+ "VFPSOURCE\REPORTOUTPUT\REPORTLISTENERS_LOCS.H"
>>#INCLUDE HOME()+ "VFPSOURCE\REPORTOUTPUT\_FRXCURSOR.H"
>>
>>
>>_reportoutput='reportoutput.app'
>>SET ENGINEBEHAVIOR 90
>>SET CLASSLIB TO HOME()+ "ffc\_reportlistener" additive
>>SET PROCEDURE TO c:\common30\hyperlinklistener.prg additive
>>
>>ON ERROR
>>
>>
>>*-- works on dev machine, produces no error on testing machine
>>loListener = newobject('HyperlinkListener', ;
>>  'HyperlinkListener.prg')
>>
>>*-- displays 'O' on dev and 'L' on testing machine
>>WAIT window TYPE('lolistener')
>>
>>
>>*-- hyperlinklistener.prg from Doug Hennig sample in the article
>>
>>define class HyperlinkListener as HTMLListener ;
>>	of home() + 'ffc\_ReportListener.vcx'
>>	QuietMode = .T.
>>		&& default QuietMode to suppress feedback
>>	dimension aRecords[1]
>>		&& an array of information for each record in the FRX
>>
>>* Before we run the report, go through the FRX and store information about any
>>* field with our expected directive in its USER memo into the aRecords array.
>>
>>	function BeforeReport
>>		dodefault()
>>		with This
>>			.SetFRXDataSession()
>>			dimension .aRecords[reccount()]
>>			scan for atc('*:URL', USER) > 0
>>				.aRecords[recno()] = alltrim(strextract(USER, '*:URL =', ;
>>					chr(13), 1, 3))
>>			endscan for atc('*:URL', USER) > 0
>>			.ResetDataSession()
>>		endwith
>>	endfunc
>>
>>* If the current field has a directive, add the URL to the attributes for the
>>* node.
>>
>>	function GetRawFormattingInfo(tnLeft, tnTop, tnWidth, tnHeight, ;
>>		tnObjectContinuationType)
>>		local lcInfo, ;
>>			lnURL
>>		with This
>>			lcInfo = dodefault(tnLeft, tnTop, tnWidth, tnHeight, ;
>>				tnObjectContinuationType)
>>			lcURL  = .aRecords[recno('FRX')]
>>			if not empty(lcURL)
>>				.SetCurrentDataSession()
>>				lcInfo = lcInfo + ' href="' + textmerge(lcURL) + '"'
>>				.ResetDataSession()
>>			endif not empty(lcURL)
>>		endwith
>>		return lcInfo
>>	endfunc
>>enddefine
>>
>>
>>
>>*-- i added the four .h files you suggested and #include for each in main prg
>>
>>*-- two class libraries are in the progect
>>*-- HOME()+ "ffc\_reportlistener" additive
>>*-- HOME()+ "ffc\_frxcursor" additive
>>
>>
>>
>>
>>I have the following results:
>>
>>Developer machine
>> Wait window displays 'O'
>>
>>Testing machine
>> Wait window displays 'L'
>>
>>
>>
>>>Hi Stacy,
>>>
>>>I still don't believe that you don't get any errors when you run EXE. Anyway you have to include a few header files in the project
foxpro_reporting.h
>>>reportlisteners.h
>>>reportlisteners_locs.h
>>>_frxcursor.h
>>>
>>>
>>>>works like a charm on my dev PC.
>>>>
>>>>The code in the example is the main prg in my project.
>>>>
>>>>Other files contained in the project:
>>>> hyperlinklistener.prg (from Doug's sample)
>>>> _frxcursor.vcx (ffc class)
>>>> _reportlistener.vcx (ffc class)
>>>>
Thanks,

Stacy



Black Mountain Software, Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform