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!

SubReport PageHeader

Status
Not open for further replies.

adasoft

Programmer
Jan 31, 2002
132
IN
Hi,
I have designed a Report with some subreports. When the subreport is printed in more than one pages it does not show the header. I tried this with the group based on a fake formula as expained in the crystal knowledge base to repeat subreport header. But this works only when the detail section is printed on multiple pages. In my case, the detail section is hidden. All the fields are placed in a group footer or report footer section. I want to show the header if any part of subreport is printed on a new page.

In the main report also I've the same problem. Mine is an Employee report. For all the employees I am listing some info in the detail section and their summary(formulas) in the group footer section. If the detail section is printed on a new page, the report shows the group header. But when the group footer is printed on a new page or repeated on a new page it does not show the header. How can I show the Header.

Ple....se Help

Thanx in advance

Adasoft
 
Let me tell you what I did yesterday
I was trying to display the sub report header by placing it in the Main report page header and suppressing according to the value of a shared variable. My sub report is placed in the group footer of the main report so there is no way to repeat the group header. I've used a formula field in the section containing the subreport to set a shared variable to some value when the page number is changed and the variable will be set again in the subreport according to the pagenumber changes(The whole thing is a little complex way). It shows the header correctly when the report starts printing from one page and ends up in another. But when the subreport is started on a new page, it suppresses the header. This can be solved if I could reflect the change in the shared variable(inside the subreport) immediately in the main report. Right now the value of the shared variable is returned to the main report only after the full subreport is printed.

Is there any method to return a variable from the subreport to the main report as soon as its value is modified?
 
In short, no, I'm afraid. Crystal doesn't process the main and subreport concurrently. It has to complete the subreport before it can return the value to the mainreport.

Can you tell me what method you're using for the fake page header, and the version of Crystal you're on. Because I get the main report page header fine on 8.5. You should be able to manipulate the main report page header to act as a subreport page header by inserting a page header section, and conditionally suppressing it with a booleanvar variable set to equal False. Then in the subreport section, create one formula setting the variable to True, and another formula in the group header of the subreports section setting it to False.

Additionally, the fake page header technique of creating a formula of whilereadingrecords; ' '; and grouping on it at the lowest level in the subreport should be okay. Is this the style that you're currently adopting to create the fakes?

Naith


 
Thank you for your responce.
Let me explain you my requirement. I've split one part of my report into three sections(three subreports). These subreports should have a common header. If everything appears on a same window then no problem, always the header of the first section will be visible. Now the problem arises when these sections are printed in multiple pages. Keep together option of the first subreport is turned on so this subreport will not span more than one pages. If the second or third subreport is printed in multiple pages I've to show the fake pageheader.
Your method does not work well in my case.

BTW I am using CR 8.5

Ragards
[gorgeous]
 
I just tested the the variables solution I mentioned in the 2nd paragraph of my previous post with a multi page sub. It fakes a page header exclusive to the subreport on every page that the subreport appears on.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top