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

How to bind data in Telerik ReportViewer Using Itemdatabound / any date binding method

5 Answers 321 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ragu
Top achievements
Rank 1
Ragu asked on 05 Dec 2011, 08:35 AM
Hi,

I am new to Telerik... I am using .Net 2010.
I have bind the data in the Telerik ReportViewer  using sqldatasource by storeprocedure But, my requirement is to scribble some thing in the C# code and then i need to bind it.
I have a page as Reportpage.aspx and repot  as report.CS

I am using that reportviwer in reportpage.aspx like

 <telerik:ReportViewer ID="ReportViewer1" runat="server" Height="655px"       CssClass="rgSelectedRow"
                Width="1434px" ondatabinding="ReportViewer1_DataBinding" >
                
             </telerik:ReportViewer>

Where and how can i use Itemdatabound to bind data to REPORT.

Please advice me or give me the sample code...

Thanks
Ragu

5 Answers, 1 is accepted

Sort by
0
Accepted
Elian
Telerik team
answered on 05 Dec 2011, 05:20 PM
Hi Ragu,

If you want to manipulate the data after retrieving it from the SQL and then pass it to the Report, you should use SqlDataAdapter:

string connectionString = "Data Source...";
string selectString = "SELECT...";
SqlDataAdapter sqlAdapter = new SqlDataAdapter(selectString, connectionString);
//create a dataset, fill it and set it as datasource to the processing table object
DataSet ds = new DataSet();
sqlAdapter.Fill(ds);
var table = ds.Tables[0];
//you can iterate through the table rows and get the data manually.
Then you should pass the modified data to a ObjectDataSource. Kind regards,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Ragu
Top achievements
Rank 1
answered on 07 Dec 2011, 08:06 AM
Hi Elian,

Thanks for your quick reply. :)

I have fixed by passing the values to data source manually.Thanks.

Thanks
Ragu.

0
Ragu
Top achievements
Rank 1
answered on 08 Dec 2011, 09:53 AM

Hi, I have a another issue in design.... i need to place the picture in between the 2 panels, I.e some thing look like this...

i.e By keeping the picture on the 1 st and 2nd panel... in css style, I can say..It should be in "Position:absolute;"

Is it possible to set the location of the picture to float on the panels.... Please see attachment for my requirement. 
 
0
Elian
Telerik team
answered on 09 Dec 2011, 03:57 PM
Hi Ragu,

From the pictures you provided, I assume that you want the picture to extend on more that one report section. That is not possible, because the report sections grow, according to their child elements.

However from what I see, you are using the group header to accommodate your data and the ReportHeader as data header. I believe that you can do a little rearranging of layout logic and achieve the same result  (including the picture taking the whole space). Maybe using a table in the detail section will be most suitable for the purpose.

All the best,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Ragu
Top achievements
Rank 1
answered on 14 Dec 2011, 09:46 AM
Hi Elian,

Thanks for your reply and advice..:)

I have managed to fix the image in my header section itself. Look fine. I have attached a screen capture of my design. Kindly see the attachment.

Thanks,
Ragu

Tags
General Discussions
Asked by
Ragu
Top achievements
Rank 1
Answers by
Elian
Telerik team
Ragu
Top achievements
Rank 1
Share this question
or