Column headers in subreport

W

Wayne-I-M

Hi

We have a report with a subreport (set to 3 columns - accross then down).
This works fine. But, is it possible to get the column headers to duplicate
over each column. I cant just put 3 headers (sub) report header or the
report box will be too be to allow for the columns (within the main report).

I'm sure there must be a simple way of doing this ??

Something like this
H1 H1 H1
abc def ghi
abc def ghi
abc def ghi

(H1 - is the column header)


Many thanks
 
B

BruceM

It's hard to know what you mean by "the report box will be too be to allow
for the columns." For one thing there seems to be a typo; for another the
meaning of "report box" is not clear. Having said that, and assuming the
column header is a field name, could you place the headers on the main
report, maybe by using three unbound text boxes that reference a subform
text box that is bound to the field? It could be a hidden text box on the
subform.
 
W

Wayne-I-M

Hi Bruce

Thanks for answering - 1st (like it says) Me dispiace ma il mio Inglese fa
schiffo :)
- sorry but my English is crap :) (not sure if you're allowed to say that).

Anyway
It's hard to know what you mean by "the report box will be too be to allow
for the columns."
The subreport is sized so that it will fit (in one column) on the main
report. This means that, as the finished report has a subreport in 3 columns
the "box" size (thats the size of the detail section in design view) of the
subreport has to be small enough. Not sure if "box" is that right word - but
obviously not. Sorry.
For one thing there seems to be a typo;
Yes you're right - I do run me posts thought MS word in English to check
things but its not always right - my fault.

column header is a field name, could you place the headers on the main
report
I tried this it will not work as that would increase the size of the
subreport (header) so that it would not fit when forced into 3 columns.
It could be a hidden text box on the subform.
Same problem - By putting anything in the subreport that extends it more
than a 3rd of the width of the main report you will lose the ability to fit
the 3 columns.

It may not be possible - but I think there will be a very simple method that
I have not tried yet.

--
Wayne
Manchester, England.



BruceM said:
It's hard to know what you mean by "the report box will be too be to allow
for the columns." For one thing there seems to be a typo; for another the
meaning of "report box" is not clear. Having said that, and assuming the
column header is a field name, could you place the headers on the main
report, maybe by using three unbound text boxes that reference a subform
text box that is bound to the field? It could be a hidden text box on the
subform.
 
B

BruceM

Wayne-I-M said:
Hi Bruce

Thanks for answering - 1st (like it says) Me dispiace ma il mio Inglese fa
schiffo :)
- sorry but my English is crap :) (not sure if you're allowed to say
that).

Anyway

The subreport is sized so that it will fit (in one column) on the main
report. This means that, as the finished report has a subreport in 3
columns
the "box" size (thats the size of the detail section in design view) of
the
subreport has to be small enough. Not sure if "box" is that right word -
but
obviously not. Sorry.

I'm still not following you. I think when you say "box" you are talking
about the subreport control, which is indeed a sort of box on the main
report that holds the subreport. If you click on the edge of it, then click
View >> Properties the Property Sheet will say something like
Subform/Subreport. However, I don't understand what you mean when you say
the subreport is sized so that it will fit in one column on the main report,
but at the same time it is three columns wide.
Yes you're right - I do run me posts thought MS word in English to check
things but its not always right - my fault.


I tried this it will not work as that would increase the size of the
subreport (header) so that it would not fit when forced into 3 columns.

I'm talking about putting text boxes on the main form. This will not affect
the size of the subform. The control source for these text boxes could be
something like:
=Forms!MainFormName!SubformControlName.Form!txtHidden
You could also assign this value using VBA in the subreport's Print event (I
think).
Same problem - By putting anything in the subreport that extends it more
than a 3rd of the width of the main report you will lose the ability to
fit
the 3 columns.

The hidden text box could be very small.
It may not be possible - but I think there will be a very simple method
that
I have not tried yet.
 
W

Wayne-I-M

Brilliant - many thanks
I'm talking about putting text boxes on the main form. This will not affect
the size of the subform. The control source for these text boxes could be
something like:
=Forms!MainFormName!SubformControlName.Form!txtHidden
You could also assign this value using VBA in the subreport's Print event (I
think).

That works

Thank you - been trying for ages to get it to work
 
W

Wayne-I-M

I have used -

if subform coloum count = # hidden box . visible (which works fine)

well actually used the record count on the subform - as the page length will
accept # records - so the IIF will work

Many thanks
 

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