TOPIC: Rules for Params fields
#273
Rules for Params fields 4 Years, 1 Month ago
Hello,
The rules for the fields used in reports are not run unless the report has a name. If the name parameter is given, the last entered values are stored and overrides those returned by rules. Pressing Clear in the reports window practically does not clear the contents. It is cleared, but filled immediately by the rule.
ajith
 
 
#292
Re:Rules for Params fields 4 Years, 1 Month ago
Hi Ajith,

Do you really want the rule for the report options? Is it because you are sharing the same field name for the data entry screen and the report options? If so, you could use a different field name on the report options so that the rule does not kick in. If you use the original field name as the prefix for the report option field name, then GetParamsWhere should handle using the correct field from the report options. For example, if you have a field "customer_num" in the query, you could use "customer_num_report" for the report option field name, but still pass the original field to the GetParamsWhere ("customer_num").
 
 
Jeff Ferguson
Suneido Software
 
#297
Re:Rules for Params fields 4 Years ago
Hello,
The field name is different from that used in data entry screens. The rule is deliberate. Though not essential it would be useful. Thanks for the information regarding GetParamsWhere.
ajith
 
 
#304
Re:Rules for Params fields 4 Years ago
Hi Ajith,

Do you want a value to default in a parameter every time you go to the parameters screen, regardless of saved values, and then to be able to clear that parameter and not have the rule kick in? If this is what you are looking for, you could use the SetParams option for Report.

For Example:
Code:

Params: #(Form
    (ParamsSelect name group: 0) nl
    (ParamsSelect age group: 0))
SetParams: #(name: #(operation: 'equals', 
        value: 'fred', value2: ''))



Hope this helps,

Post edited by: jennebelle, at: 2006/07/28 21:55
 
 
#317
Re:Rules for Params fields 4 Years ago
Hi,
I thought i had replied for this. Sorry for the delay.
I always want a value given by the rule. I dont want a stored value.SetParams allows only static values? I want the rule to calculate something based on current date.
ajith
 
 
#342
Re:Rules for Params fields 3 Years, 12 Months ago
Hello,
Any help?
ajith
 
 
#349
Re:Rules for Params fields 3 Years, 12 Months ago
Hi Ajith,

SetParams does not have to use static values. For example, we use the following in our Accounting software to set one of the report options to the current date:

Code:


SetParams: Object(arivc_date_params: Date().NoTime())



Keep in mind if you do something like this, you must make sure the object containing SetParams is an Object(), not #(). In other words, it can't be an object constant.
 
 
Jeff Ferguson
Suneido Software