Create RDLC Report in C# with SQL Step By Step | ProgrammingGeek

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello viewers welcome to programming gig i am here with a new tutorial that is create rdlc report with riverbot in c-sharp windows form application with database [Music] okay start visual studio go to file menu click on new project this is the directory default directory i will create this application in this directory g rdlc tutorial folder select this folder name the application the application name is create rd lc underscore f underscore tutorial click on ok yes the application is created research this form and now start sql server to check the database and table then the server name option on hyphen pc authentication exclusive authentication login essay password is specification password click on connect yes it's connected the database name is programming db table is user info underscore tab you can see columns are desired username address a6 and datapart now let's check the record [Music] these are the records in the database table [Music] okay now i'm gonna connect the database with visual studio using server explorer right click the data connection click on add connection server name server name user option have been fixed you can see okay authentication is sql certification username essay password sql server password and then select database database is programming db click on ok yes it's connected now x on the table table folder table name is user info underscore tab and the column also displaying the user info underscore tab okay now in the solution explorer i'm gonna add a report right click add new item click select reporting click report this is rdlc report name 0.1.rdlc click on it yes the rdlc report is added now right click insert page header you can add face header footer now add a text box yes in this text box i'll use to title of this report title is user info report reset this text box align center and size select the size your expected size okay now add new dataset or i didn't get data city yet so now i'm gonna creating dataset passed so to add dataset go to the solution explorer right click on the project click on add new item and then in the data select data and click on dataset data name is dataset1.xsd okay the dataset city added now just drag the table from the server explorer and drop it in the data set yes the table is added table name is user info underscore you can see and the columns also displaying the dataset data table okay now in the report data in the left hand just click on new dataset name is dataset1 and datasourcesdataset1 what i edit and table is user info underscore tab click on ok yes it's added now i'm going to inserting a table to display data in rdls report so right click insert table yes there are default three column place this table yes now select the row user id this one for user name and third column is for address add insert one more column right side okay this one for yes two more column now this one for ace and last one for sex okay my report is done design the header of this table by color light gray and font on bold phone to it bolt yes now this is looking nice okay now go to the form one design design this form so go to the toolbox and add a level control just drag the level control and drop it in the form to design this form okay the level control text is user info report using rdlc font size font size is 18 onboard true okay and four color button paste okay now back color of this form yes now this is looking nice at a button control this button control i'll use to load report rdlc report in windows form using c-sharp okay by color is powerful and font size font size is 12 font bold true and four color text is load report for color is button paste yes it's also nice now now i'm gonna add a report viewer so go to the reporting expand the reporting and just drag the report viewer and drop it in the form application place and resize this report yes it's done now go to the button click event yes this is the button click event in this event i'll write code to load data from specific database to rdlcd port using c-sharp so first of all connect with the sql server so as click on connection equal to new sql connection add new space using system.sql client just click ok the name space is edit now to get connection listing right click on the database and click on property double click to select the connection string and copy put in sql connection with double quotation okay now it's connected with the database now write code oh there is an error to solve this error at the rate before the double quotation in connection string okay now sql command mysql command is to select all the records from exclusive database table user input tab so skill command code equal to new sql command command is select star from user info underscore tab okay now initialize the connection string connection okay now sql date adapter sql data adapter d equal to new sql data adapter initially the command command yes now data table data table dt equal to new data table d dot fill dd now report viewer mario would be here id is report viewer 1 so report viewer 1 dot local report dot data source dot clear to clear the report viewer initially ok now report data choose chords equal to neo report data source your data source is data set one put double quotation and then data set one dt and it is data table you shouldn't add namespace to the user report data source so nemesis is using microsoft reporting dot windows form just click yes then space is added but it's report data choose error oh s is a small letter should put it capital letter yes now it's okay now we put viewer one you would hear one dot local report dot report path equal to double quotation go to the solution explorer and copy the report name report1.rdlc okay report1.rdlc now repo viewr1.localreport.datachoose.add chores dot add you can see reported your stores okay finally it would be your one dot refresh report okay it's done now debug load report oh login failed for user essay let's check the connection string it's displaying an error stop debugging first and uh check the connection string user id say okay it's downward password password you should put your sql server password original password okay now again the back again you can load report displaying one more are expecting the report in bin debug folder i'm gonna put physical location now okay stop debugging and for physical location to get physical location go to the application stored in the directory you can see report 200. dlc so copy this directory copy this location and paste it in the report path with backslash yes now it's displaying error for backslash to avoid this error to solve this error just put at the rate at the beginning of the double quotation okay now it's solved debug again yes it's debugging load report yes the report is displaying and report is extracting successfully okay now i'm gonna add a higher clause and the sql command so select start from user in front of exclusive where is greater than 26 okay now debug again load report the records displaying higher age is 20 greater than 26 okay this is 29 and 30 so it's greater than 26 okay now change in higher close 26 to 25 and back again yes it's displaying all the records which is greater than 25 okay now when you publish this application the directory will not available in the client faces so put only report name in instead of report path so i just removed the first directory i just only put the report name now debug see what happened [Music] load report yes you can see it's expecting the report in the bin debug folder i'm going to put the 400 rdlc in the expected location so go to the solution explorer and there is no pin folder now select the project and select show all file click on show all files yes now you can see it's displaying the bin folder expand the bin folder expand the debug folder and now just move this report1.rdlc in the debug folder just drag select and drag and drop it in the debug folder okay it's moved now see that there is only report name in startup report path debug again [Music] okay now click on load report yes the report is loaded successfully so change in higher clause remove higher clause yes now debug again load and you can see all the records listed in the database table displaying the rdlc report okay now i'm gonna add one more column in this table and rdlc report this column is for data part let's select date of birth okay now debug again load report yes all the records displaying within date of birth column okay thanks for watching this tutorial [Music] you
Info
Channel: ProgrammingGeek
Views: 62,245
Rating: undefined out of 5
Keywords: programminggeek, rdlc report in c# with sql, how to create rdlc report in c# with sql, create rdlc report in visual studio c#, rdlc report in c# tutorial, how to make rdlc report using c#, reportviewer c#, rdlc report in c#, rdlc report in c# windows application, microsoft report viewer, c# report viewer, rdlc report in c# with sql step by step, rdlc report c# tutorial
Id: -Mzd_JLS-Gs
Channel Id: undefined
Length: 16min 4sec (964 seconds)
Published: Sun Mar 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.