Generate Dynamic RDLC Report In Windows Form Application

Introduction

It has been a while since my last article, but coming back I have decided to write an article or a series of articles about different behaviors of C# in the professional field because this language is most popular as per industry prospects.

Background

This is necessary that the beginning-level developer be familiar with any programming concepts in general. It is also necessary that the developer has an understanding and experience of the C# language. It is also recommended that the beginning developer is also familiar with Object Oriented Programming and some design concepts as well.

In this article we will generate the dynamic RDLC report by giving only the employee ID the report is automatically generated. The report which we are generating is basically the salary slip of the employee.

Using Code

Before we start, you will need the IDE (Integrated Development Environment) which is known as Visual Studio. It is a large file so make sure you have a reliable connection before you get the download

You can download it for both versions, Mac or Windows.

IDE Download Source: Visual Studio Community 2015.

Step 1. Create a new project name as “Dynamic RDLC Report” and press the button “OK”.

Dynamic RDLC

Step 2. Drag and drop the one textbox, button, and report viewer, label from the toolbox, and set the label name “Employee ID”. And add the Oledb connection.

Employee ID

Step 3. After that, we can create a database in Microsoft Access 2013.

Microsoft Access

Step 4. Now add the RDLC report on the project and set the name “EmployeeReport”.

EmployeeReport

Step 5. After creating the report, in right side toolbox appears name as Report Data, left click on the dataset and add the dataset name as “dsSalary”.

Report Data

Step 6. Now add the dataset, after creating double click on the dataset and then left-click between the dataset and add the tableadptar.

Dataset

Step 7. Add the code on the submit button event. Now we start the code in the “Submit Button.” Always remember the name of the textbox and if you want to change the textbox name you can change it.

Submit Button

Step 8. Now you run the project and only give the ID of the employee the salary slip is dynamically generating.

 ID

Point Of Interest

The basic purpose of this article is that when we come into professional life, the intermediate level of companies don't have much time to generate every employee's salary slip in every month by making a dynamic report. Here you don't need anything; the month is always set as dynamic, it always changes by date and time. We only need the employee ID, the report is automatically generated.

Read more articles on Windows Forms.


Similar Articles