PDA

View Full Version : Metadata Parameters - QueryBuilder - Formula - Question



vvanherk
02-04-2010, 01:19 PM
Hey All.

I'm using PRD 3.5 and Metadata Datasource in a report.

I need to have a MQL query return a list of Customers based on Province. Province is setup as a parameter to pass in to metadata query. All works fine for selecting single province.

I wish to default this query so that if no Province is selected, then it just returns all Customers.

Not sure of the best way to go about this. I've used the ISNA() function with an OR constraint and added to MQL as shown below. This seems to work, but does not allow me to open up the QueryEditor from within Report Designer anymore. I'm assuming it just doesn't know how to interpret it, or what....


<constraint>
<operator>AND</operator>
<condition>[BC_CUSTOMER.BC_CUSTOMER_PROVINCE] = [param:ProvinceParam]</condition>
</constraint><constraint>
<operator>OR</operator>
<condition>ISNA([param:ProvinceParam])</condition>
</constraint>
Anywho, any input on the best way to integrate formulas, or defaulting queries to return all values if the paramter is null, etc, would be greatly appreciated.

Thanks in advance.