Inside VB using Crystal Report

Posted on 2000-01-09
Medium Priority
Last Modified: 2012-05-04
How to Intract with the Crystal Report Data like Report Title and Date. Can I change the Date or title of the field from the Visual Basic?

How can I Calculate the Accumulation of the field in the Crystal Report.
I give the example Below. Here I want the balance Column

Debit      Credit        Balance
100          0             100
0            65               35
70            0             105
0            50               55
170       115               55
Question by:kazendirane
  • 2
  • 2

Author Comment

ID: 2337354
Edited text of question.

Accepted Solution

yjt earned 70 total points
ID: 2337990

There are two methods that you can use to sum up your column.
1) Creating a new formula by going to menu item Insert->formula field and specify a new formula name. eg TotBalance. This will bring up the formula builder. Type in:
Sum ({tblProd.Balance})

where tblProd.Balance refers to your table's balance field. Drag the formula to your footer and place it there.

2) Assume that you have a group header and footer defined. Right click on the balance field in the detail section. Choose Insert subtotal and choose the group name. The sum field will automatically be added for you at the footer.

And for your other question, you can use a formula to control whatever is displayed as the field title. Create a new formula and named it TitleCol. In the formula builder, you can change it as you will. Eg:

If {tblProd.Balance} = 0 then

the method above allows you to change the title field to display as balance or total

Good Luck!

Author Comment

ID: 2338931
Dear vit
In this report I want the Calculation of Balance row by row
in which the balance column accumulated row by row.

As well as How to send the Parameters to the report.
Can I send the date or name to the report from Visual Basic?


Expert Comment

ID: 2349054
You can have a look at how to pass fields to CReport using VB:


Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

624 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