Home » Reporting » Crystal Reports » Story Details
Printable Version

Create a Crystal Reports in Visual Studio 2010

by Monika Arora on Sep 27, 2011

In this article we will study how to create Crystal Reports in Visual Studio 2010.
Comments: 1    Views: 2014
Create Reports using Crystal Reports in Visual Studio 2010

                                                  

  1. First we need to make a new project by selecting new project from file menu. Now we will select Reporting tab from Installed Templates and select Crystal Reports Applications, give it a Name, click on Add and then click Open. Now, the Crystal Reports Gallery Dialog Box will open.

    It will have three options:
     
    • Using the Report Wizard.
    • As a Blank Report
    • As an Existing Report.

      crystal1.gif 
     
  2. Select Using the Report Wizard, choose Standard for Choose an Expert Option, choose Ok. From available Data Sources, select Create New Connection Folder, expand it and select OLEDB (ADO). From list of providers, select Microsoft OLE DB Provider for SQL Server. Now fill the User Id, Password and database fields and click Finish.

    crystal5.gif
     
  3. Now click + sign on the OLE DB folder. It will show database server, and database you have made. Click + sign on database , dbo and table  and then select table you have made. Now click the > symbol. Now table will show in the Selected Tables option on right side. Now click Next. Click > symbol. By doing this, fields of table will be shown in the fields in Fields to Display. Click Finish. Now expand Database Fields from Field Explorer, select your table Fields and drag them one by one into Details section of your .rpt file.

    crystal11.gif

  4. Now add Windows Form from Project menu. Drag Crystal Report Viewer from Toolbox onto form. Now on Form load event write following code:-
  5.     private void crystalReportViewer1_Load(object sender, EventArgs e)
         {
              CrystalReport1 report = new CrystalReport1();
              crystalReportViewer1.ReportSource = report;
         }

    Now run it. You will see crystal report now.

    crystalreport1.gif





     


            



 

Post a Comment
*
are you have any idea about that... there are a report at standred print page size like 12cpi or like your report... how can i change report printing size as 8cpi,16 etc. on dot matrix printer. at run time or user selection..
DevExpress PowerBuilder Web Development Windows Development Languages Software Engineering Databases
iPhone Architecture Secutiry UML & Modeling Operating Systems Networking Testing
Graphics Design Project Management Hardware Open Source Games Development Business Intelligence Visual Studio LightSwitch 2011
MonoDevelop Visual Studio 2010 ASP.NET HTML, DHTML XML PHP JavaScript
Silverlight Web Services WCF Windows Forms WPF Windows Services Dynamic Link Libraries
ActiveX COM, DCOM, ATL C# VB.NET C++ F# Java
Pascal SQL Server Oracle DB2 MS-Access Windows Servers Windows
Linux Unix SAP LINQ .NET Framework ADO.NET Reporting
Crystal Reports SQL Server Reporting Services Igenda Reports Active Reports Adobe Fireworks Arrays & Collections Hosting
Future Trends Android Windows Phone Smart Devices Business M&A Investment & Funding
Web Browsers Internet Explorer Firefox Safari Common Entrepreneurs Students
Consulting Wiki Gadgets MobileMe iCloud iOS Social Media
Facebook Twitter LinkedIn Google+ Microsoft Kinect XBox
Wii Playstation DirectX i OS OS X CIO, CTO, CEO Windows 8
Web Design Expression Blend 4 Photoshop CS5 Creative Suite 5.5 Expression Web 4 Expression Studio 4 Creative Suite® 5.5 Design
Creative Suite 5.5 Web Creative Suite 5.5 Production Startups Funding M&A Laptops Smart Phones
Desktops Cameras & Camcorders Netbooks Tablets Virtualization Microsoft Surface WordPress
Software Products Cloud Computing Current Affairs Technology TV TV
Earnings XAML E-Commerce MonoTouch Mono for Android Deals Electronics
Mobile Phone Laptop Tablet Book Computer Press Releases Reviews
Products Books Companies Windows Azure SQL Azure Interviews Mac
Web Browsers Symbian Windows Forms WPF Windows Services HTML 5 Office 365
SharePoint 2010 Exchange Server Adobe Visual Studio 2012 iPad Flex / Flash Games
Windows 9
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName