Adding a graph, chart to crystal report in Visual basic

Crystal Reports enables you to include sophisticated, colorful charts and graphs in
your reports.
When you add a graph to your report, you are graphing summary and subtotal
information. Before you can add a graph, therefore, you must have at least one group
and one summary or subtotal in your report. For example, if you have a sales report
grouped by State and a subtotal of Last Year’s Sales for each State, you can quickly
create a graph that will display sales by state.
Adding and modifying your graphs is easy in Crystal Reports with the use of the
Graph/Chart Expert. Use the Expert every time you create or modify graphs. The
Expert walks you through the creation of your graphs step-by-step.



1 Click the Insert Chart button on the button bar to access the Graph/Chart Expert.

Types

Tab

When you begin creating your graphs, you will need to choose one of the many
graph types available. To select a graph type, click the button that corresponds to
the graph type you want.

Data

Tab

In the Data Tab, select what data you want to graph on, how often you want it to
print (dependent on where you want it displayed), and what you want to show in
the graph.
The graph on drop-down box displays all the summaries and subtotals on your
report. Simply select which one you want to base your graph on.

Text

Tab

The Text Tab allows you to enter labels for your graph by inserting titles,
footnotes, and axis titles when appropriate. Simply type the text into the
corresponding boxes. The program will only use the labels appropriate for the
graph type that you chose earlier. The others will be ignored.

Options

Tab

The Options Tab enables you to place a legend on your graph, a maximum or
minimum limit on the graph values, or a number of other options.




OLE Objects
Crystal Reports is an OLE container application. Thus it allows you to place OLE
objects in your report. To do this:
1 Choose the Object command from the Insert menu.
2 Insert an existing object by choosing the Create from file option and selecting the
desired object, or create a new object by choosing the Create New option then an
object type. The corresponding application will open where you can create the
object as desired.
3 If you want to edit the object, simply double-click it and the program in which it
was created (or a similar application that allows such editing) will open.
4 Modify the object as desired, save it and Crystal Reports automatically updates the
object in your report.


No comments:

Visual Basic-6 has emerged as one of the standard Windows Programming Language and it has become a must for all Software people for developing Applications in Visual Environment. So it is, one must learn Visual Basic-6.

What is our Objective in this Courseware?


The Overall Objective in this Courseware is to give a Hands-on Approach to develop different projects in Visual Basic-6.0 using intrinsic, professional and user–created ActiveX controls and also develop projects using databases, DAO’s, ADO’s, DLL’s, Documents, Crystal Reports etc. covering almost all the essential features of VB-6 Professional Edition. After reading one lesson any interested reader will be able to get complete hands-on experience with the VB project and get a sense of fulfilment and achievement. Learning by doing is the motto with which this courseware is written. After giving a short introduction about VB-6 we will explain how to create and execute a project in VB using some intrinsic ActiveX controls. Creating and executing projects will be the central theme of all the lessons which we will be giving in this courseware.

What is Visual Basic-6?


Visual Basic-6 has its origin in Basic which was developed round about the year 1960, when high level languages were just being introduced to the computer community. Microsoft has made it extremely powerful by gearing all its good features to the Windows environment. Starting with the version 3 and then with 4, and then with 6, Visual Basic is now at version 6. Basic is a Procedure Oriented Language intended to implement single tasks in text based environment whereas Visual Basic is an Event Driven Language intended to implement Projects or Applications containing multiple tasks in Windows Environment.

What can Visual Basic do for you?

Visual Basic can serve as an ideal front end tool for the clients to interact. It has got connectivity mechanisms for all types of databases situated far and wide in a network and so it can cater to the needs of a large body of clients. Using the latest ActiveX technologies, it can integrate the functionalities provided by other applications like Word Excel and other Windows. Its internet capabilities provide easy access to documents and applications across the internet. Above all it embodies the Object Oriented Technology, which is the cutting edge technology for all the present day developments in the Software World. The final application is a true EXE file and so can be freely distributed.


Structure of VB-6 Projects:


We said earlier that VB-6 implements projects or applications. A project is developed using one or more Forms. A Form is simply a window containing one or more Controls. Controls in VB consist of labels, text boxes, list boxes, combo boxes, scroll bars etc. which are the constituents of windows environment. It is only the controls that give VB, its immense power and so there is a lot of interest in creating more and more powerful controls. ActiveX controls mark a significant development in controls technology. In fact all controls in VB-6 are ActiveX controls, which have the extension .ocx. These controls have properties whose values can be initialized at design time and also varied during run time. The properties are something like variables. The controls are activated by codes written in a high level language. By associating our problem variables with the properties of the controls, our problem variables can be manipulated to give the problem solution. In summary we can say that a VB project is made of forms, controls and their properties and codes.

Integrated Development Environment:

The working environment in VB is often referred to as the Integrated Development Environment or IDE, because it integrates many different functions such as design, editing, compiling and debugging within a common environment. Since all our projects are developed only in the IDE, let us now have a brief look at its features. You will be able to understand their uses at the time of building projects. The VB IDE looks as shown in the figure.