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

Removing Table Rows

1 Answer 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 07 Apr 2012, 12:54 AM
I just got through my first major experience with Telerik reports, and I hope this can prove to be some constructive criticism.  While the API and the documentation & forum were very good, I was trying to do something very specific that I simply had the most difficult time completing.  I was trying to use a table (as a sub-report) and dynamically remove *some* header rows while keeping others depending on the number of rows returned by the underlying stored procedure.  I really, really, really, really wish there was an easy way to programmatically get at the number of rows returned in a Telerik SqlDataSource object.  I also wish it was made more clear that the DataObject property referred to the *parent*'s data source.  

Also, it seems that there are some unknown (unknowable?) rules about what table cells can and cannot be merged - something I find completely bizarre.  I sort of hope that in the future there is some better documentation that clearly explains how rows can be removed from a table.  Also, I think that this functionality relied on having the table set up absolutely perfectly in the designer screen.  Is it possible that a checklist could be set up of items to look for to insure that my table is set up correctly to allow me to remove rows?  I greatly appreciate that you allow options to be set at runtime via the event handlers like Table_ItemDataBound, but man... finding simple, reliable answers to row counts, and turning off/making invisible/removing table rows was very difficult to come by.   

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 09 Apr 2012, 12:42 PM
Hello Greg,

We appreciate the feedback especially when it is a constructive criticism and thank you for the kind words about our API and documentation. Up to your inquiries:
  • In general, our declarative data source components are intended to specify declaratively how to retrieve the data for the report. They do not contain any data at all, they only specify the means how to obtain it e.g. in the case of SqlDataSource - by executing a SQL query against a database. In this line of thoughts, you cannot get the number of rows as the data source component is only a wrapper.
  • The Table/Crosstab report item is not a mere grid of cells and has a very complex internal structure. The Report Designer does a great deal of work to simplify common tasks, but the underlying code is far from trivial even for "simple looking things" such as removing a table row. When you're in doubt about something, our suggestion is to create a table in the report designer and check the InitializeComponent() method for the code it has generated for it. Of course another learning source for the internal structure of the Table is its API.

Check the following forum thread for summarized information about the Table/CrossTab item and sample project with dynamic table creation.

Regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Greg
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or