Solved

Crystal Report with C++?????????????????

Posted on 1998-11-21
1
321 Views
Last Modified: 2013-11-20
Hello,

   Can I use Crystal Report in conjunction with VC++5.0? If it can, please list a detail instructions of using Crystal report in VC++. Many thanks.
0
Comment
Question by:stephenkong
1 Comment
 
LVL 4

Accepted Solution

by:
pagladasu earned 10 total points
ID: 1325111
Yes, you can. I hope you are familiar with the usage of Crystal reports - i.e. know how to create a report file with it.
Assuming that the report file already exists - you go about it this way:
Create your application with Appwizard - I am assuming it is a dialog based one.
Open the dialog resource.
From the DevStudio menu select Project->Add To Project and add the activex control Crystal Report. A number of files are created by the application framework for you. Most of them are wrapper classes for the control.
The control will now be visible on the ControlBar of the resource editor. Select it and insert it to your dialog. This is visible only at design time. Set its properties - especially the one pertaining to the reportfilename. (Selecting 'ALL' in the property dialog box allows you to access all the properties - just like VB). Also from the properties you can specify the destination - Window or Printer.
After this use classwizard to associate a member variable, say m_report1 with this report control.
Now in your program code, in the handler where you want the report, you write:
m_report.SetAction(1);
That's about all.
Thanks.
pagladasu
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

759 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

20 Experts available now in Live!

Get 1:1 Help Now