Jump to content

Using JMO's Restart Subsummary Numbering calc...question


This topic is 5776 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This if for John or anyone else familiar with his calc field for restarting numbering for subsummary sections:

Case(

GetNthRecord(Category; Get(RecordNumber)) ≠ GetNthRecord(Category; Get(RecordNumber) - 1);

1;

GetNthRecord(RestartNumbers; Get(RecordNumber) - 1) + 1

)

This calc works great BTW...my question is this:

Is it possible to add a calc field to each record that will take a field and divide by the number of records in the subsummary section?

For instance if my field NUMBERS is 50 and i have a report that uses your calc to number say 10 records in a subsummary section 1-10 then the calc would be 50/10.

this would help me immensely if this is possible.

Thanks for any help.

Edited by Guest
Link to comment
Share on other sites

  • 2 weeks later...

You'd need a Summary field. It could be "Count of" some field. Or, if you've got a Constant=1 calculation field, it could be "Total of". Last() is an aggregate function, not much to do with Subsummaries; more for fields or relationships.

Link to comment
Share on other sites

hmm. the issue i am facing is that the value needs to be on every record in the body section in the subsummary part. i dont think a summary field will work here because it will return everything.

i am trying to compare a rollup of values in one table against individual values in a second table, but i cannot get the rolled up values to sum across the break fields, since there is no value in each record of the body.

Link to comment
Share on other sites

I am still not sure what your question is. At first, I thought you wanted "the number of records in the subsummary section". That's easy: define a summary field sCount that counts your SerialID. Then, a calculation field =

GetSummary ( sCount ; Category )

will give you the number of records belonging to the same category as the current record (when sorted by category, of course).

But you mentioned another table and "a rollup of values" and I got lost.

Link to comment
Share on other sites

sorry to confuse you. i am confused as well, obviously :)

i have a table that includes several records for a given fund code. i need to compare the total of those funds (i.e. rolled up) against individual records in a budget table (related by fund code), to get a balance. when i sort the report by fund code, the totals are correct (which are a summary of the fund amounts), but i cant seem to get the total of all the summary amounts. For instance a project manager may have several fund types, each with several budget records.

i guess i need a "summary of a summary field"

i was thinking of creating an intermediary table that would sum the fund amounts first, and then relate that to the budget table.

wow, did i just confuse you even more? it all sounded so clear in my head!

Link to comment
Share on other sites

Yes, it's rather confusing. So you have your totals per fund code. To get the totals per manager, add another subsummary part (when sorted by manager), place the same summary field in that part, and sort by manager, then by fund code.

How this is related to your first post is beyond me.

Link to comment
Share on other sites

against individual records in a budget table

Try to put the summary field in as both the breaker value as well as what it uses to be in the GetSummary( calc'function ...this is bound to be a scripted matter - if accidenatally left un-attendet on a arbitrarily openend layout will it cause hourglasses or bathball's according to operatingsystem ...if the found set is of some size.

--sd

Link to comment
Share on other sites

yes that is the first thing that i tried, but it didnt work. my assumption is because there are no fund amounts in the body of the report, only on the subsummary by fund parts. this is the only report i have ever had issues with, so i think i am going to start over from scratch.

Link to comment
Share on other sites

This topic is 5776 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.