visual-studio-2008rdlreport-designer

SQL Server Business Intelligence Studio: Discontinuous Line Chart


I have a report in SQL Server Business Intelligence Studio that is a .rdl file(Report Definition/Report Designer). Currently, the report graphs a line chart given the a LOAN_AMOUNT(Y-AXIS) for a given Day of the Month (X-AXIS). Everyday of the month is not represented as data being retrieved from the database. As a result, certain parts of a line may be discontinuous. How do I make this line continuous even if no data-points exist?


Solution

  • You should use a function like this:

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61519

    To generate all dates, even if they are not in the database and assign the loan amount to 0.

    For instance, if in february (no leap year) and your database has values for feb 1, and feb 14 only then you should use the date function posted to get all dates and assign the value 0 to loan amount of all other dates. Only then should you use this as your datasource for your report (I assume you are using stored procedures and not a direct table).