Hiding Non-Value SubReport

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report which contains a subreport. The report is grouped by Student
ID, and I have the subreport in the Student ID header section. Sometimes,
there are no activities for that student. In that situation, the subreport
section is blank but the header of the subreport is showing.

What I like to do is , I don't like to show blank (reclaim the space) and
the header of the subreport. Is it possible?

Thanks.
 
In the OnFormat event of the section where the sub report is located, you can
add the code to check if the sub report has data, and if it doesn't make it
not visible

If Me.[SubReportName].Report.HasData = True Then
Me.[SubReportName].Visible = True
Else
Me.[SubReportName].Visible = False
End If
 
Hi Ofer,

Thanks for your help. It works as far as the subreport header and the
subreport are invisible, but the subreport section is now a blank. Is there
a way to shrink the area (instead of showing blank) in addition to being
invisible?

For example, I have the Student ID and the subreport in the Student ID
Header section. Then in the Detail section, I have other transactions for
that Student ID. What happen is, when I don't have the info in the
subreport, the subreport is invisible, but there is a blank area (about an
inch) between the Student ID and the details.

Thanks.

Ofer said:
In the OnFormat event of the section where the sub report is located, you can
add the code to check if the sub report has data, and if it doesn't make it
not visible

If Me.[SubReportName].Report.HasData = True Then
Me.[SubReportName].Visible = True
Else
Me.[SubReportName].Visible = False
End If

--
\\// Live Long and Prosper \\//
BS"D


AccessHelp said:
I have a report which contains a subreport. The report is grouped by Student
ID, and I have the subreport in the Student ID header section. Sometimes,
there are no activities for that student. In that situation, the subreport
section is blank but the header of the subreport is showing.

What I like to do is , I don't like to show blank (reclaim the space) and
the header of the subreport. Is it possible?

Thanks.
 
Try and set the can shrink property of the Sub report and the section where
the sub reported located in to Yes

--
\\// Live Long and Prosper \\//
BS"D


AccessHelp said:
Hi Ofer,

Thanks for your help. It works as far as the subreport header and the
subreport are invisible, but the subreport section is now a blank. Is there
a way to shrink the area (instead of showing blank) in addition to being
invisible?

For example, I have the Student ID and the subreport in the Student ID
Header section. Then in the Detail section, I have other transactions for
that Student ID. What happen is, when I don't have the info in the
subreport, the subreport is invisible, but there is a blank area (about an
inch) between the Student ID and the details.

Thanks.

Ofer said:
In the OnFormat event of the section where the sub report is located, you can
add the code to check if the sub report has data, and if it doesn't make it
not visible

If Me.[SubReportName].Report.HasData = True Then
Me.[SubReportName].Visible = True
Else
Me.[SubReportName].Visible = False
End If

--
\\// Live Long and Prosper \\//
BS"D


AccessHelp said:
I have a report which contains a subreport. The report is grouped by Student
ID, and I have the subreport in the Student ID header section. Sometimes,
there are no activities for that student. In that situation, the subreport
section is blank but the header of the subreport is showing.

What I like to do is , I don't like to show blank (reclaim the space) and
the header of the subreport. Is it possible?

Thanks.
 
I just tried the Shrink property, and it didn't work. It still shows a blank.

Can I ask you one more question? I have a report which groups by Student
Group. In the Student Group header, I have a subreport in addition to the
Student Group name. I connect the main report and the subreport with Student
Group and Student ID (Masters and Childs). On the main report, I have a
parameter set, so that I can get the data either by Student Group or Student
ID. When I just type in a Student Group in the parameter, the detail section
in the main report would show everything, but the subreport doesn't not show
anything. When I just type in a Student ID in the parameter, both the main
report and the subreport show the data.

If I just join the reports by Student Group and when I type in a Student
Group, both the main report and the subreport would show everything. On the
other hand, when I type in a Student ID, the main report just show the data
for that Student ID and the subreport would show all the data of all the
student ID for that student group.

What do I need to do to show just the data for that Student ID in both
sections when I type in a Student ID, and the data for that Student Group in
both sections when I type in a Student Group?

Thanks.

Ofer said:
Try and set the can shrink property of the Sub report and the section where
the sub reported located in to Yes

--
\\// Live Long and Prosper \\//
BS"D


AccessHelp said:
Hi Ofer,

Thanks for your help. It works as far as the subreport header and the
subreport are invisible, but the subreport section is now a blank. Is there
a way to shrink the area (instead of showing blank) in addition to being
invisible?

For example, I have the Student ID and the subreport in the Student ID
Header section. Then in the Detail section, I have other transactions for
that Student ID. What happen is, when I don't have the info in the
subreport, the subreport is invisible, but there is a blank area (about an
inch) between the Student ID and the details.

Thanks.

Ofer said:
In the OnFormat event of the section where the sub report is located, you can
add the code to check if the sub report has data, and if it doesn't make it
not visible

If Me.[SubReportName].Report.HasData = True Then
Me.[SubReportName].Visible = True
Else
Me.[SubReportName].Visible = False
End If

--
\\// Live Long and Prosper \\//
BS"D


:

I have a report which contains a subreport. The report is grouped by Student
ID, and I have the subreport in the Student ID header section. Sometimes,
there are no activities for that student. In that situation, the subreport
section is blank but the header of the subreport is showing.

What I like to do is , I don't like to show blank (reclaim the space) and
the header of the subreport. Is it possible?

Thanks.
 
Back
Top