subreport / Has no data

B

Brook

good day all,

I have a report with two subreports. I would like that if either of the
subreports have no data, then the subreport will not show up on the report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
D

Duane Hookom

Most of the time we get questions like this it is because someone WANTS a
subreport with no data to display. There isn't any method that I am aware of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")
 
B

Brook

Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no Data?

Brook

Duane Hookom said:
Most of the time we get questions like this it is because someone WANTS a
subreport with no data to display. There isn't any method that I am aware of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

Brook said:
good day all,

I have a report with two subreports. I would like that if either of the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
D

Duane Hookom

The subreport will not appear if the subreport returns no data. What are you
experiencing that differs from this?

--
Duane Hookom
MS Access MVP

Brook said:
Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no Data?

Brook

Duane Hookom said:
Most of the time we get questions like this it is because someone WANTS a
subreport with no data to display. There isn't any method that I am aware
of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a
control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

Brook said:
good day all,

I have a report with two subreports. I would like that if either of the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
B

Brook

I guess I was wanting no data, and no subreport headers/labels.

Brook

Duane Hookom said:
The subreport will not appear if the subreport returns no data. What are you
experiencing that differs from this?

--
Duane Hookom
MS Access MVP

Brook said:
Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no Data?

Brook

Duane Hookom said:
Most of the time we get questions like this it is because someone WANTS a
subreport with no data to display. There isn't any method that I am aware
of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a
control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

good day all,

I have a report with two subreports. I would like that if either of the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
D

Duane Hookom

Isn't that what you are getting now? Generally if there is no data in the
subreport, you won't see anything in the main report from the subreport.

--
Duane Hookom
MS Access MVP

Brook said:
I guess I was wanting no data, and no subreport headers/labels.

Brook

Duane Hookom said:
The subreport will not appear if the subreport returns no data. What are
you
experiencing that differs from this?

--
Duane Hookom
MS Access MVP

Brook said:
Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no Data?

Brook

:

Most of the time we get questions like this it is because someone
WANTS a
subreport with no data to display. There isn't any method that I am
aware
of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a
control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

good day all,

I have a report with two subreports. I would like that if either of
the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
B

Brook

No, and that is what i'm running into...

I there is no data, I'm still getting my Column headers, labels etc...

That is why i'm confused..

Brook

sorry if I didn't phrase things right in the first place..

let me know if there is anything that I can send you to look at..



Duane Hookom said:
Isn't that what you are getting now? Generally if there is no data in the
subreport, you won't see anything in the main report from the subreport.

--
Duane Hookom
MS Access MVP

Brook said:
I guess I was wanting no data, and no subreport headers/labels.

Brook

Duane Hookom said:
The subreport will not appear if the subreport returns no data. What are
you
experiencing that differs from this?

--
Duane Hookom
MS Access MVP

Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no Data?

Brook

:

Most of the time we get questions like this it is because someone
WANTS a
subreport with no data to display. There isn't any method that I am
aware
of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a
control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

good day all,

I have a report with two subreports. I would like that if either of
the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
D

Duane Hookom

What section of the subreport are you displaying in your main report when
the subreport has no data?
Try place a text box in your main report like:
=IIF(subrptName.Report.HasData,"Has Data", "No Data")

--
Duane Hookom
MS Access MVP

Brook said:
No, and that is what i'm running into...

I there is no data, I'm still getting my Column headers, labels etc...

That is why i'm confused..

Brook

sorry if I didn't phrase things right in the first place..

let me know if there is anything that I can send you to look at..



Duane Hookom said:
Isn't that what you are getting now? Generally if there is no data in the
subreport, you won't see anything in the main report from the subreport.

--
Duane Hookom
MS Access MVP

Brook said:
I guess I was wanting no data, and no subreport headers/labels.

Brook

:

The subreport will not appear if the subreport returns no data. What
are
you
experiencing that differs from this?

--
Duane Hookom
MS Access MVP

Hello and thanks for the response...

Is there a way for the subreport NOT to appear if it has no
Data?

Brook

:

Most of the time we get questions like this it is because someone
WANTS a
subreport with no data to display. There isn't any method that I am
aware
of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a
control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

good day all,

I have a report with two subreports. I would like that if either
of
the
subreports have no data, then the subreport will not show up on
the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 
B

Brook

Good DAy Duane,

Thanks for all your help, that work and I (with your help) was able to
figure it out..

Have a great day..

Brook

Duane Hookom said:
Most of the time we get questions like this it is because someone WANTS a
subreport with no data to display. There isn't any method that I am aware of
to make a subreport appear if it has no data.

If you need to determine if a subreport has no data, you can use a control
source in your main main report like:

=IIf(subrptctrl.Report.HasData,"Sub Has Data","No Sub Data")

--
Duane Hookom
MS Access MVP

Brook said:
good day all,

I have a report with two subreports. I would like that if either of the
subreports have no data, then the subreport will not show up on the
report?
HOw do I go about doing this?

I tried the following in the report header, but didn't work.

=IIf([HasData]=0, "No Data To Print","")

Thanks,

Brook
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top