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

displaying data in the Table -Report Item(URgent)

1 Answer 314 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sindu
Top achievements
Rank 1
Sindu asked on 14 Feb 2012, 05:43 AM

Hi,

I want to display content in the table format ..

I have placed a table from the report item and put in the detail section of the report and
designed using objectdatasource.I treated this report as a dll and use it in my asp.net application.
So I have find out the table control using "Finnd" method .I got the tbal control.
after I assined my datatable to the table datasource ,but no data displayed.
How to generate table formatted report ?I have gone through the telerik documentation of reportite table.

my code is given below .

Report9 objreport9 = new Report9();

 

 

Telerik.Reporting.Table tbl = (Telerik.Reporting.Table)objreport9.Items.Find("table1", true)[0];

 

 

 

tbl.DataSource = dt1 ;//dt1 is the datatable object which contains data
rptViewer.Report=objreport9  // rptViewer is the reportviewer control .


but no data displayed in the reportviewer.

1)So could anyone please give me the code for my scenario? (table display content).this is an urgent requirement.
2) also I need code for data display in the list report item.

Thanks,
Sindu.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Feb 2012, 10:28 AM
Hello Sindu,

The code you've provided is correct. A possible reason for not having any data in your report is if you have not provided database columns in your Table. The Table item is a separate data source, that just like the report itself needs valid Expressions in order to display data. In other words, the Table item would not autogenerate columns/rows based on your data, you have to manually set valid expressions (e.g. = Fields.MyFirstColumn) in the table cells. If your table is big, this could be a tedious process, so that is why we have provided you with a Table Wizard that would help you in designing your table and we highly recommend using it. For sample Table implementations, see our demo reports e.g. Product Line Sales, Product Catalog and CrossTab reports.

Kind regards,
Steve
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
General Discussions
Asked by
Sindu
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or