Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Reports and Printing / September 2008

Tip: Looking for answers? Try searching our database.

Dymanics in VFP 9 reporting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Supertau - 17 Sep 2008 13:01 GMT
I can use the dynamic function on a picture to scale the picture according to
the remaining space on the page. But if I want to customize the updatelistener
the dynamics function is no longer working and the picture wont scale.

This works (picture is scaled):

report form <MyReport> object type 1

This doesn't work (Picture always same size):

MyListener = createobject('Updatelistener')
MyListener.ListenerType = 1
report form <MyReport> object MyListener

Regards
Bo
Cathy Pountney - 17 Sep 2008 13:42 GMT
The Dynamics feature is implemented through the use of the class called
fxListener in the _ReportListener class libary of the FFC directory. When
you "indirectly" use a report listener, such as your first example of OBJECT
TYPE 1, VFP automatically uses this listener to run the report. In your
second example, you are instantiating the UpdateListener class which does
not have the code to implement the Dynamics feature.

In SP2, fxListener was introduced in the hierarchy between the
_ReportListener and the UtilityListener class (Use the class browser to see
the new hierarchy). As long as you create a listener based on fxListener or
something farther down the hierarchy, the Dynamics will work. In SP2, the
UpdateListener class is only included for backward compatibiliity and all
it's features have been moved into the other classes in the class libarary.

{Begin shameless plug}
Keep your eyes out for a new book to be released soon ... "Making Sense of
Sedna and SP2". There are three chapters in the book that dive into all the
changes and new features added to the Report Writer in SP2. Dynamics is just
the tip of the iceberg on what you can do with the new Advanced features.
{End shameless plug}

Cathy Pountney

>I can use the dynamic function on a picture to scale the picture according
>to
[quoted text clipped - 14 lines]
> Regards
> Bo
bbsupertau@gmail.com - 18 Sep 2008 15:04 GMT
Hi Cathy

Thanks for the answer.

Digging a little into it I found out that it is the FxTherm I need to customize
the user feedback during reporting.

I found the following example :

ox = NEWOBJECT("fxTherm", "_reportListener.vcx")
oy = NEWOBJECT("fxListener","_reportListener.vcx")

? oy.FXS.count && listener doesn't have any FX objects yet,
              && we can safely add one without worrying
              && about removing any previous feedback object
oy.FXS.Add(ox)
ox.thermPrecision = 5
ox.thermFormCaption = "My Test Caption"
ox.persistBetweenRuns = .T. && so we can check it afterwards

REPORT FORM ? OBJECT oy

But somehow the caption "My Test Caption" only stays a short moment and is the
replaced with something like "<reportname.frx> Press ESC to cancel".

Is there a way to prevent this ?

Bo

>The Dynamics feature is implemented through the use of the class called
>fxListener in the _ReportListener class libary of the FFC directory. When
[quoted text clipped - 37 lines]
>> Regards
>> Bo
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.