Troubleshooting : SP_REPORT BalanceSheetStandard report error "[QODBC] At least one field requested requires DateFrom to be set".
Problem Description:
I am running BalanceSheetStandard through VB Demo & It is returning below error.
When I run this query as the following in VB Demo, it will report error "[QODBC] At least one field requested requires DateFrom to be set" sp_report BalanceSheetStandard show Text, Label, Amount, AmountPreviousYear parameters DateMacro = 'All', SummarizeColumnsBy = 'Day', ReturnColumns = 'All'
Solutions:
I would like to inform you that as per QuickBooks you can't use “DateMacro = 'All'” and the field “AmountPreviousYear” same time. If you want to display the field “AmountPreviousYear” the parameter “DateMacro = 'All'” is not appropriate.
You can verify the same by running the same report through QuickBooks & choose DateMacro to All and you will notice that Previous Year options are disabled.
But when you choose the Dates as others expect “All”, the field “Previous Year” is enabled.
To resolve this issue either you have to remove field “AmountPreviousYear” from a query or you have to change the parameter “DateMacro” to others except “All”, such as “This month”. Please refer below query:
sp_report BalanceSheetStandard show Text, Label, Amount parameters DateMacro = 'All', SummarizeColumnsBy = 'Day', ReturnColumns = 'All'
sp_report BalanceSheetStandard show Text, Label, Amount, AmountPreviousYear parameters DateMacro = 'ThisMonth', SummarizeColumnsBy = 'Day', ReturnColumns = 'All'
I would like to suggest you to please refer below mentioned article. You can get detailed information about how to execute sp_report in QODBC:
How to use the QuickBooks Reporting Engine with QODBC