Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static Data question 1

Status
Not open for further replies.

techninut

Technical User
Nov 28, 2001
92
US
A quick question. Is it possible in crystal to make formulas from static text fields. Basically, in my reports I add individual data each time I run a report.

Basically what I want to know is if any one knows if there is a way to write formulas from these fields.

Example.

X Y Total
10 5 15
20 2 22

Is there a way to make a formula for the total field that would add X and Y? Remember, X and Y are not data fields, I have to manually enter this information.

- David

 
Sure, and as a matter of fact since data doesn't have to be read these will be calculated in the Pre-pass stage of Crystal's report processing.

Now, the issue is to get the data in.

You said text fields but I am going to assume typo and that these are numbers.

You would create a formula for each and if you want, to make data entry easier you can even make them parameters. Each below are individual formulas

//@x1
10

//@x2
20

...

Now,

//@y1
5

//@y2
2

Total column

//@sumrow1
{@x1} + {@y1}

//@sumrow2
{@x2} + {@y2}

Now the same using parameters (numeric) to se the values which would allow you to be prompted to enter all the data at one time for as many of these "rows" you need to create:

//@x1
{?x1}

//@x2
{?x2}

//@y1
{?y1}

//@y2
{?y2}

Total column formulas remain the same

//@sumrow1
{@x1} + {@y1}

//@sumrow2
{@x2} + {@y2}

Hope that helps and that I understood your issue.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top