Calculating Equations In Reports

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I have created a report with 5 fields. I have also added
a line graph to the report. In four of the five fields
the data ranges from 0 to 30. In the fifth field the
data ranges from 0 to the thousands. This is a problem
for the chart. The y axis increments in counts of 500 so
I have one wavy line and four staight lines accross the
bottom of the chart for the data fields that range from 0
to 30. To solve this I decided I would take the fifth
field and divide it by 1000 to get a decimal number. For
example if it is 5,000/1,000 I would get a 5. Doing this
would change the numbers on the y axis from 0 to 3000 in
increments of 500 to 0 to 30 in increments of 5. What I
tried to do was in the report in the Detail portion above
the Date Footer I selected the field and did a
=field/1000 but I get an error. I have tried numerous
other ways to write the formula and continue to get
errors. Can anyone please help me with writing the
correct formula to solve this problem? I would really
appreciate it.

Brian
 
Brian,
I've (almost) always found that enhancing the query on which a report is
based is easier than adding code to the report. Try your field5/1000 trick
as the value of a new derived field (it's something like "DerivedField:
[Field5]/1000" - sorry it's been a long day I can't remember the exact
syntax) in the report's query and point your graph's "fifth line" at the
derived field.

David Straker
 
Back
Top