22 April 2019

Creating custom reports in KoalaBrain using Excel and VBA

I created KoalaBrain in part due to a client with unique reporting requirements. Many business and finance types are proficient with Microsoft Excel, and scripting it in Visual Basic for Application, so it made sense to base custom reports around this.

VBA Reports in KoalaBrain dumps sales and payment data into different sheets in a spreadsheet and provides it as an excel .xlsm file. The user can upload an optional template into KoalaBrain, which will add the sheets to that template and return it including the data and any macros which were in the template. This makes for simple, easily produced custom reports at a single click (or uploaded on a schedule for remote viewing if you use KoalaBrain Online).

Here's how to create a simple report which displays orders which contain items from a specified category, and which where created in a specified time period. It'll be used to print off order sheets to be sent to the manufacturer of the items in that category.

What you'll need

Steps

  1. Create a new Excel file in the .xlsm format - this will be the new report template
  2. Import vba lib into the report
  3. Add a reporting module VBA code

  4. Create a new VBA Report in KoalaBrain using the new template
  5. Generate and view the report
  6. Optionally schedule the report
  7. View the report in Excel