Jump to content

Sub-summary in a result page


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

Recommended Posts

I am looking for a method to decide if a special record in a hit list needs a leading (or trailing) sub-summary line. The reason is that I want to group that records by a special field content, like:

Country A

City 1

City 2

Country B

City 1

City 2

City 3

Country 3

City 1

and so on. If it comes to a page break, the new page also needs to start with a headline, like:

Country 3

City 2

City 3

...

Is there any way to compare the field content of te current record with the record listed before? If they are different a subline would have to be created.

Please excuse my poor English.

Link to comment
Share on other sites

quote:

with additional If...Else IF....Endif from CDML all sort of tricks are possible in browser.

Thank you for your answer. Prague always was a friend to Nuremberg :-)

Of course I understand that I have to use a structure like

[Record]

[FMP-If:*]

<BR>[FMP-Field:Country]<BR>

[/FMP-If]

[FMP-Field:City]<BR>

[/Record]

But I have no Idea what expression to use in the IF statement instead of the asterisk.

Link to comment
Share on other sites

quote:

Originally posted by Rainer:

Thank you for your answer. Prague always was a friend to Nuremberg :-)

Of course I understand that I have to use a structure like

[Record]

[FMP-If:*]

<BR>[FMP-Field:Country]<BR>

[/FMP-If]

[FMP-Field:City]<BR>

[/Record]

But I have no Idea what expression to use in the IF statement instead of the asterisk.

Rainer, send me the bits, which are connected, the db with few records and your HTML page and I will do some homework over weekend... [email protected]

Anatoli

Link to comment
Share on other sites

That's very kind of you, Anatoli. In the meantime I found a solution as follows:

For deciding if a record is the first one in a sub-summary group, I have FileMaker computing a GetSummary calculation (you need 3 fields for this!). The value of this summary field can now be compared against the CurrentRecordNumber. If they are equal, that record is the first one in the group:

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]

On a second page there are two cases:

1) The first record on that page starts a new group. In this case a headline is generated.

2) The old group continues on that page. In this case I use the opposite statement outside the [FMP-Record] bracket:

[FMP-If:CurrentRecordNumber.neq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]

Works fine so far!

Link to comment
Share on other sites

  • 4 months later...

I am trying to replicate what Ranier did in this solution so that I can create a sub-summary looking report for a results page.

I want to show the title of each class we offer GROUPED under the category for the class.

-- I made a field in my database called COUNTER that is set to equal 1.

-- I made a summary field called SUMofCOUNTER that is a total of COUNTER (since I need a summary field in order to use the GetSummary function.

-- I set up a field called GROUPEDSUMMARY that is equal to GetSummary( SumOfCounter ,MajorCategory )

-- I set up a field called RECORDNUMBER that is equal to Status(CurrentRecordNumber)

When I set up a layout in FileMaker to see how this will all calculate, I see that in the first of the five categories, sixteen titles are found, the RECORDNUMBER function shows up as numbering from 1 thru 16. And the GROUPEDSUMMARY field =16

Then the next category begins and it has two titles in it .

GROUPEDSUMMARY field =2

but the RECORDNUMBER function keeps numbering from 17 thru 18

and this continues as the categories keep coming up.

With this in mind, I can't figure out how Ranier could make the following work out:

"For deciding if a record is the first one in a sub-summary group, I have FileMaker computing a GetSummary calculation (you need 3 fields for this!). The value of this summary field can now be compared against the CurrentRecordNumber. If they are equal, that record is the first one in the group:

[Record]

[FMP-If:CurrentRecordNumber.eq.Field:firstOne]

[FMP-Field:Country]

[/FMP-If]

[FMP-Field:City]

[/Record]"

-------

Help?

Link to comment
Share on other sites

  • 9 months later...

This topic is 8208 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
×
×
  • Create New...

Important Information

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