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!

SUBREPORT DOESN´T SHOW CORRECTLY

Status
Not open for further replies.

franksirvent

Programmer
Mar 8, 2002
358
GB
Hi there

I have a report with a subreport (called HEADER).
In only what the HEADER to be displayed on the first page, so I have put the following code on the Report_Page()

If Me.Page = "1" Then Header.Visible = True Else Header.Visible = false

On the preview it shoes perfectly, however when it prints it doesn´t display the header...

I have to say than on the report_open() I have header.visible=true

that's that have anything to do with it ???

How would I tell the report to display the HEADER ONLY on PAGE 1 ???

Your help is appreciated
 
Frank,

Put a report header and footer on the report, then put it in the report header, so it will only appear on the first page.

John
 
thanks for your input but that will not work on this case...

If I put it on the report header, it will display the HEADER on the first page, HOWEVER the header is only about 20% of the page, I don´t want the rest of the page to be blank...there is more text which follows just below the HEADER...

 
Have you tried setting the Can Shrink property of the report header to true? (the default is false)

John
 
Frank,

Try putting your code in the On Format event of the section where your subreport resides.

Let me know if this is what you're looking for.....
 
thanks for input CosmoKramer but it doesn´t work.

It is very strange...on preview I see the report perfect, the HEADER subreport shows just like I want it but when I press the PRINT button what comes out is exactly the same as the preview EXCEPT the HEADER part...it dissapears..
 
Just for the heck of it, try printing the report directly (without previewing it first). Let me know what happens...
 
good thinking
I have printed directly (no preview first) and it prints WITHOUT the HEADER section.

I put it back to preview first and it shows correctly, HEADER is shown on the preview.

Weird...
 
Frank,

Could you send me a zipped copy of this db to look at?

I'll post back here with what I find...

sw3540@yahoo.com
 
I really wouldn't mind send you the .mdb but is is 25Mb (is in development form, so there are many things which I haven´t taken out)
I can send you perhaps the Report part, although I am not sure if that would help you...let me know
 
Could you create a copy that only has the affected report / queries / tables ??
 
thanks for your help CosmoKramer but it will take me hours to do what you want...
The application is quite vast, over 25 linked tables, forms etc etc. Also it has a quite complicated set up (for server and stand alone PC) which means it will take me hours to make it work with just a few forms...
Don´t worry, I very much appreciate your help but I will find a different way of achieving what I need (if there is one!) as it appears I might have complicated things doing it the way I have.

Thanks again
 
No problem...I just thought maybe another set of eyes [3eyes] might help...

I tried testing this here and I got it to work OK. If I can come up with something else to try, I will post back.
 
thanks fopr your efforts CosmoKramer.
I agree another pair of eyes are better than one, however it would have been impossible to break down the database...it would be a nightmare trying to do so...

I´ve noticed once thing...the preview page shows at the bottom PAGE 1 of 3 HOWEVER when it prints it is only 2 pages and shows PAGE 1 OF 2.

My question here is:
DOES PREVIEW AND PRINT RUN TOTALLY INDEPENDENTLY? IN OTHER WORDS, IF YOU PREVIEW THE REPORT, THE CODE RUNS ONCE, THEN WHEN YOU PRESS THE PRINT BUTTON DOES THE CODE RUN AGAIN?

I am wondering if this is the problem...
 
Yes it does, that's why I asked you to try printing the report directly....
 
ok, thanks for replying

NOw that I know preview and print run separately, obviously there must be somthing that triggers the report to print without the HEADER.

Thanks for input, I will advice if I manage to get it to work for future generations to know how to solve the problem!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top