We have actually tried to provide a great deal of flexabilty in our stored procedure SP_REPORT. Most of the QuickBooks filters can be found using QODBC. For example:
Can by found by running:
sp_parameters ProfitAndLossDetail
Which shows the filters for Account as:
|AccountsPayable|AccountsReceivable|AllowedFor1099|APAndSalesTax|APOrCreditCard |ARAndAP|Asset|BalanceSheet|Bank|BankAndARAndAPAndUF|BankAndUF|CostOfSales|CreditCard |CurrentAsset|CurrentAssetAndExpense|CurrentLiability|Equity|EquityAndIncomeAndExpense |ExpenseAndOtherExpense|FixedAsset|IncomeAndExpense|IncomeAndOtherIncome|Liability |LiabilityAndEquity|LongTermLiability|NonPosting|OrdinaryExpense|OrdinaryIncome |OrdinaryIncomeAndCOGS|OrdinaryIncomeAndExpense|OtherAsset|OtherCurrentAsset |OtherCurrentLiability|OtherExpense|OtherIncome|OtherIncomeOrExpense|
So if we are only interested in ExpenseAndOtherExpenses, we can run the report like this:
sp_report ProfitAndLossDetail show Text, Blank, TxnType, Date, RefNumber, Name, Memo, ClearedStatus, SplitAccount, Debit, Credit, RunningBalance parameters DateMacro = 'ThisYearToDate', AccountFilterType = 'ExpenseAndOtherExpense'
Or if we just want the totals like this:
sp_report ProfitAndLossStandard show Amount_Title, Text, Label, Amount parameters DateMacro = 'ThisMonthToDate', SummarizeColumnsBy = 'TotalOnly', AccountFilterType = 'ExpenseAndOtherExpense'
And if we just want particular lines, we can even use Where to filter the returned result:
sp_report ProfitAndLossStandard show Amount_Title, Text, Label, Amount parameters DateMacro = 'ThisMonthToDate', SummarizeColumnsBy = 'TotalOnly', AccountFilterType = 'ExpenseAndOtherExpense' where Label = 'Insurance' or Label = 'Fuel'
I hope this helps.
|