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!

Incorrect calculation on Export

Status
Not open for further replies.

JasonDecHer

Technical User
May 24, 2002
19
US
I have a report that contains two sub reports. The main report and subreport1 each have one shared numbervar. Subreport 2 uses those two variables and multiplies them with the results of a run total formula. Everything works great within Crystal reports, however if i export this to a word document it multiplies the run total results twice.
Example Crystal Reports
Main Report
shared numbervar A := 2

Subreport1
Shared Numbervar B:= 3

Subreport2
Runtotal (result):=4
TotalCalc:= A * B * Runtotal; So TotalCalc = 24

When i Export it to a word doc.
Example Crystal Reports
Main Report
shared numbervar A := 2

Subreport1
Shared Numbervar B:= 3

Subreport2
Runtotal (result):=4
TotalCalc:= A * B * Runtotal* Runtotal; So exported TotalCalc = 96

It doest do this with exporting to Exel only word. Any ideas why this is happening? Or how i can fix it?
Thanks in advance,
jason
 
The totalcalc formula for the Word .doc was different, is this because this is your assumed way that it's processing?

"TotalCalc:= A * B * Runtotal* Runtotal; So exported TotalCalc = 96"

vs.

TotalCalc:= A * B * Runtotal; So TotalCalc = 24

The math seems correct for each. If there really is a problem, and what you shared is not the actual formula, then you might try encompassing parts of the formula in parens.

TotalCalc:= (A * B) * Runtotal

I tend to use RTF when asked to produce Word docs, it seems to be more accurate.

Also make sure that you've applied the latest hot fix files from crystaldecisions, they modify the exports often.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top