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 header problem

Status
Not open for further replies.

asterix62

Programmer
Aug 19, 2005
7
CA
I have header in Subreport which is the same as main report
I want supress subreport header and display it only when user click on subreport. I'm able to hide header when drilldowngrouplevel is = 0 but when user clicks on subreport , drilldownlevel is still= 0 and header is still not displayed, when levels rich 2 or 3 I have header. Or another way: May I see and navigate subreport without losing main report?
Thank you!
 
If your goal is to have only one page header visible, then it might be easier to use a boolean variable to suppress the main report page header when the subreport starts at the top of the page. Would that meet your needs?

-LB
 
Can you tell me how I can detect if subreport starts? This is my problem I do not know how to detect , where I'am :in main report or in subreport. I mean what is the function or what can tells me that I clicked on subreport? Thank you!
 
You can create two formulas:

//{@false}:
whileprintingrecords;
booleanvar flag := false;

//{@true}:
whileprintingrecords;
booleanvar flag := true;

Let's say that your subreport is in GF#1. Place {@false} in GH#1, and {@true} in GF#1. Then if you wanted to suppress the main report page header when the subreport started at the top of the page, you would go to the section expert->page header->suppress->x+2 and enter:

whileprintingrecords;
booleanvar flag;
flag = true //note that there is no colon here

-LB
 
Thank you! I will try on Monday at work. Another related question : When I click on subreport it opens on separate page I loose the view of main report . In order to see Main report I have to click on tab ios it possible to keep both reports on the same page? I mean when I click on subreport I want to see both on the same page not navigate from tab to tab? Thank you!
 
No, as far as I know, there isn't a way to drill down on the subreport and still view the main report simultaneously. You would have to design the report so that the subreport displays the detail you want without drilldown.

-LB
 
HMmm I tested at work , so does not help me your solution , sorry. When I clicked on subreport I have my subreport on separate tab I do not see the header of the main report so it is supressed ,as I may say ,by itself .I need to supress subreport header when I still did not click on subreport ;when I look on main report I see the subreport (it is not on demand) and I see the header of main report and subreport and I want to see subreport header only when I click on subreport
Thank you
 
My solution was not about conditionally suppressing the subreport page header, but instead, conditionally suppressing the main report page header. I understand what you are trying to do, but I don't think you will be able to distinguish between the subreport in preview and the subreport when clicked upon--they both represent the 0 drilldowngrouplevel. My solution would conditionally suppress the main report page headers on the pages where the subreport is executing. Since the headings are the same in the main report and the subreport, this should work. The subreport headers could then always display.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top