Click here to Skip to main content
15,886,799 members
Articles / Programming Languages / C#
Tip/Trick

How to create a microsoft report from the dataset

Rate me:
Please Sign up or sign in to vote.
2.33/5 (3 votes)
9 Aug 2010CPOL 15.4K   1   3
First create a reportviewer and then report.
create a dataset,in dataset create a table using table adapter tool.
add columns in the table according to the need.the content of the table must be equal to the content that
is retrieved.now consider report viewer as rpviewer and report as rpt,write this code to bind the dataset
with the Msreport(rpt).Find the *bindingsource which is present in reportviewer(below).

:-D Query = .....;
adapter.fill(datasetname,"table name of the dataset");
*bindingsourcename.datasource = datasetname;:cool:It works Good!!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Sundaram Infotech
India India
I am a Software Specialist.Worked & Working in Various IT Based industries.I have good Exposure in ASP.net, C# and other Microsoft Technologies.

Comments and Discussions

 
QuestionNeeds your assistance to get this code on report viewer to work Pin
solokupo25-Sep-13 1:52
solokupo25-Sep-13 1:52 
GeneralReason for my vote of 1 NO Pin
Herman_9-Apr-11 6:47
Herman_9-Apr-11 6:47 
GeneralWhat's new in it? Ain't it a standard way to do it? Any tip ... Pin
Sandeep Mewara8-Aug-10 3:17
mveSandeep Mewara8-Aug-10 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.