Minimum 5 rows in report.rdlc table RRS feed

  • Question

  • User-19205220 posted


           In my report1.rdlc I have a table which use to fill with the dataset value. Some times the table in the dataset may have only 1 row some times 5,10 etc.

    How can I make the table in the report.rdlc such that at all times it should show minimum 5 rows ie if the dataset table contains only 1 row the report.rdlc table should contain 1 row with data and rest 4 rows blank

    Monday, December 27, 2010 11:19 PM


  • User-37275327 posted

    Simple add blank rows to the dataset and bind the report,

    get the total row count of the table and insert empty rows.

    DataRow _DataRow = dsReportData.Tables[0].

    _DataRow[0] = string.Empty;

    dsReportData.Tables[0].Rows.InsertAt(_DataRow, 0);

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, December 28, 2010 1:02 AM