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

Advanced
-Collapse +Expand Paradox To/From
To/FromCODEGuides
-Collapse +Expand Paradox Store
PRESTWOODSTORE

Prestwood eMagazine

October 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 21 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

KB100175

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.

 

Undocumented!!!
[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 ""
    endMethod
     

  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.


Comments

0 Comments.
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 = P183A1
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 play-drums.com 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
8347
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


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