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

Underline last record on detail in a grouped report?

Status
Not open for further replies.

gtroiano

Technical User
Nov 7, 2001
99
US
ok, i have a report with three group headers and footers(grants, loans, other). the detail shows the type of programs that fall under these catagories. what i am trying to do is underline the last record in each group.
i tried to put a counter in the detail section(this worked) and then choose the highest number(this also worked), using michaelred's basMaxVal() function, and format the line that way, but i can't seem to get it to work. i have a text box for the counter and a text box to return the highest value(not sure where this should go) but when i try to do an if statement to compare the two text box's values, thus underlining the last line, the highest value text box turns to "1". any ideas or other ways to achieve this?

jerry.
 
Since you already have group footers, why don't you draw a line at the top of the group footer, to line up underneath the field you want to underline??

This should work since the group footer appears immediately after the last record of the group.......

Let me know if this is OK....
 
i must be an idiot. that works just fine. out of curiosity, do you think the previous method would work somehow?

jerry.
 
i ask because sometimes the value being underlined is a different length and a drawn line would be fixed.

jerry.
 
Jerry,

I had a feeling that was your goal. I knew that the line draw was a quick fix, but sometimes a quick fix is better than nothing.

I can't think of a way right now, but if I come up with something I'll let you know...Hopefully someone else out there has come across this before.......
 
great. thanks for keeping it in mind.

jerry.
 
this shouldn't be too hard. perhaps there is a better way of determining the last line in the detail, because this seems to be where it get tricky.

jerry.
 
for all those who care, if anyone, i figured this out...sort of.
fortunately, the number of records per group on the report is fixed so:
in the on format event of the detail section of the report, i put a nested if..then..else statement using the counter's results to retrieve the last line and the criteria for the grouping on the report to format only the last line. if that makes any sense whatsoever.

jerry.
 
Oh, well, Soooooooo shakesperian. much ado about nothing.

You can get the height of a section and draw the lines below each control quite precisely. For REPORTS, I believe it is the OnPrint event which has the Actual height of the section. Given the height, draw the HORZ lines from the left of each control for it's width with the line top set at the detail section height. Somewhere in all of this code I have the example drawing vertical (column) delimiters and another drawing boxes around groups of controls. But given the clue about needing the ACTUAL height of the section the rest is actually quite easy.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
MichaelRed:

Apropos my previous post, what is it that the text box that gives the highest number goes to "1" when you try and compare it to the counter?

jerry.
 
W/o knowing more about the process than is (probably) useful for either of us, it is a mystery to me. i wasn't repolying to THAT specific item/ question, just the overall concept (drawing lines in / on the report).


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top