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

Processing halt at datarow test

1 Answer 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bob Bruce
Top achievements
Rank 1
Bob Bruce asked on 02 Apr 2010, 12:58 PM
I am getting a processing halt: Use the "New" keyword to create an object instance. In the code below, at the point Marked <<<<
   Imports System.ComponentModel  
Imports System.Drawing  
Imports System.Data  
Imports System.Windows.Forms  
Imports Telerik.Reporting  
Imports Telerik.Reporting.Drawing  
Imports Telerik.Reporting.Processing  
 
Private Sub DetailSection1_ItemDataBound(ByVal sender As ObjectByVal e As System.EventArgs) Handles DetailSection1.ItemDataBound  
        Dim section As Telerik.Reporting.Processing.DetailSection = DirectCast(sender, Telerik.Reporting.Processing.DetailSection)  
        ' From the section object get the current DataRow  
        Dim row As System.Data.DataRow = DirectCast(section.DataObject.RawData, System.Data.DataRow)  
        If row("TierType").ToString = "4T" Then <<<<
            T4Table.Visible = True 
        End If 
    End Sub 


Also, can I expect the above code to work, once the halt problem is solved?  T4Table is once of several tables I want to hide/show based on data values from the report datasource.

Thanks for your help.

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 06 Apr 2010, 02:31 PM
Hi Bob Bruce,

As explained in the following forum post since 2010 Q1 version of Telerik Reporting the data source components are the recommended way to connect a report to data; for backwards compatibility you can still connect a DataSet or DataTable but they are converted internally for you to the ObjectDataSource component (ref.: note). This is where the things have slightly changed (again for the reasons stated above) and you should change your casts to use DataRowView due to these changes.

About your second inquiry if you hide the table, the area it occupy will not be released thus in order to avoid that behavior you have to set the height to a small value.

Kind regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Bob Bruce
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or