Windows Forms: How to create a Chart / Graph using RDLC Report in C#
By FoxLearn 6/6/2017 9:52:38 PM 12.12K
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 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: Create Report Viewer using Stored Procedure in C#
- Windows Forms: Print Receipt using Report Viewer in C#
Categories
Popular Posts
How to download redis for Windows
10/29/2024
How to sign a powershell script
10/03/2024