Hi all,
I have two queries with data items as follows:
In Recharge Monthly query:
Payment Method Code Payment Method
M Hybrid
P Prepaid
In Usage Monthly query:
Revenue Stream Code Revenue Stream
H Hybrid
P Prepaid
Now,I have created a prompt based on the Revenue Stream Code and this prompt affects both queries.Since the Hybrid data item has two different codes,I have done my filter in the Recharge Monthly query like so :
[Recharge Monthly].[Offer].[Payment Method Code] = (if (?PaymentMethod?='All')
then ([Recharge Monthly].[Offer].[Payment Method Code])
else if (?PaymentMethod?='H')
then ([Recharge Monthly].[Offer].[Payment Method Code] ='M')
else (?PaymentMethod?))
When I then run the report and select the Prepaid value on my prompt,the report runs just fine,but when I select the Hybrid value I get the following error:
An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'
UDA-SQL-0358 Line 42: Syntax error near "=.
Could someone assist
Thanks and Regards
Taboka
Hi again,
I just realised from looking at a previous post that I'd made which is similar to this that all I need do is create a data item that states that if (?PaymentMethod?='H') then I should force ([Recharge Monthly].[Offer].[Payment Method Code] ='M') and then simply have my filter like:
[Recharge Monthly].[Offer].[Payment Method Code] = (if (?PaymentMethod?='All')
then ([Recharge Monthly].[Offer].[Payment Method Code])
else (?PaymentMethod?))
Hope this helps someone.
Cheers...