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 |
Which dialog box allows users to switch to another area of the application?
Explain how to get records from a database?
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
Which method grants a lock on a resource?
what is the difference between Listindex and Tab index?
How do you customize the column content inside the datagrid?
how can u split a column header in gridview using C#.net
Is it possible to save view state on the web server?
What is form technology?
What are the properties of datacontrol?
What is form application?
What is the use of play() playlooping() functions?