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

sum of formula returns wrong result

Status
Not open for further replies.

jlkjr

Technical User
Apr 5, 2010
29
0
0
US
I have a transcript report for students written in 8.5 In that report I have a formula that I use for calculating total number of absences (excused or unexcused--separate for each) for a student in a given academic year using a sum. I can't seem to get the unexcused absence portion right. It is giving me a total count of absences from the date of first unexcused absence for the year. The formula seemed to work correctly until this year.

Here is the formula located in the details section:

if isNull({StsAttndDayDtl_2.StsAttndDayDtl_2_Code}) = TRUE or
isNull({StsAttndDayDtl_2.StsAttndDayDtl_2_Academicyear}) = TRUE then
0 else
if {?Pm-StsGrdsGrds_1.StsGrdsGrds_1_Academicyear} =
{StsAttndDayDtl_2.StsAttndDayDtl_2_Academicyear} then
if {StsAttndDayDtl_2.StsAttndDayDtl_2_Code} = "1.0 U" then
1 else if {StsAttndDayDtl_2.StsAttndDayDtl_2_Code} = "0.5 U" then
.5 else 0

The sum is then in the group footer. Any help would be appreciated.
 
I am not sure how to assess that.
 
How are you linking the tables in the subreport? Go into database->database expert->table links.

-LB
 
This version does not have a database expert. I am using 8.5.
 
Of course it does. It's called the visual linking expert, I think.

-LB
 
In the subreport, please go to database->show SQL query and copy the query and paste it here.

-LB
 
Links all look correct.

The option for show SQL query is grayed out.
 
All out of ideas here, since I can't really see in detail how the report is laid out, etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top