Solved

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

Posted on 2014-02-25
6
353 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

752 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