How To Create RDLC Report in VB.Net Windows Form Application With SQL Server

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello viewers welcome to programming geek i'm here with a new tutorial that is create rdlc report with reward path in c sharp windows form application with database [Music] start visual studio now file menu new project now i'm gonna create a new project to display how to load data how to create a dlc report and how to load identity put in microsoft report video in bb.net windows form application so my application name is create rdlcf underscore bb tutorial click on ok yes this application is created now research this form design this form first of all at the level control just drag this level control from the toolbox and drop it in this form application go to the property and the text text is user info underscore report in rdlc okay font size 18 font bold true for color full color button paste place it in the center of this form and change the back color of this form back color select the back color yes now this is looking nice go the toolbox again and add a button control yes design this button control go to the property and change the back color purple and font size four color is button face and font size font size is 12. and then button text text is load report okay now at the microsoft report viewer expand the reporting just drag the report viewer yes this is the microsoft report viewer research this report viewer okay now design is ready go to the button click event yes in this button click event i'll write code to load rdlc report in microsoft report viewer okay now go to the sql server to create ddb stable and inserting records start sql server server name is russian hyphen pc underscore pc authentication sql certification login sa password sql server password connect yes it's connected expand the database folder in the object explorer export the database database is programming db expand the table this is the table user info underscore tab and columns column size id the name address is accented birth okay now let's check the records in the database table if you don't have this table you can you should create from database and table and insert record first the records recording database table you can see now i'm gonna connect the exclusive database with server explorer in visual studio so right click on the data connection and click on add connection select server name server name is server name authentication exclusive authentication username ac and password sql server password select the database is programming db click on ok yes it's connected you can see it's in the server explorer expand the data database expand the table yes now right go to connect with the database so dim con as new sql connection to use sql connection you should import system.data.sqlclient so just click input system.sql client it's imported now to get the connection string go to the server explorer select the database and go to the property just copy this connection string and paste it in the double quotation of sql connection okay it's done now sql command mysql command is to select all the records from the database table to rdlc report so dim com as new scroll command on the select star from the table name where the server explorer table name is user info underscore tab okay write the table name user info underscore tab then initialize the connection string con okay now sql data adapter so dim sd as new sql data adapter calm okay now com is sql command okay now data table so dds new data table yes sd dot fill dt okay that's done now i'm gonna write code to load rdlc report in report viewer on my footwear id easily put viewer one you can see in the properties repeat viewer one so all right with me dot we put viewer one this is my report viewer id it would be your one dot local report dot data source dot clear in here first of all clear the data source and then dot report viewer report path equal to for the report path now i'm gonna add rdlc report in the solution explorer my project okay select rdlc report first of all select reporting in the left fan and click on report name is report1.rdlc okay rdlc report is edit you can see the report name is go to android rdlc now i have to add dataset there is no dataset yet now i'm going to create a dataset in my application so click on data in the left fan and click on dataset reset name is datasheet1.xsd okay just to drag the table from the server explorer and drop it in the dataset1.xsd okay now user input of this is data table user id username addresses section date of birth save this dataset and then go to the rdlc report click on new in the report data that is it that source is dataset1 and name is dataset1 available dataset user in fundraskull tab okay now it's added in the report data now add a page header okay page header is added now in the page here which had a footer also added i just added page header and footer okay now i'm gonna insert a rectangle to design this header okay okay this is the rectangle now design this rectangle go to the property and change the background color of this rectangle yes background color powerful this is now looking nice now insert a text box in this rectangle and text is user info report research this text okay now align center and size font size is 20 okay now change the color font color default color is black so change the color yes it's looking nice [Music] okay now i'm gonna add a header i just copy the header to footer let's change the text size and text in the footer okay footer text is created by programming gig okay select the text object and make it italic okay it's now displayed as italic now add a table and rdlc report [Music] add user id username second column and third column is address insert new column column to the right i need to add three more column for a sex and date of birth this one for ace and this one for sex and last one for data part okay this is the data birth column [Music] okay now our dlc report is ready now change the header style header style for color is equal and back color the color is powerful okay now this is looking very nice okay you can see the font white font where it is bold okay now the rd lcd port is ready go to the form on the tv yeah just for the report path my report first report first is report to 1 dot rdlc through the report name for this report name yes now add data source dot that is yours dot add new report data source to use default data so you should import microsoft reporting dot windows form okay it's important you can see microsoft reporting dot wins form now first break and double quotation in this double quotation at datasheet1 my data set one dataset name is dataset1 okay then dt my data table is dt okay finally replace the report viewer to represent goodwill here just write me dot report viewer on dot replace report okay it's done let's debug yes it's debugging click on load report yes it's loading oh login file for user essay let's check the connection string yes connection listing password password is like start so put your sql server password yes now debug again yes it's debugging okay oh accepting the report in the bin debug folder i'm gonna put physical location first of all i am showing how to get report path physical location right click on the refer to under dlc go to the full path and the property copy this full first and paste in the report path yes now it will work fine this is the physical part load report yes now this board is loaded successfully okay when you publish this application the directory on available in the client pc so for only report name instead of report path so i just removed the physical first i just put only report name see that if you use this report name you will see this error to solve this error for this report in the project bin debug folder okay so go to the solution explorer and select the application click on the show all files click on show all files now you can see the bin and debug folder is displaying in the solution expand the debug folder and just move this report1.rdlc in the debug folder just move yes the report1.rdlc is moved in the debug folder bin debug folder ok now only report name will work in report path instead of physical path okay let's see report path only report name in the report path it will work fine debugging load report yes the report is uh loaded successfully and the data is also displaying the rdlc report and strong application baby now i'm gonna adding higher clause in this sql command to load specific uh record based on is greater than 26 so higher is greater than 286 debug load report you can see the records are displaying which user's age is greater than 26 i am changing in sql command 26 to 25 okay debug now it's displaying that record where which users is greater than 25 okay you can add higher close higher address address equal to libor full now it will display that record which users addresses liberal you can see sandy and julie addresses liverpool okay now i'm gonna add a combo box control to change the condition dynamically so edit items i'll use this command box for address addresses our library for manchester oxford so change the font size font size is 12 okay now address equal to first of all you should declare a variable to use in the single question double quotation and ampersand variable is addressed images as string address from combobox1.txt so just put address variable address single quotation double quotation ampersand and variable address okay now select address liverpool report yes it's displaying the address label manchester lord report yes address manchester the records displaying based on address manchester this one for oxford thanks for watching this tutorial [Music] you
Info
Channel: ProgrammingGeek
Views: 14,315
Rating: undefined out of 5
Keywords: programminggeek, how to create rdlc report in vb.net windows application step by step, how to create rdlc report in vb.net, create rdlc report in vb.net, create rdlc report in vb.net step by step, rdlc report in vb.net windows application, vb.net report viewer, rdlc report tutorial, vb.net report designer, rdlc report designer, rdlc report, rdlc, microsoft report viewer
Id: n1dPeTduaGM
Channel Id: undefined
Length: 17min 29sec (1049 seconds)
Published: Mon Jun 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.