Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
How do I do multiple filters for the same report parameter when using sp_reports? |
Author |
Message |
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-02-21 19:49:45 |
Multiple filters can be used for the same report parameter by listing the filters seperated with a "," (comma).
For example to see only 'Bathroom Tiles' and "Door' items in a Sales By Item Detail Report you do:
sp_report SalesByItemDetail show Text, Blank, TxnType, Date, RefNumber, Memo, Name, Quantity, UnitPrice, Amount, RunningBalance, Item parameters DateMacro = 'All', itemfilterfullnames='Bathroom Tiles','Door'
or to see only 'Sales Income' and 'Construction Parts' accounts you do:
sp_report SalesByItemDetail show Text, Blank, TxnType, Date, RefNumber, Memo, Name, Quantity, UnitPrice, Amount, RunningBalance, Account parameters DateMacro = 'All', AccountFilterFullNames='Sales Income','Construction Parts' |
|
|
|
|
Posted : 2007-09-27 05:51:31 |
Hi
I am trying to use the this method to filter on 2 different items in the same query.
It works fine with only item:
sp_report TxnDetailByAccount show TxnType, Date, RefNumber, AccountFullName, AccountName, AccountType, Account, Memo, Name, Amount parameters AccountFilterType = 'OrdinaryIncomeAndCOGS', DateMacro = 'LastMonth', ItemFilterFullNameWithChildren = 'SERVICES:Employed:BJ' where rowtype = 'DataRow'
But as soon as I add the second filter item, I get an error "Failed to open rowset. Details: 42000:[QODBC] Expected lexical element not found: HARDWARE:Camera Systems". If I reverse the order of the 2 items in the query, then the error is always on the second item.
sp_report TxnDetailByAccount show TxnType, Date, RefNumber, AccountFullName, AccountName, AccountType, Account, Memo, Name, Amount parameters AccountFilterType = 'OrdinaryIncomeAndCOGS', DateMacro = 'LastMonth', ItemFilterFullNameWithChildren = 'SERVICES:Employed:BJ' ,'HARDWARE:Camera Systems' where rowtype = 'DataRow'
What am I missing?
Thanks! |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2007-09-27 08:21:46 |
Not all parameters are multi-lookup. If you run the stored procedure for the report you are using:
sp_parameters TxnDetailByAccount
you will see what values can be used to filter reports.
|
|
|
|
|