Reporting and Dashboards Blog

Reporting and Dashboards Blog

Reporting and Dashboards Blog - June 2009

  • Breaks in lines with the new chart engine

    Thomas Tobin Jun 18, 2009

    Ok, so there’s a missing blog post covering the new features in the new Summer’09 release. But let’s start at the end and work backwards.

    In the new charts in the summer release, there are a set of changes described in the Release Notes where we go into detail on the changes. Of course, if you are a new customer, there are no changes – there is only the charts in Summer’09, and you won’t know what the fuss is about.

    One of the things we changed was the way that line charts of grouped lines and cumulative lines shows when there were breaks in the lines.

    Data or not?

    When I looked at the old charts, and there were gaps in the data, my heart would sink. It would sink to the 0 level of the axis, where I could see all the lines there.

    image

    And I always think “well, is the value for “negotiation/review” for May really 0? or was there no data?

    Enter the Brave Few

    Happily, one of the thought leaders on visualizing data, has already thought about it, in a paper on how to deal with charting on irregular intervals.

    His view is that you can’t plot anything there. That is good for two reasons:

    1. makes sense
    2. is what you were taught in school (this line isn’t continuous)

     

    We only have this problem in two cases – for grouped line charts, where the x-axis values are set by multiple lines, and so (as in the example above) you can see “gaps” in some of the series compared to others. Above, “Needs Analysis” is stable over all the dates, whereas “negotiation/review” is not.

    In Summer’09

    Now the new picture (with the same data)

    image

    Now, the “broken line” is something you probably won’t see often (I had to cheat here to get it to show something strange). But the lines that end are something you’ll probably see when dealing with historical data (like a snapshot) or with the latest period, where not all data might be valid - for instance, looking at opportunities in the future and their stages – hopefully none are in “closed/won” but closing in December 2012.

  • IDE part 2 - using Search and Replace

    Thomas Tobin Jun 14, 2009

    So, in Part 1, we covered creating a project, and being able to delete reports. Some people were already happy about that - see the end of Mass delete reports:

    image

    It warms the cockles of my heart!

    So, once you've cleaned up the old reports we wanted to delete, what else can we do? How about changing things in reports?

    Search and Replace - changing filter values

    One thing that comes up a lot in wanting to change reports is looking for "old" filter values. These might be from picklists or member status, or territories. So, what can we do?

    Well, let's say we have reports on opportunities, and we want to change the opportunity stage names. Normally that would mean going to the reports, and changing what we were looking at. Now, we can use the powerful search and replace in eclipse to do our work.

    An Example - stage name

    So, I have filter definition on stage name. I'm filtering in my reports to only show stage 1 to 3, but I see that the third one -  “Needs Analysis” isn’t used much:

    image

    In the query I have:

    image

    Now, I want to get rid of “Needs Analysis”. I can do that in the picklist editor, by deleting the picklist value, and moving those opportunities to “Qualification”:

    image

    But my reports still filter on the old value.

    Or, I might have chosen “None” in the replacement value, then they would all still stay “Needs Analysis” – maybe I am migrating to new settings, maybe I’m converting 2 statuses to 1 new one.

    In the IDE:

    I can now see this in the IDE:

    <filter>
        <criteriaItems>
            <column>STAGE_NAME</column>
            <operator>equals</operator>
            <value>Prospecting,Qualification,Needs Analysis</value>
        </criteriaItems>
    </filter>

    andfdf

    So, let’s says I want to:

    find places where the text appears in the the <value> block of a report file

    image

    Then I can ask it to search (but don’t hit the “search” button), I’m about to explain the contents

    image

    Here, I’ve clicked the “Regular Expression” checkbox. Rather than making things more normal (like Regular Coffee, or Regular Joe), this allows me to do something special.

    The first part of the “containing text” is (<value>.*) – the parentheses mean that this is a “capturing group” – that we are going to be able to use later. This means, find something that starts with <value>, then has any number of any characters. Then the next part says “Needs Analysis”.

    I also want to search only in report files – where the pattern is *.report – any file ending in .report

    Now, hit the “replace” button, and this appears:

    image

    And here’s where it gets weird. We want to replace it with $1? You can’t even buy a coffee for a dollar (yes, I live in expensive San Francisco).

    No. The “$1” means to replace that text with whatever the search found in the parentheses – so it will replace it with “<value>” followed by whatever else was before the “Needs Analysis”, followed by the replacement value I’ve chosen.

    DON’T HIT THE “REPLACE” BUTTON UNLESS YOU ARE REALLY SURE!

     

    You want to try this in a dev org, or with a single file, or where you have the files versioned, because as soon as you press “replace”, it will replace in all files, and put that file back on the server.

    Now, for a split second, the code looks like this:

    <filter>
        <criteriaItems>
            <column>STAGE_NAME</column>
            <operator>equals</operator>
            <value>Prospecting,Qualification,Qualification</value>
        </criteriaItems>
    </filter>

    and you’ll wonder what in the Sam Hill is going on, before the save/verify/download logic build-in to the IDE takes over, and makes the code look like this:

    <filter>
        <criteriaItems>
            <column>STAGE_NAME</column>
            <operator>equals</operator>
            <value>Prospecting,Qualification</value>
        </criteriaItems>
    </filter>

    and then you are done!

    Here, the IDE has uploaded your code to the server, which looked at the filter, and decided two of the picklist values were the same, and it’s sent it back to the client with the duplicate removed.

    Remember:

    1. practice in a developer org (they are free!)
    2. back up your .report files
    3. Run “Search” to make sure you find what you want
    4. Run “replace in file” to try one file at a time
    5. Be lucky!