If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
report footer pushed to its own page
Karen wrote:
I THINK I GOT IT!!! Great! I was worried that it might be a long painful process from your previous post to the real code. I found the VBA help and read somthing - I changed all my report names to Me, and it looks like it worked. I can't say this enough: VBA Help is your friend. You can get to a topic by just typing or double clicking a word you don't understand and then hitting the F1 key. I learned a lot by going through Help's table of contents as if I was reading a book and following its examples. You are one smart Cookie! You probably say that to all the guys ;-) Good luck on the "next" problem, and come on back whenever you have more questions. -- Marsh MVP [MS Access] |
#12
|
|||
|
|||
report footer pushed to its own page
Oh, Sir, I only compliment the ones who really deserve it!
New problem: remember when I mentioned that this report that I've been working on is to be used as a subreport? Well, the coding doesn't work when this subreport is inserted into the main report. Also: I tried using the same code in the main report with the names changed accordingly, and Section(5) for my group header changed to Section(4) for the main report page footer. I then get a run-time error: #2428 - "You entered an invalid argument in a domain aggregate function." I made sure to set up the main report just like the sub, and have checked the names. I didn't make any changes to the expressions. Any ideas? It's getting late here, so I may not read your answer till after the weekend. In that case, have a good one! Karen "Marshall Barton" wrote: Karen wrote: I THINK I GOT IT!!! Great! I was worried that it might be a long painful process from your previous post to the real code. I found the VBA help and read somthing - I changed all my report names to Me, and it looks like it worked. I can't say this enough: VBA Help is your friend. You can get to a topic by just typing or double clicking a word you don't understand and then hitting the F1 key. I learned a lot by going through Help's table of contents as if I was reading a book and following its examples. You are one smart Cookie! You probably say that to all the guys ;-) Good luck on the "next" problem, and come on back whenever you have more questions. -- Marsh MVP [MS Access] |
#13
|
|||
|
|||
report footer pushed to its own page
Karen wrote:
Oh, Sir, I only compliment the ones who really deserve it! ;-) New problem: remember when I mentioned that this report that I've been working on is to be used as a subreport? No, I didn't see anything about a subreport. Well, the coding doesn't work when this subreport is inserted into the main report. This is a complete roadblock because the page header/footer, page break controls and the page event are ignored in subreports. Also: I tried using the same code in the main report with the names changed accordingly, and Section(5) for my group header changed to Section(4) for the main report page footer. I then get a run-time error: #2428 - "You entered an invalid argument in a domain aggregate function." Nothing we were working on has anything to do with domain aggregate functions so something else must be going on. I made sure to set up the main report just like the sub, and have checked the names. I didn't make any changes to the expressions. Maybe you can get a little help from Access by compiling the modules and fixing anything that generates an error message. (Use the Debug - Compile menu item.) -- Marsh MVP [MS Access] |
#14
|
|||
|
|||
report footer pushed to its own page
Hi, Marsh
Did you have a nice Easter? It was rainy, cool, & windy in my area. Couldn't take the dogs to the Dog Park - didn't want Mud Puppies! I'm working on applying the "lonely report footer" problem to my Main Report. I've gotten the "TextTotalLines" in the report header figured out so that it counts the total number of records (equal to 24 at the moment) in my subreports (of which there are 4), but not the "TextLineNum" in the Detail section (getting the main report to know what record it is currently working with; i.e., if it's working with record 12 of 24, 9 of 24, etc.). The hidden text box with control source set to =1 and running sum set to Over All. On Friday I was getting a compile error relating to domain aggregate, but getting the header count (total number of records) figured out took care of that. Now I'm getting runtime error 13 - type mismatch. This might be solved once I can get the Detail to know which record it is currently on. Any suggestions? I've been looking around in this Discussion area and haven't found it. "Marshall Barton" wrote: Karen wrote: Oh, Sir, I only compliment the ones who really deserve it! ;-) New problem: remember when I mentioned that this report that I've been working on is to be used as a subreport? No, I didn't see anything about a subreport. Well, the coding doesn't work when this subreport is inserted into the main report. This is a complete roadblock because the page header/footer, page break controls and the page event are ignored in subreports. Also: I tried using the same code in the main report with the names changed accordingly, and Section(5) for my group header changed to Section(4) for the main report page footer. I then get a run-time error: #2428 - "You entered an invalid argument in a domain aggregate function." Nothing we were working on has anything to do with domain aggregate functions so something else must be going on. I made sure to set up the main report just like the sub, and have checked the names. I didn't make any changes to the expressions. Maybe you can get a little help from Access by compiling the modules and fixing anything that generates an error message. (Use the Debug - Compile menu item.) -- Marsh MVP [MS Access] |
#15
|
|||
|
|||
report footer pushed to its own page
Karen wrote:
Did you have a nice Easter? It was rainy, cool, & windy in my area. Couldn't take the dogs to the Dog Park - didn't want Mud Puppies! Yes it was a noce Easter. Most of my back yard (~60x120 ft) is covered in playground wood chips just to avoid the mud issue when exercising the dogs. The frisbee action can get a little tricky as they dodge over and around all the agility equipment. I'm working on applying the "lonely report footer" problem to my Main Report. I've gotten the "TextTotalLines" in the report header figured out so that it counts the total number of records (equal to 24 at the moment) in my subreports (of which there are 4), but not the "TextLineNum" in the Detail section (getting the main report to know what record it is currently working with; i.e., if it's working with record 12 of 24, 9 of 24, etc.). The hidden text box with control source set to =1 and running sum set to Over All. I have no idea how you can deal with your subreport footer issue by doing anything in the main report. On Friday I was getting a compile error relating to domain aggregate, but getting the header count (total number of records) figured out took care of that. Now I'm getting runtime error 13 - type mismatch. This might be solved once I can get the Detail to know which record it is currently on. You completely lost me here, -- Marsh MVP [MS Access] "Marshall Barton" wrote: Karen wrote: New problem: remember when I mentioned that this report that I've been working on is to be used as a subreport? No, I didn't see anything about a subreport. Well, the coding doesn't work when this subreport is inserted into the main report. This is a complete roadblock because the page header/footer, page break controls and the page event are ignored in subreports. |
#16
|
|||
|
|||
report footer pushed to its own page
OK, I lost you.
I'm trying to get the Report Footer to have at least one detail record showing on the page on which it prints (preventing the lonely footer). Same situation as we were working on last week, EXCEPT I'm now working with a Main Report that contains four subreports. The coding that worked for a single report (no subs) uses "=Count(*)" (hidden text box) in the report header, which tells us how many records are in the detail section. We then use another hidden text box in the detail section to tell us which record we are currently dealing with. The coding for the Detail - Format event then checks to see if we are at the final record, then checks the paper size, etc., and inserts the page break before that last record so the footer will not end up by itself. "=Count(*)" in the Main Report Header section doesn't work if there are multiple subreports. But I did build an expression that results in the total number of records from all the subreports, but I haven't been able to discover the expression needed in the Detail section that determines what record is being dealt with. Any ideas? I'm also wondering if the calculations of Me.Top + page size and margins and so forth will work in this particular case. I hope I explained this a LITTLE better. Thanks! Karen "Marshall Barton" wrote: getting the header count (total number of records) figured out took care of that. Now I'm getting runtime error 13 - type mismatch. This might be solved once I can get the Detail to know which record it is currently on. You completely lost me here, -- |
#17
|
|||
|
|||
report footer pushed to its own page
Karen wrote:
I'm trying to get the Report Footer to have at least one detail record showing on the page on which it prints (preventing the lonely footer). Same situation as we were working on last week, EXCEPT I'm now working with a Main Report that contains four subreports. Which report footer, the main report's or one of the subreport's? The coding that worked for a single report (no subs) uses "=Count(*)" (hidden text box) in the report header, which tells us how many records are in the detail section. We then use another hidden text box in the detail section to tell us which record we are currently dealing with. The coding for the Detail - Format event then checks to see if we are at the final record, then checks the paper size, etc., and inserts the page break before that last record so the footer will not end up by itself. "=Count(*)" in the Main Report Header section doesn't work if there are multiple subreports. But I did build an expression that results in the total number of records from all the subreports, but I haven't been able to discover the expression needed in the Detail section that determines what record is being dealt with. Any ideas? In a report header, =Count(*) counts the detail records in the same report. It has no knowledge of anything going on in any subreport. Using a RunningSum text box in a report's detail section numbers the details in that same report. It too has no idea of anything in any subreports. I'm also wondering if the calculations of Me.Top + page size and margins and so forth will work in this particular case. Well, they work, but since I am not clear on whether you are trying to do lonesome footer for the main report or one of the subreports, I can't say if can do what you want. Don't forget what I said about none of that doing any good if either the detail or footer sections can grow. If you try to do this in the main report, there is no way to influence a subreport so that's out. OTOH, if the main report is trying to do this to itself, the subreports most likely will grow so, as far I know, that's a useless exercise too. -- Marsh MVP [MS Access] "Marshall Barton" wrote: getting the header count (total number of records) figured out took care of that. Now I'm getting runtime error 13 - type mismatch. This might be solved once I can get the Detail to know which record it is currently on. You completely lost me here, -- |
|
Thread Tools | |
Display Modes | |
|
|