How to prevent to print border on subreport?

S

Sunny

I have a report with subreport and it prints border which I dont want and
also it doesnt print subreport header. What could be the problem?

Thanks.
 
M

Marshall Barton

Sunny said:
I have a report with subreport and it prints border which I dont want and
also it doesnt print subreport header. What could be the problem?


Set the subreport **control's** BorderStyle to Transparent.

Which header? The report and any group headers should work
as expected.

If you're talking about the Page Header, then you need to be
aware that subreports do not have page related items/events
(e.g. the Page Header section is ignored). The main report
is in charge of that stuff.

Can you describe this part of your question in more detail?
 
S

Sunny

Thanks Marshall, It is Pageheader and I move that to Group header and it
works fine.

I also have another problem with referring subreport controls to calculate
other fields in subreport. When I try to refer control in Format section it
returns empty value. Any suggestion?

I have describe this problem in following thread of this group.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=#og4vpdQEHA.297
6%40TK2MSFTNGP10.phx.gbl&rnum=1&prev=/groups%3Fq%3Dgroup%2Bin%2Bsubreport%26
ie%3DUTF-8%26hl%3Den
 
M

Marshall Barton

Sunny said:
Thanks Marshall, It is Pageheader and I move that to Group header and it
works fine.

I also have another problem with referring subreport controls to calculate
other fields in subreport. When I try to refer control in Format section it
returns empty value. Any suggestion?


Which control? Are the other controls in the subreport or
the main report? How are you referring to them?
 
S

Sunny

On subreport, I have group by ItemNo and there is ItemNo text control on
Group header. Record source of the text control is Itemno which is one of
the field of subreport record source.
Now in groupheader format event I am trying to find opening balance with
OpenBal function and I am passing ItemNo as parameter. e.g nOpBal =
OpenBal(ItemNo), This ItemNo refers to empty.
 
M

Marshall Barton

Sunny said:
On subreport, I have group by ItemNo and there is ItemNo text control on
Group header. Record source of the text control is Itemno which is one of
the field of subreport record source.
Now in groupheader format event I am trying to find opening balance with
OpenBal function and I am passing ItemNo as parameter. e.g nOpBal =
OpenBal(ItemNo), This ItemNo refers to empty.


Probably a couple of issues going on here.

First, if you want to refer to a field in the report's
record source, you also need to use it in a detail section
control's ControlSource, either as a bound field or in an
expression. This somewhat annoying requirement is because
of an Access optimazation where reports (unlike forms) do
not waste time retrieving fields that it thinks are not
used.

Second, you must have some kind of typo somewhere. If the
text box was actually named ItemNo, the same as the field,
then your code would refer to the control without complaint.

The straightforward way to do all this is to refer to the
control containing the desired value and don't mess around
trying to refer directly to a field.
--
Marsh
MVP [MS Access]


 
S

Sunny

Thanks Marshall, control names are different than field names. Changed it
and works great.

Thanks.
Marshall Barton said:
Sunny said:
On subreport, I have group by ItemNo and there is ItemNo text control on
Group header. Record source of the text control is Itemno which is one of
the field of subreport record source.
Now in groupheader format event I am trying to find opening balance with
OpenBal function and I am passing ItemNo as parameter. e.g nOpBal =
OpenBal(ItemNo), This ItemNo refers to empty.


Probably a couple of issues going on here.

First, if you want to refer to a field in the report's
record source, you also need to use it in a detail section
control's ControlSource, either as a bound field or in an
expression. This somewhat annoying requirement is because
of an Access optimazation where reports (unlike forms) do
not waste time retrieving fields that it thinks are not
used.

Second, you must have some kind of typo somewhere. If the
text box was actually named ItemNo, the same as the field,
then your code would refer to the control without complaint.

The straightforward way to do all this is to refer to the
control containing the desired value and don't mess around
trying to refer directly to a field.
--
Marsh
MVP [MS Access]


section
it
 

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