Options

Chart on report with empty columns

sbssbs Member Posts: 27
edited 2011-12-27 in NAV Three Tier
Hi

I have added a chart in visual studio on a RTC-report.
My problem is that the chart always shows one empty column. ie if I have 3 columns with data, then there is 4 columns (3 with data and 1 empty)
How do I get rid of this extra column? ](*,)

/edit - added an example chart

Answers

  • Options
    sbssbs Member Posts: 27
    After a week 58 has viewed this and no answers :( seems to be a diffucult one.
    I have tested a lot and here is some more information:

    If I have only one dataitem on my report, then all is fine.

    But if I have two dataitems, then the empty column appears.
    It seem as if the other dataitem creats the empty column. If the chartdataitem is first - then the empty column is at the end. and if the chartdataitem is last - then the empty column is first.

    My report needs two dataitems and the chart is based on the second dataitem.

    Any ideas?
  • Options
    rhpntrhpnt Member Posts: 688
    I really doubt that this is because of two dataitems. It all depends on data-,series- and category fields defined for the chart. Based on your image I would first check the sorting of your data - it seems that some is sorted in descending order. Also check the DataSetName property for the chart.
  • Options
    sbssbs Member Posts: 27
    Hi

    I base my chart on table 450 Bar Chart Buffer. It has only 4 rows of data. I have made them in the order 4321 - se picture. There is no empty data.

    I have Category =Fields!Bar_Chart_Buffer__X_Value_.Value
    data field =Fields!Bar_Chart_Buffer__Y_Value_.Value
    and data set is default: DataSet_Result
    All properties have default values.

    I have made a very simple report for testing this, my original report was a bit more complex.
    The test report only consists of two dataitems (table 5 and table 450) no code at all and this chart. And of course x- and y values in sections.

    If I intend my dataitem, then the chart is right but instead some other rows are multiplied :-) so I still think it has to do with dataitems. Some strange bug or a property I have missed maybe?
  • Options
    rhpntrhpnt Member Posts: 688
    sbs wrote:
    If I intend my dataitem, then the chart is right but instead some other rows are multiplied...
    Based on your quote I'd say you have a problem with linking the indented Chart table. I don't see any field in your table that could serve as a foreign key field link for a "header" table/dataitem.
  • Options
    sbssbs Member Posts: 27
    You are right, they are not linked. But I do not want them linked either.

    I will try to explain what I really want to do...
    I have one table - say customer
    For every customer I want to print out some rows based on integer table (with filter no 1..5)
    and after that I want my chart. I used table Bar Chart buffer to store data that I have calculated in customer data item.
    So my layout (attached) would print:
    customer name
    1
    2
    3
    4
    5
    chart

    my data items are
    customer
    Integer
    Bar chart buffer
    now I have an empty column


    If I instead use data item
    Customer
    Integer
    Bar Chart Buffer
    Now is the chart fine but the integers repeats 4 times ( ie 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 )
  • Options
    rhpntrhpnt Member Posts: 688
    sbs wrote:
    For every customer I want to print out some rows based on integer table (with filter no 1..5)
    By looping the Integer DataItem 5 times and having only 4 fields/chart columns you'll always get one with no data (empty). Change the 1..5 filter in the Integer dataItem to 1..4 just for the fun of it.
  • Options
    sbssbs Member Posts: 27
    No, the integer-looping has nothing to do with the charts data. This is a completely different table and different data. I could loop it 100 times or 3 times, it doesn´t change how the chart is.
  • Options
    sbssbs Member Posts: 27
    I fixed it!
    But I just can't understand why it works :roll:

    I have to indent the dataitem with the chart AND I can't have DELETEALL on onpostdataitem. I moved Deleteall to onpostreport instead.

    Thanxs for trying to help!
Sign In or Register to comment.