Skip to Content
Former Member
Sep 21, 2007 at 03:52 PM

Please Help! Formula Evaluating AFTER Sub Report!


Post Author: jmb1977

CA Forum: Formula

Hello all! Please Help!!

Here is what I have:

Main Report has wo formulas...


whileprintingrecords;Shared StringVar CT1;CT1;

and @CT2

whileprintingrecords;Shared StringVar CT2;CT2;

Nothing in the Selection Expert.

Then I have two Sub Reports for reading in phone numbers.

Sub Report Name is Contact 1

I have one forumla:

whileprintingrecords;Shared stringVar CT1 := {STUDCTCT.CNTWPHONE};

and Sub Report 2 is called Contact 2 with this formula:

whileprintingrecords;Shared stringVar CT2 := {STUDCTCT.CNTWPHONE};

In each sub report I have the following in the Selection Expert:


But for the Contact 2 sub report, I substitute C1 for C2.

In the details section of my sub reports I throw the variable on there for the formula.

Here is the problem:

When I run the report, the sub reports show the data fine with the correct student records. However, when I place the variable in my Group section of the report, it shows the phone numbers for the record above it. Somehow, the variables are executing BEFORE the Sub Report. Is there anyway to fix this so the sub report executes BEFORE the two formulas so I get the right data associated with the right student?

I am new to crystal reports and I hope I explained this well enough, if not, I will try to explain better.

Please Help!