Crystal Reports from SQL Query String
In VB.NET, Crystal Reports can be generated by utilizing SQL Query Strings. In this context, we develop a Strongly Typed dataset specifically designed for Crystal Reports. Additionally, we create a connection object and execute the SQL Query String to retrieve the required data.
It is essential to note that all the programming samples provided in these tutorials for Crystal Reports are based on the crystaldb database. Prior to commencing this tutorial, I recommend acquainting yourself with the structure of the database. To access the database structure, kindly click on the following link: Click here to view the Database Structure.
To acquire a comprehensive understanding of Crystal Reports creation, I suggest referring to the previous section of this tutorial. It provides detailed step by step Crystal Report guidance on creating Crystal Reports. Familiarizing yourself with the basics outlined in the step-by-step Crystal Report guide will prove beneficial before proceeding with this tutorial.
Generating a Strongly Typed DataSet
In the preceding section, a comprehensive tutorial was presented, detailing the process of create a strongly typed datset and designing Crystal Reports based on it. Once the dataset and Crystal Reports design have been established, the subsequent step involves creating a connection object and retrieving data from the database.
Select the default form (Form1.vb) you created in VB.NET and drag one button and CrystalReportViewer control to your form.
Put the following source code in the button click events
Full Source VB.NETYou have to provide the necessary databse information to Connection String.
- Sample Database and tables for Crystal Reports tutorials
- Step by Step help for creating a simple Crystal Reports in VB.NET
- VB.NET Crystal Reports from multiple tables
- VB.NET Crystal Reports String parameter
- VB.NET Crystal Reports Integer parameter
- VB.NET Crystal Reports Date parameter
- VB.NET Crystal Report Load Dynamically
- VB.NET Crystal Reports Formula Fields
- VB.NET Crystal Reports Summary Fields
- VB.NET Crystal Reports Export to PDF
- VB.NET Crystal Reports Export to Excel
- Email a Crystal Reports from VB.NET
- Crystal Reports Without Database
- Dynamic Crystal Reports from SQL Query String
- Crystal Reports from XML File
- Create a Subreport in Crystal Reports
- Create a Subreport in Crystal Reports with Link
- How to deploy Crystal Reports on Clinet Machine
- How to create Crystal Reports installer using Merge Modules