xTuple.com xTupleU Blog & News Customer Support

Dynamically changing a static field label (text) in Reports based on the query results

i am posting this both to the OpenRpt and the HowDoI folders. It seems that is is more a development / customization question. My client needs to have static field labels change on a report based up on the data that is returned from the query. 

For example, if a line tiem includes "x", then change this field label to "Y".

In looking through the documentation, I found several instances showing how to reference screen objects with scripting. But I could not find anything with Reports. 

Any guidance would be greatly appreciated. 

Well I would approach your situation by creating a query with a case statement which selects the value of the label based on the criteria used in the query.

Then the report would be a field object not a label object.

The query would need to be able to use the parameters being passed.  If an additional parameter is needed then scrippting would be required to include the additional parameter.