# Generating Monthly Management Reports in Podio

Here is an advanced example of how to use **Workflow Automation** to generate monthly reports. You can follow this document on how to generate monthly reports in **Podio**. For these instrustions, we used the example of **monthly corporate health** reports.

![Gen Monthly Reports](https://www.progress.com/podio/documentation/assets/24ef226985ca8931f476c55ba60292f9/gen_mnthly_reprt1.png)

## Overview

We use a **Reports app** to contain the detail numbers of each report, along with it's charts and final PDF report. We also have a **Charts app** that is used only to generate the required charts.

Once a month, we create a new **Report** in the **Reports app**, enter the numbers for that period, and when ready, click the **Make Report** category option button to generate the **PDF** report.

## The App Setup

1. The **Reports App** has the following input fields:

   * **Period** (text for year and month)
   * **Dollars Sold New Projects** (number)
   * **Monthly Paid Man Hours** (number)
   * **Total Billed Hours** (number)
   * **Revenue / Income** (number)
   * **Expenses** (number)
   * **Assets** (number)
   * **Liabilities** (number)

   1. The app also has the following additional fields:

      * **Command** (category button to initiate the report flows)
      * **Net Profit** (calculation of Income - Expenses)
      * **Net Worth** (calculation of Assets - Liabilities)

   2. Finally, the **Reports App** also has these internal fields used by the flows:

      * **New Project Sales Chart** (image for graph of sales over 12 months)
      * **New Project Sales detail numbers & text** (text)
      * **Billable Hours Chart** (image for graph of sales over 12 months)
      * **Billable Hours detail numbers & text** (text)
      * **Net Profit Chart** (image for graph of sales over 12 months)
      * **Net Profit detail numbers & text** (text)
      * **Net Worth Chart** (image for graph of sales over 12 months)
      * **Net Worth detail numbers & text** (text)
      * **Step** (category field with values 2 through 16)

        ![Monthly Reports App Setup](https://www.progress.com/podio/documentation/assets/1d0a271109c604da6f78b6d82cba856f/gen_app_setup1.png)

2. The **Charts App** is only used to generate the charts, and has the following fields:

   * **Month / MPC** (category field with values 1 through 12 for the months)
   * **Period** (calculation field to return the value of Month above)
   * **New Project Sales** (number)
   * **Billable Hours** (number)
   * **Net Profit** (number)
   * **Net Worth** (number)

     ![Monthly Reports App Setup](https://www.progress.com/podio/documentation/assets/951f782e4d0d6b23718b18d875e9fce9/gen_app_setup1a.png)

     1. There is a little hacking required here to get the desired results. The category field (MPC) with 1-12 is needed to generated Podio Report Widgets by this field. The calculation field (Period) simply returns this same value (1-12) and is required to perform searches with Workflow Automation because we cannot search on category field values at this time.

        We also need to create 12 entries in this app - one for each month period. You can start with just any numbers initially, but using numbers that make sense will make charting a little easier.

     ![Monthly Reports App Setup](https://www.progress.com/podio/documentation/assets/37b13db389ee96596aac23fb4ba38803/gen_app_setup1b.png)

## The Charts

Charts in **Workflow Automation** are generated from **Podio Report Widgets**. The **Report Widgets** are created in the **Charts App** to summarize each of the number fields by *month / period*.

Here are the Report Widgets as defined in Podio:

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/514f7a33ebf05ab66763f698e3a59872/gen_charts1.png)

We also have one item in the **Reports App** to store the resulting charts. We manually created an item and called it **Master Charts**, with no values at all. We just need a single Item we can use for the **Chart Destinations**, and will use a **Search Collector** in our flows to find these charts and place them into the currently creating Report.

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/92b53b7b04f3169e280f3635d10ce472/gen_charts1a.png)

And we defined the following charts in **Workflow Automation** to use the report widgets from the **Charts App**, and save the resulting charts in the given image fields of our **Master Charts Item** in the **Reports App**:

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/5f93c44c5582721eaea9c556ba66170c/gen_charts1b.png)

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/ade634b026e54d70ea485da63334e67e/gen_charts1c.png)

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/093a1313b24e6d2a69d80e91603ffcde/gen_charts1d.png)

![Monthly Report Charts](https://www.progress.com/podio/documentation/assets/c5dc654318ef680ca4712328feb277cb/gen_charts1e.png)

## The Flows

1. The first flow triggers when the **Make Report** category button is clicked. It will copy the required values for the reporting period into the Month 12 item in the **Charts App**, and then move the Step field to 2:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/cce9780db76e647f3a919b0bbbd4b005/gen_flows1.png)

2. The next flow iterates through steps 2-12, finding the relevant previous Report item for the historical period, copy the numbers to the corresponding items (Months 1-11) in the **Charts App**, and move the Step field to the next value:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/fb5bc5d9db71aef5408698b7fc81ccdd/gen_flows1a.png)

3. The next flow starts the text descriptions of each chart by searching for the previous period and generating each text field:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/f328eeb19838dc48ab7453cae0b4db71/gen_flows1b.png)

4. The next flow completes the text descriptions of each chart by searching for the previous year's report and adding these historical values:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/05403f0f26cebfa0a422213d8c74dcc7/gen_flows1c.png)

   ***Note**: In the previous 2 flows we also have a Wait action to give the charts a chance to complete*.

5. The next flow now copies our chart images into the current **Report Item**:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/c80d2b95daef557e8ecb16c19c1b3763/gen_flows1d.png)

6. And the last flow generates the **PDF** and **email**:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/393479ff4705220cc80b56a56f608629/gen_flows1e.png)

   ***Note**: In the PDF editor we used the source code view to add in the table and styles to present the report with a little more finesse*:

   ![Generate Flows](https://www.progress.com/podio/documentation/assets/a39d57be52699b7011e34f861ea6614e/gen_flows1f.png)

## The Result

The end result, is a simple method to generate monthly management reports. Simply create an item for the period (you can even have a flow auto-create these every month), fill in the **numbers for the period**, and click the **Make Report** category button.

***Note:** Because the charts are generated from a different app, you can also re-generate the charts and reports for any period at any time if the numbers have changed*.
