Solved

Make a report from a sql statement in VB 2010 with Crystal reports

Posted on 2014-02-25
6
347 Views
Last Modified: 2014-03-02
Looking for some examples of how to create a Crystal report from a sql statement that I currently use in VB.   The sql server is local to the machine that runs the program.
0
Comment
Question by:DJ_Consulting
  • 3
  • 2
6 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39887583
0
 
LVL 11

Expert Comment

by:SAMIR BHOGAYTA
ID: 39888047
hi..
Usually you will link Data Tables to your report using Database Expert. Do the same in Database Expert, select the Database and you can see Add Command. Select that and click on > button. You will get a Window, write your SQL Query there and press OK.

See the image below for your reference.

Example that how to get fields from sql statement to report viewer
Add Command

After finishing this you can see Command in Database Fields which contains all your records got from the SQL Query as result.

Hope this helps you. Try and get back with results.
0
 

Author Comment

by:DJ_Consulting
ID: 39898724
I might not have asked this question correctly.    I already have the data in a dataset inside of my existing VB program.     Currently upon form submit, I pull a query and write it to a csv file before emptying the db.   In addition, to the csv file being written, I'm trying to add code that would send this dataset to a crystal report for manipulation (summaries and some formatting).
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 70

Expert Comment

by:Éric Moreau
ID: 39898968
have you checked the link I have already provided (http://emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx). It does exactly this (pushing a dataset to a report)
0
 

Author Comment

by:DJ_Consulting
ID: 39899348
Yes I've gone through the link and get to the part where it is time to do testing, and I'm not sure how to implement the code.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 39899407
try the downloadable sample
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question