Chuck's Reporting Corner August 2008

Author: Chuck Vigeant M.Ed.  Created: Thu Aug 14 10:55:40 2008

EXCEL and QODBC

This is the first of two articles that I will devote to using Excel and QODBC to extract and report on QuickBooks data.  There are many Excel gems that users either don’t know about or think it is too difficult. In this first article, I will discuss the Excel Query Wizard and Using Excel Query to generate existing QuickBooks reports. Both of these operations should be within the capabilities of the novice user.  In next month’s article I will show some advanced operations including pivot tables.

Excel the report writer?  YES!

In many of the lectures and presentations I give regarding QODBC, I discuss the pros and cons of using tools like Excel, Access, Crystal Reports, Xcelsius or other report writing mediums. I must admit that I tend to give Excel less air time because of three things:

Dynamic ranges cause problems with formatting and cell referencing formulas.  If you retrieve 40 rows one time and 42 the next, the cell you may have referenced in a formula will contain different data, and thus a different result.

When using the Microsoft Query Wizard, you can only tie together two tables using an outer join.  You CAN however create a manual SQL statement that uses more than two tables, but most people are not SQL experts.

A product like Crystal Reports:

But, there is another side of the story that is waiting to be told! There are many business cases and upsides to using Excel that we tend to overlook.

Excel Query Wizard

Microsoft Query is a free tool that allows you to query against any ODBC compliant database, such as SQL server, or Access, - or QuickBooks.

microsoft_query

This invokes the Microsoft Query Wizard which allows you to choose tables and fields for your query:

Choose Data Source window

Query Wizard - Choose Columns Window

Query Wizard - Choose Columns Window

Imported Report

Using Excel Query to generate an existing QuickBooks report

For many small businesses with smaller QuickBooks files, there is a mechanism in the QODBC driver that allows us to pull existing QuickBooks reports without having to export cut and paste.

If you go to http://doc.qodbc.com/qodbc/20/reports/sp_report_detail.html, you will see a list of reports that are available using the QODBC driver, and you will notice that each row has a link to a query example that you can use to copy and paste right into Excel.

For example, if you click on the “Example” link for A/P Aging Detail (http://doc.qodbc.com/qodbc/20/reports/sp_report_sql6313.html?sp_report_name_id=45) you will see the following:

sp_report APAgingDetail show TxnType_Title, Date_Title, RefNumber_Title, Name_Title, DueDate_Title, Aging_Title, OpenBalance_Title, Text, Blank, TxnType, Date, RefNumber, Name, DueDate, Aging, OpenBalance parameters DateMacro = Today, AgingAsOf = 'Today'

Notice that the query begins with “sp_report”.  This stands for “Stored Procedure Report” which is a simple way of telling you that you don’t have to construct a long SQL statement to get what you want – it does that FOR you.  You simply provide:

You can paste this into Excel’s Microsoft Query and get the exact A/P Aging Detail report that would show in QuickBooks (for this example I removed the “Title” fields from the query for better readability):

Choose Data Source Window

Query from QuickBooks Data Window

SQL Window

SQL Window with Input

Query Result

Result in Excel

There are advanced features of this “sp_report” query that we will cover in a future article, but there are some simple things you should know.  You can:

Easier than you might think

I am not going to pontificate about why ODBC technology should be used by more people.  Let’s face it, writing SQL queries, or figuring out how QuickBooks data tables tie together to get a job cost report, is not the easiest thing in the world – even for experts.

But there are some simple things that you can learn that may save time for you or your client by not having to export, cut, paste and re-format every time you want to analyze QuickBooks data.



Copyright © 2002 - 2009 The Sleeter Group, Inc. All rights reserved.