none
Visual Studio + Microsoft Report Viewer RRS feed

  • Question

  • I have created a sample report using Microsoft report viewer and visual studio. When the program is running the chart appears as this, like no proper gaps between x-axis fields. I have used a stored procedure to bind the report with the sql server database.

    Tuesday, June 25, 2019 11:03 AM

Answers

  • It looks like you have created your dataset so that each year has a separate bar for each income level.  So, 2001 has 6 bars (100,120,,125,140,160,175), only one of which has data.  2002 also has 6 bars, only one of which has data.  (You can see that the relative position of the gray bar is the same in 2004 and 2007).

    You want the X axis to be only the year, and the Y axis to be only the level.  I don't know whether its the data set or the graph setup that is wrong, but I'm guessing it is the graph setup.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, June 25, 2019 5:33 PM

All replies

  • It looks like you have created your dataset so that each year has a separate bar for each income level.  So, 2001 has 6 bars (100,120,,125,140,160,175), only one of which has data.  2002 also has 6 bars, only one of which has data.  (You can see that the relative position of the gray bar is the same in 2004 and 2007).

    You want the X axis to be only the year, and the Y axis to be only the level.  I don't know whether its the data set or the graph setup that is wrong, but I'm guessing it is the graph setup.


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Tuesday, June 25, 2019 5:33 PM
  • Hi Thushan,

    Thank you for posting here.

    It seems that you don't ask a question in this thread. I want to know what your current question is.

    Best Regards,

    Jack


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 26, 2019 2:01 AM
    Moderator
  • Yes, i had chosen the incorrect graph format.

    Thank you very much.

    Wednesday, June 26, 2019 3:08 PM