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

Force Page Header to show in subreport 2

Status
Not open for further replies.

Celeste025

Technical User
Mar 6, 2003
73
US
I have a master report that has 4 subreports. I am having a problem getting the subreport page header to show when I run the master report. I have the header set to visible and Page Header set to yes in all places I can think of (both on the main report and subreport properties).
 
It should work if you can move it to the subreport's report header.
 
Thats where I had it in the first place, except if the report runs to the next page, it doesn't print on the second page and I need it to.
 
Thanks, I'll see what I can do with the article, although it says requires basic programming and well.. um.. haha I'll try anyway :)
 
I tried following the instructions in the article and kept getting the error that the macro didn't exist even though Im pretty sure I did exactly what it said to do.. Any advice for a non-programmer?

Thanks
 
Can you send me a zipped copy of your db?? I should have a chance this afternoon to look at it.....

sw3540@yahoo.com
 
Cosmo,

Thanks for the offer. I ended up finding out that Access doesn't print page headers of subreports so I just put the information in the main report's page header. It isn't optimal, but it works well enough for now.
 
Celeste,

You might want to try this if you get a chance:

Add an expression field to your query with a value of "1".

Add a group header to your subreport, grouping on that field you just added. Don't put that expression control in the header. If you already have a group header, move the new one to be first.

Move the controls you want to appear on each page to that group header.

Set the Repeat Section property of that group header to Yes.



 
Cosmo,

I completely didn't follow the above instructions. I was going to go ahead and just send the db to you, except that even compressed, its still 17 mb. I think it's so large because it's linked to a JD Edwards system. I can send a Word version of the report if that would help give you an idea of what Im working with.
 
No problem....


Add an expression field to your query with a value of "1". The purpose here is to artificially create a global group. All records would have a value of "1" in this field.

Add a group header to your subreport, grouping on that field you just added. Don't put that expression control in the header. If you already have a group header, move the new one to be first. Using that field you just added to the query, we want to create the "global" group.

Move the controls you want to appear on each page to that group header. Whatever you want to appear in the header at the top of each page, put it in this group header.

Set the Repeat Section property of that group header to Yes. By setting this property, the group header will be repeated at the top of each page, faking it out and appearing like a page header........
 
Ok, Im following the idea now.. we are creating a field that will be identical for all records to "sort" on in the subreport. What I don't understand is how to create an expression field in a query. I tried typing Expression in the field name of a new blank in design view and it converted it to "Expr1: [Expression]" and then I put 1 in the criteria. Then when I run the query it pop's up a box that says Expression and I have to enter 1. Is that what Im trying to do?
 
No, in the field row you could type:

Expr1: 1

with nothing in the criteria row. This will populate each row in your query with a field called "Expr1" with a value of 1.
 
Cosmo,

Once again, it works beautifully! Your help has been invaluable, thanks again. You must have the coolest job on earth - all the time to sit and answer questions on a forum for cluebies like me and accumulate hero worship :)

Celeste
 
Thanks for the accolades.....It may seem like I have a lot of free time, but I guess it's more a matter of utilizing the little free time I do have.

I enjoy scrolling through posts on Tek-tips because I can always pick up new tricks, ideas, shortcuts, etc., as well as occasionally pass on some experiences of my own.

There are a lot of talented people that subscribe here, and it as become an invaluable resource for me too!!
 
Thanks Cosmo, This was a Great Tip! I have run into this before but never knew how to get around it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top