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

Possible issue with telerik reporting and tables?

1 Answer 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rem
Top achievements
Rank 1
Rem asked on 31 Mar 2014, 04:17 AM

I have a table in telerik reporting.  I then proceeded to add a row group.  This adds a "column" on the left of the table for the group.

If I set this "column" to have a width of 0 (e.g. 0cm), and then I try to create an output for the report to pdf using code below, I get a null reference exception on the last line shown below (I have not included other lines that follow). 

If I set the "column" for the row grouping to a width other than zero (e.g. 0.1 cm, 1cm, 2cm, etc) this null reference exception doesn't occur.

I found this as I was trying to "hide " that column (for now I just did a work around where I set the width to 0.1cm, set the text to white (against a white background and moved the table 0.1cm to the left to make it look consistent with other tables)
If CertReportBook.Reports.Count > 0 Then
    Dim instanceReportSource As New Telerik.Reporting.InstanceReportSource()
    instanceReportSource.ReportDocument = CertReportBook
 
    Dim reportProcessor As New ReportProcessor()
 
    Dim tcfiletype As String = "PDF"
 
    Dim result As RenderingResult = reportProcessor.RenderReport(tcfiletype, instanceReportSource, Nothing)

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 02 Apr 2014, 05:46 PM
Hello Rem,

This is a known issue when the Table items structure is modified incorrectly e.g. there is an item in the structure with zero dimension or Visible property set to false.

The proper way to hide a column/row is to apply a filter on the corresponding column/row group. Thus there will not be rendered groups/items for the filtered out data, which is equivalent to hiding the column/row. For the purpose in the report designer you can use the Group Explorer.

I hope this information helps you.

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
Rem
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or