This is a migrated thread and some comments may be shown as answers.

Report preview in designer not displaying data

5 Answers 1263 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 18 Jun 2014, 08:10 PM
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

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 20 Jun 2014, 02:20 PM
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.

 
0
Matt
Top achievements
Rank 1
answered on 20 Jun 2014, 02:38 PM
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
0
Stef
Telerik team
answered on 23 Jun 2014, 12:51 PM
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.

 
0
Mary
Top achievements
Rank 1
answered on 22 Jan 2015, 10:48 AM
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
0
Stef
Telerik team
answered on 24 Jan 2015, 10:35 AM
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.

 
Tags
General Discussions
Asked by
Matt
Top achievements
Rank 1
Answers by
Stef
Telerik team
Matt
Top achievements
Rank 1
Mary
Top achievements
Rank 1
Share this question
or