rownumber based on expansion

  • I have a large table with 5 groupings - all are collapsed by default.

    At this point on want a line (bottom border) every 5 rows.

    Now, if the user expands a group/section, i want the line to be every 5 rows of the expanded set.

    And if the user continues to expand, i want the line to continue every 5 rows.

    Does that makes sense?

    Does anybody know how to accomplish this?

    Basically I want a runningvalue count or a rownumber based on expansion, but I have no idea how to accomplish this...

    Thanks for any ideas.

    -M

  • I would guess that an expression like this might work in the details section(s):

    IIF(RowNumber(group_name) mod 5 = 0, Solid, None)

    I'm not sure how you would get it to work on the group level as I don't know how to determine how many groups you have.

  • Thanks Jack.

    Actually, I'm not even using the details section - I am using 5 groups instead.

    I currently have it so that there is a line/border every 5 rows in each group by using the following:

    =IIF(RunningValue(<>,CountDistinct,"<>") mod 5 = 0, "Solid", "None")

    But this isn't exactly what I am looking for because, for example, when the lowest level is expanded and only has 4 records each but the second to lowest has 10 records, the display is showing 20 rows before a line.

    e.g.

    north america

    usa

    wa

    seattle

    olympia

    tacoma

    bellevue

    or

    portland

    eugene

    salem

    astoria

    id

    boise

    coeur d' alene

    sun valley

    ca

    san diego

    san fran

    los angeles

    sacromento

    santa monica

    ___________________________________________

    venice beach

    sonoma valley

    az

    phoenix

    tuscan

    ___________________________________________

    nv

    las vegas

    ...

    instead of:

    north america

    usa

    wa

    seattle

    olympia

    ___________________________________________

    tacoma

    bellevue

    or

    portland

    eugene

    ___________________________________________

    salem

    astoria

    id

    boise

    coeur d' alene

    ___________________________________________

    sun valley

    ca

    san diego

    san fran

    los angeles

    ___________________________________________

    sacromento

    santa monica

    venice beach

    sonoma valley

    az

    ___________________________________________

    phoenix

    tuscan

    nv

    las vegas

    ...

    If anyone has any other suggestions, 'shout em out'.

    Thanks, M

  • So what are your groups? Can you post some sample data that I and others can play with? And the query you are using to populate the dataset?

  • Thanks Jack. I'll see if I can gather some sample data this weekend or early next week.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply