ASP.NET DataList control call rdlc Reportviewer report


S

Sharon

Hello Community

I have an web application and I am using a DataList control. When a row
in the DataList control is selected I want to populate the rdlc Reportviewer
report. Can anyone tell me how I can make the selected row on the DataList
control call the rdlc Reportviewer report?

Thank you in advance
Sharon
 
Ad

Advertisements

A

Alexey Smirnov

Hello Community

    I have an web application and I am using a DataList control.  When a row
in the DataList control is selected I want to populate the rdlc Reportviewer
report.  Can anyone tell me how I can make the selected row on the DataList
control call the rdlc Reportviewer report?

    Thank you in advance
    Sharon

Assign an OnItemCommand handler to

Sub Item_Command(sender As Object, e As DataListCommandEventArgs)

.....

' Get the datakey for selected item
Dim id As Integer = Convert.ToInt32(dlResults.DataKeys
(e.Item.ItemIndex).ToString())

' Get data for the report and attach datasource to a ReportViewer
control
.....

End Sub

See more

Binding Data to the ReportViewer Control Dynamically in ASP.NET 2.0
http://www.aspfree.com/c/a/ASP.NET/...ortViewer-Control-Dynamically-in-ASPNET-20/1/
DataList.ItemCommand Event
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.itemcommand.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top