Sum report field info (1 Viewer)

gguy

Registered User.
Local time
Today, 07:34
Joined
Jun 27, 2002
Messages
104
Bob, thought this was what you needed.

The problem is in the total field called "# applications" on the rptNebraska_Buffer_Strip_Program_Summary

Thanks,
 

boblarson

Smeghead
Local time
Yesterday, 23:34
Joined
Jan 12, 2001
Messages
32,059
Sorry for not getting back to you yesterday. I was so busy at work and this one requires a bit of attention.

I got the query to have the numbers so you don't need the DSum, but getting the totals is going to be a bit more challenging because you are using the header and not the details for the information and so the multiple duplicate records on the details (even though not shown) is what is causing the sum problem.

I'm working on it right now.
 

boblarson

Smeghead
Local time
Yesterday, 23:34
Joined
Jan 12, 2001
Messages
32,059
Boy, I'm sure having a hard time with your query QryNBSP_Summary_by_NRD1. Just a note - you have so many aliased field names you are using in calculations within the same query, you really should do up a query with the aliases first and then base the query with the calculations on that one. That way the Grouping/Expression stuff will work (which is what I'm attempting to do in order to get it so you can use the DETAILS section instead of the header which is what would fix all of the calculations so you wouldn't need DSums everywhere.
 

boblarson

Smeghead
Local time
Yesterday, 23:34
Joined
Jan 12, 2001
Messages
32,059
Okay, I'm attaching a revised example. I simply couldn't get around the problem with all of the calculations in the one query and referencing the aliases in them. So, what I did is add the one query which has the NumberOfApplications in it (Qry_total_apps2) into the main report query (QryNBSP_Summary_by_NRD1) and then I could just use that field for the text box in the Group Header.

For the SUM at the bottom I created a function to do it and placed a public variable in Module 1 named strFilter so I could capture the filter being used to open the report and then the function uses a DSum based on that filter.

Hope that helps.
 

Attachments

  • BufferStrip_revBL.zip
    362 KB · Views: 75

gguy

Registered User.
Local time
Today, 07:34
Joined
Jun 27, 2002
Messages
104
Bob, thanks for all your hard work with my problem. I was called away to Texas and just got back today. Greg
 

Users who are viewing this thread

Top Bottom