` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Alternate QBE interface
1998-12-08 -- Dan Presnell
 
If you don't like the default query form thrown on the screen by the ABC templates, here's how you can do your own. First, in the browse, define a string variable to hold the filter. Next, put a button on the browse window to call the query form. Call the query procedure like this: myquery(filterstring) In the brw1.applyfilter method, before the parent call, put this: brw1.setfilter(filterstring, 'ZZZZ') Now create a window procedure for your query form. Define threaded variables there to hold the user's input. In my case, these variables would be this: custname string(30) address string(30) In the data section of the query form procedure, define an object: q queryclass In the embed for the "ok" button, on accepted, before generated code, put something like this: q.init q.additem('upper(cus:name)', 'Customer Name') q.additem('upper(cus:address)', 'Address') q.setlimit('upper(cus:name)',,, clip(left(upper(customername)))) q.setlimit('upper(cus:address)',,, clip(left(upper(address)))) query=q.getfilter() q.kill In the query form procedure, be sure to prototype it as (*string) and make the parameter (query). The advantage of this is that you can be more flexible in your query forms. Also, the browse procedure can test the filterstring variable to see if a filter is in effect, and you can put a check-mark or other visual warning to the user there. Be sure you correct the bug in the ABQUERY.CLW file as described in another post of mine.


Today is December 3, 2024, 11:46 am
This article has been viewed 35319 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: