Solved

How to call Crystal Reports

Posted on 1998-08-24
3
218 Views
Last Modified: 2010-08-05
i just want to know how to call a crystal reports. For example i want to call it from a visual basic program with SQL statement.

What i want to do is to pass the data i have selected from my visual basic program to Crystal reports and direct it to printer.

pls help me on this.

thanks in advance,

spritep
0
Comment
Question by:spritep
3 Comments
 
LVL 2

Expert Comment

by:vspeter
ID: 1430831
I don't think that you can pass your data directly to crystal report. However have your query as stored procedure and in designing your report, select the stored procedure as your input.

0
 

Accepted Solution

by:
entretec earned 100 total points
ID: 1430832
Seagate now have a FREE Report Designer that send send any datasource directly to a report, etc. It covers DAO, ADO, SQL. The Report Designer runs in the VB5 IDE. Download from www.img.seagatesoftware
0
 

Expert Comment

by:rutexavier
ID: 1430833
First you must add the control to your vb program, so had the crystal Report.ocx control and place it on the from. then supose you give it the name REPORT.
then place a command button in the form and in it place the code:

Report.ReportFileName = "c:\report_file_name.rpt" 'you report file name and path
Report.WindowTitle = "My Report"

'here you must place the formula. between quotes you must put the database table name (socios) and then a point (.) and the field to search (n_socio)
Report.SelectionFormula = "{socios.n_socio} =" & value_to_find
Report.Action = 1

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now