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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreports and EvaluateAfter() 1

Status
Not open for further replies.

groundclutter

Programmer
Apr 26, 2000
40
US
Okay, here's the scenario...

I have a very complex report in which I am displaying (suppressed) detail rows that contain three 'value' columns. The next three columns are going to be 'high value', 'low value', and 'something else'.

To get the values, I had to use sub reports (due to data design) and I am able to pass the value back to the report as a shared variable. Then, I have a formula in the 'high value' column that says, "okay out of the three values I passed back, which is highest?" and I display that particular value.

However, I am having a problem with sequence of evaluation. The formula to determine the highest rating is firing before the subreport is repopulating the variable. Therefore, I am seeing the value and rating displayed for the previous detail. Why this isn't happening on the first record is beyond me. Now, I know there is an EvaluateAfter function but I don't believe that will work here. Also, using the "Whileprinting...etc" doesn't work either.

Any ideas?

Thanks!
 
Evaluate after affects formulas within one report, but not subreports.

I would split the section into A & B subsections. Place the subreports into A and the final formula into B. This forces the subreports to occur first. You can then underlay section A to get it to print with B. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Thanks Ken!

That's what I ended up doing this afternoon was to insert another section and forced Crystal to evaluate the formulas in the order that I wanted (and not Crystal's)...

Also, do formulas not work when a section is suppressed? I had some funny behavior going on but was able to get around it by suppressing a variable field and not the entire section.

Thanks again!
 
formula behavior shouldn't be affected by a section being suppressed. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top