Windows Forms: How to create a Chart / Graph using RDLC Report in C#
By FoxLearn 6/6/2017 9:52:38 PM 12.17K
How to create a RDLC Chart/Graph using Microsoft Report Viewer in C#
Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "RDLCChart" and then click OK
Step 2: Create an Entity Framework Model First, then add the GetOrdersExport stored procedure to your Model
Step 3: Design your report as below
Step 4: Design your form as below
Step 5: Add code to handle your form as below
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace RDLCChart { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { using (NorthwindEntities db = new NorthwindEntities()) { //Get data from stored procedure GetOrdersExport_ResultBindingSource.DataSource = db.GetOrdersExport().ToList(); this.reportViewer1.RefreshReport(); } } } }
VIDEO TUTORIALS
- How to Create Report Viewer using Stored Procedure in C#
- How to Create QR Code in RDLC Report in C#
- How to Print RDLC Report without Report Viewer in C#
- How to Display an Image in Report Viewer using C#
- Windows Forms: Print Orders/Receipt using Report Viewer in C#
- Windows Forms: Print Receipt using Report Viewer in C#
Categories
Popular Posts
Material Admin Dashboard Template
11/15/2024
Responsive Admin Dashboard Template
11/11/2024
Freedash bootstrap lite
11/13/2024
Horizon MUI Admin Dashboard Template
11/18/2024
Modular Admin Template
11/14/2024