how see report periviwe



how see report periviwe..

Answer / Vijay Pratap Singh Chauhan

In Windows Forms, you can generate a report using a ReportViewer control. Here is an example:

```csharp
private void GenerateReport()
{
// Create a new instance of the ReportViewer
ReportViewer reportViewer = new ReportViewer();

// Load the report from a local RDLC file
LocalReport report = new LocalReport();
report.LoadReportDefinition(Path.GetFullPath("MyReport.rdlc"));

// Set the data source for the report to a DataTable containing your data
DataTable dataSource = GetData();
ReportDataSource reportDataSource = new ReportDataSource("MyDataSet", dataSource);

// Assign the DataSource to the ReportViewer
reportViewer.LocalReport.DataSources.Clear();
reportViewer.LocalReport.DataSources.Add(reportDataSource);

// Refresh the report viewer
reportViewer.RefreshReport();
}
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net WindowsForms Interview Questions

Which dialog box allows users to switch to another area of the application?

1 Answers  


Explain how to get records from a database?

1 Answers  


I have two combobox .. and i have some items in both combobox now i need to check the item in both combobox if same item is Present in both combobox i need to display that item in message box

9 Answers   CSS, Wipro,


Which method grants a lock on a resource?

1 Answers  


what is the difference between Listindex and Tab index?

1 Answers  


How do you customize the column content inside the datagrid?

2 Answers  


how can u split a column header in gridview using C#.net

2 Answers   IBM,


Is it possible to save view state on the web server?

1 Answers   Arctern,


What is form technology?

1 Answers  


What are the properties of datacontrol?

1 Answers   HCL,


What is form application?

1 Answers  


What is the use of play() playlooping() functions?

1 Answers  


Categories