mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Additional Grouping Options for Report's Graphs
Many customers are interested in
showing multiple records of data onto a single graph, but are unsure how
something like this would be accomplished. This documentation will walk you
through the steps needed to create this kind of graph.
1. Select a file that would be
appropriate (data that is separated into 12/24 months (fields)). 
2. Select a Sequence key off of your key field.
3. Select a Record Selection on your key field. We recommend using the “In the List” relationship as it will provide you with greater flexibility at runtime. For the value, enter ?.
4. Within the Preformat screen, select your key field, and put an “A” in the User Defined Field Control. This will cause your selection criteria field to be populated in a drop-down box at runtime.
5. Choose the Report with Graph Template from the Application Defaults link.
6. Compile and Build your application.
7. Open m-Painter.
8. Right click on the graph and select “Graph Properties.” Click “Image Data Collection.”

Note: If your key field is numeric, m-Painter will attempt to graph it. Because of this, be sure to remove any fields you wish not be graphed from the “Graph Values” and “Graph Value Descriptions” box.
9. By default, m-Power assumes you want to graph the grand total line. While this is true in most cases, this time we want to graph each detail line. Locate the “Apply All” button (circled below) and click it – this will change your substitution codes from F_G_TN… to F_V_TN… indicating values graphed from the detail line.

10. In the Graph Value Descriptions box, remove all text, and in its place, enter the substitution code of your key field, F_V_TN_[FIELDNAME], in our case it is SMNAM.

11. Next, we need to add the ability to group. That is, certain values (such as each month) will need to be grouped so that multiple records will be graphed on one screen. In our case, there are 12 fields – one for each month. So we will add Jan through Dec in the Graph Value Groups box. (Note: You can enter whatever text you would like, so long as there are 12 instances of text.

12. Those are the main required changes. The next few steps are to go the extra mile.
13. On the same screen, at the center at the very top there is an Image Style field, select Line Chart from the Drop down list.
14. Select the Image Properties Tab. Half way down the page, you will see a “showlegend” option. Set this to Yes. Click OK.
15. You should now be back to your main m-Painter screen.
16. The last required step is to move your Image Collection Icon from the Grand Total Line to the Detail Level line. This step is critical and can not be skipped.

17. Click Save. Run your application.

Notice, in the image above, that I selected 3 Salesman, each Salesman data is shown for the according month. Now see how it looks with different Salesman selected:

On Step 13 (listed above) we changed to a Line Graph, had we chosen a 3D Bar Graph, the same screen would look like this:

How to Show Multiple Lines of Data from
the Same Record?
Say we were interested in taking
the same graph, but now instead of showing multiply salesman, I am just
interested in looking at one salesman, but comparing their Jan – June
information against their July – Dec data.
Note: (This concept
could also be extrapolated out to compare 12 months of actual data with 12
months of projected data).
We can take the example we already
have and make a few small modifications to it.
Within m-Painter, right click on
the image, and select Graph Properties. Based on the example above, you should
see something similar to this:

Since we will already know the Salesman (we are, after all, only selecting one) we can remove F_V_TN_[SMNAM] from the Graph Value Descriptions box. In it’s place we will put the text Actual, Actual, Actual, Actual, Actual, Actual, Expected, Expected, Expected, Expected, Expected, Expected. Since we are graphing 12 sets of data, there needs to be 12 instances of text. Note: Actual is listed 6 times, then Expected is listed 6 times. This means that the first 6 sets of data will be placed on the “Actual” line of data, with the last 6 being placed on the “Expected” line of data.
Lastly, we will modify the “Graph Value Groups” line so that it incorporates the 6 groups. In our specify case, Jan – July, Feb – Aug, Mar – Sep, Apr – Oct, May – Nov, and Jun – Dec our are 6 groups. They will, however, need to be listed twice. See below:

Click OK. Then Save.

Notice the six groups listed at the bottom of the graph (Jan-July, Feb – Aug…..). Also, notice the legend where Actual and Expected are displayed. This information is coming from the Graph Value Description text box.
The same screen as shown above, now shown as a 3D Bar Graph, would look like this: