Your full service technology partner! 
-Collapse +Expand
Search Paradox Group:

-Collapse +Expand Paradox To/From
-Collapse +Expand Paradox Store

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Wicked...   Print This     
  From the January 2012 Issue of Prestwood eMag
Paradox OPAL: Wicked Coding Tasks:
Using ObjectPAL in reports (Undocumented)
Posted 16 years ago on 3/19/2003 and updated 6/11/2008
Take Away: How to use the limited ObjectPAL support in reports.
 Tags: Paradox , ObjectPAL , reports


Q:  Can I put ObjectPAL on a report?

A:  Yes.  The most common way is to use an iif() on a calculated field, but you can do more.


[The following technique is NOT recommended. It's here for advanced developers to have a bit of fun with it.]

You can get the "built in methods" dialog box from a form (or whatever) and pin it to the desktop.  Then you can switch to the report and the dialog box will remain.  This is how you declare the custom methods that you will be using. Now that you have access to writing OPal on your report, here are some points to keep in mind:

  1. Only use custom methods.  ChangeValue() and the like won't really help you.  You can invoke the methods that you write by calling them normally from the calc region.  (i.e. put myMethod() where your calcs would have gone.)

  2. ALWAYS return something.  If nothing is returned by the method, it won't fire off.

     ; for example:
    method myMethod() string
    ; your code here
    return ""

  3. To simulate an event model you need to place the fields that run your code strategically.  If you think in terms of left -> right, top -> bottom (as with the tab stops in a form) you will know where to place your fields (i.e. which one acts first and so on).

  4.  To display data you should have all fields as calc fields where the

calc is (for example) tc."field name".  Hint:  I put the table in the data model so that the methods fields would fire off for each record.

Note:  This is NOT a supported feature.  There are MANY ways to crash out.  Some slick things can be done, but 'let the user beware' because we aren't supporting it.


Share a thought or comment...
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1261A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #100175 Counter
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2019 Prestwood IT Solutions.   [Security & Privacy]