Report preview in designer not displaying data

6 posts, 0 answers
  1. Matt
    Matt avatar
    4 posts
    Member since:
    Sep 2013

    Posted 18 Jun 2014 Link to this post

    The report preview in the designer does not display any report data if the sqldatasource attached returns an empty resultset.

    I created a blank report and added one textbox to the report header and clicked "Preview" in the designer.  The textbox is displayed as expected.  But if I add a sqldatasource whose result set is empty nothing displays in the preview.  If the resultset is not empty and returns data then my textbox is displayed in the preview as expected.

    I would like for my report to show the static fields even if the sqldatasource returns with an empty resultset.

    Thanks,

    Matt
  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 20 Jun 2014 Link to this post

    Hello Matt,

    Currently, if the assigned to the report data source returns zero records, only the page and report header/footer sections are rendered. We will change this in consecutive releases, and will render static group sections as well (groups without applied grouping expression).

    For the time being,you can display "No Data" mesage in the ReportHeaderSection, and hide it if the number of records for the report is greater than zero. For the purpose you can use an expression as the following to bind the TextBox item's Visible property:

    =IIf(Exec('NoDataMessageTestReport',Count(Fields.SomeField))=0,True, False)


    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Matt
    Matt avatar
    4 posts
    Member since:
    Sep 2013

    Posted 20 Jun 2014 in reply to Stef Link to this post

    Thanks Stef,
         You mentioned that only the page and report header/footer sections are rendered.  The static text in my report is in the header section and isn't rendered in the designer preview when my resultset is empty.  If I could display the header or footer when this occurs then I would be able to work around the problem, but neither the header nor footer renders when this happens.

    -Matt
  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 23 Jun 2014 Link to this post

    Hello Matt,

    Please share the report's designer generated code or XML, so we can check your report layout.

    Feel free to open a support ticket and send us these details as an attachment in it.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Mary
    Mary avatar
    1 posts
    Member since:
    May 2014

    Posted 22 Jan 2015 in reply to Matt Link to this post

    Hi, This is exactly what I need to do as I'm creating reports for a project that has no data in it. Can you tell me if this has now been fixed i.e. whether if I upgrade to the latest version I'll be able to preview my reports even with no data.
    Many thanks
    Mary
  6. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 24 Jan 2015 Link to this post

    Hi Mary,

    In the latest Telerik Reporting version:
    • If no DataSource property is set, on preview you will be able to preview the designed report template.
    • If DataSource properties of the report or/and nested data items are set and there are retrieved zero data rewcord, on preview will be rendered only static sections - ReportHeader/FooterSection, static groups header/footer sections (groups without specified grouping criteria).

    Let us know if you have any further questions.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top