Report STyle

  • I need to graphically display the following :

    LocationCapacityFreeCapacity

    Europe500 250

    Asia 400 50

    Africa 400 300

    I saw somewhere like a bar which was half shaded with another color.

    I tried to replicate with the above fields but Bar chart gets all messed up as all these are calculated fileds such as

    LocationCapacityFreeCapacity

    EuropeEUCapacity EUFree

    Asia ACapacity AFree

    Africa AFCapacity AF_Free

    How can I resolve this?

  • Remember we cannot see what you can see/think.

    It is not entirely clear what you want to achieve.

    What do you mean with calculated fields? What is your source?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • I think I managed to reproduce your problem... and I think I solved it.

    First off, some data to play with that I used as the data source for my report:

    SELECT 'Europe' AS Location, 500 AS Capacity, 250 AS FreeCapacity

    UNION ALL

    SELECT 'Asia' AS Expr1, 400 AS Expr2, 50 AS Expr3

    UNION ALL

    SELECT 'Africa' AS Expr1, 400 AS Expr2, 300 AS Expr3

    In my report, I added a couple of calculated fields:

    UsedCapacity =Fields!TotalCapacity.Value-Fields!FreeCapacity.Value

    PercentUsed =(Fields!TotalCapacity.Value-Fields!FreeCapacity.Value)/Fields!TotalCapacity.Value

    Then in my report, I added a tablix with

    Location, TotalCapacity, FreeCapacity, UsedCapacity...

    Then I added a DataBar and set PercentUsed as the source. The important part to get the data bar to format correctly was to set the following Horizontal Axis Properties of the data bar:

    Minimum: 0

    Maximum 1 (100%)

    then my data bar formatted properly (so 25% was half as wide as 50%, as it should be!). Before that, I got all kinds of weird widths that weren't proportional.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply