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!

CreateReportControl Confusion 1

Status
Not open for further replies.

GavinP

MIS
Jul 1, 2005
17
GB
Hi.

I've got a need to add via vba a line the width of each report in my db. I know the groupfooter I want to put it in, and have been using the following command to insert the line.

Set ctlNewLine = CreateReportControl(rpt.Name, acLine, acGroupLevel1Footer, "", "", 0, 0, 9000)

The only problem is that it isn't adding the line to the right section. For some reason I can't fathom, I cannot get the line in the right section. Now my report is grouped on three fields, FC, BG, and MG. FC footer is GroupFooter2, BG is GroupFooter1 and MG is groupFooter0. It is Groupfooter0 I wish to add the line to.

Using the acGrouplevel1Footer, i can add a line into FC.

acGroupLevel0Footer adds to Detail.
acGroupLevel2 adds to BG.

Ah says I, 3 must be the charm. Nope, adds to Detail. What am I doing wrong??

Please please help. I have around 60 reports, which I don't fancy adding manually, and I don't have time to start a complete rework.

Gavin
 
How about 10?
[tt]Set ctlNewLine = CreateReportControl(rpt.Name, acLine, 10, "", "", 0, 0, 9000, 0)[/tt]
 
Nope, that goes into FC. [sad]


However, it works fine with 5 instead of 10. Don't ask me why, but it does.

Cheers, if it wasn't for you pointing me in that direction, i would have never spotted it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top