column view in reportfooter subreport

C

CenoFaag

Hello,

Using Access 2003, WinXP I have a problem with showing the columns in a
subreport. The main report has a page setup of two columns. The subreport in
the reportfooter of the mainreport has a page setup of three columns. There
is no problem showing the columns in the subreport in the left-to-right
mode. But I don't manage to show them in the top-down mode; this results in
one column showing all the data, indeed top-down, but no columns.
If I disable the subreportproperty CanGrow then preview-mode
(print-example?) will show three columns, but just as far as the
reportfooter design-frame has been set. After trying all the combinations of
NewPage/NewRow or Column in reportfooter and CanGrow/Can Shrink in the
subreport I think the problem lays elsewhere.
Can somebody help me out?
Anton
 
M

Marshall Barton

CenoFaag said:
Using Access 2003, WinXP I have a problem with showing the columns in a
subreport. The main report has a page setup of two columns. The subreport in
the reportfooter of the mainreport has a page setup of three columns. There
is no problem showing the columns in the subreport in the left-to-right
mode. But I don't manage to show them in the top-down mode; this results in
one column showing all the data, indeed top-down, but no columns.
If I disable the subreportproperty CanGrow then preview-mode
(print-example?) will show three columns, but just as far as the
reportfooter design-frame has been set. After trying all the combinations of
NewPage/NewRow or Column in reportfooter and CanGrow/Can Shrink in the
subreport I think the problem lays elsewhere.


The reason that none of those attempts has a useful effect
is because can grow subreport's MUST use Across then Down.
The reason for that is that the main report "manages" the
pages and the subreport has no control over them (to the
extent that a subreport's page header/footer sections and
Page event are not used).
 
M

Marshall Barton

CenoFaag said:
Using Access 2003, WinXP I have a problem with showing the columns in a
subreport. The main report has a page setup of two columns. The subreport in
the reportfooter of the mainreport has a page setup of three columns. There
is no problem showing the columns in the subreport in the left-to-right
mode. But I don't manage to show them in the top-down mode; this results in
one column showing all the data, indeed top-down, but no columns.
If I disable the subreportproperty CanGrow then preview-mode
(print-example?) will show three columns, but just as far as the
reportfooter design-frame has been set. After trying all the combinations of
NewPage/NewRow or Column in reportfooter and CanGrow/Can Shrink in the
subreport I think the problem lays elsewhere.


The reason that none of those attempts has a useful effect
is because can grow subreport's MUST use Across then Down.
The reason for that is that the main report "manages" the
pages and the subreport has no control over them (to the
extent that a subreport's page header/footer sections and
Page event are not used).
 
C

CenoFaag

Thank you for your clear answer.
Nevertheless a Down ordering in the subreport is far more easy to read,
because it shows an alphabeticly ordered list.With three columns it takes 10
pages.
I was nicely surprised then the three columns did show up, instead of the
two I had expected, because of the main report manages all the reportpages.
So only if the CanGrow property of the subreport is disabled the total
report can take over the pagesetup of the subreport, else it use Acros
Can Down be forced with a statement in the detail_Format /detail_print /
event of the subreport or do I need to seperate the subreport from the
mainreport and link them in another way?
 
C

CenoFaag

Thank you for your clear answer.
Nevertheless a Down ordering in the subreport is far more easy to read,
because it shows an alphabeticly ordered list.With three columns it takes 10
pages.
I was nicely surprised then the three columns did show up, instead of the
two I had expected, because of the main report manages all the reportpages.
So only if the CanGrow property of the subreport is disabled the total
report can take over the pagesetup of the subreport, else it use Acros
Can Down be forced with a statement in the detail_Format /detail_print /
event of the subreport or do I need to seperate the subreport from the
mainreport and link them in another way?
 
M

Marshall Barton

This gets more than a little messy, but you can get the
appearance you want. Try the simplest of the two ways I am
aware of by using two instances, side by side, of a single
column subreport. The subreport's record source query needs
to have a calculated field that can be used to determine
which subreport (column) should display each record. The
calculated field uses subqueries like:

SELECT T.*, 2 * (SELECT Count(*)
FROM table As X
WHERE X.sortfield < T.sortfield)
\ (SELECT Count(*) FROM table) As ColNum
FROM table As T

Then add two hidden text boxes (named txtLeft and txtRight)
to the main report, one with the expression =0 and the other
with =1. Use txtLeft in the LinkMaster property of the left
subreport and ColNum in the corresponding position in the
LinkChild property. Similarly for the right subreport using
txtRight.
 
M

Marshall Barton

This gets more than a little messy, but you can get the
appearance you want. Try the simplest of the two ways I am
aware of by using two instances, side by side, of a single
column subreport. The subreport's record source query needs
to have a calculated field that can be used to determine
which subreport (column) should display each record. The
calculated field uses subqueries like:

SELECT T.*, 2 * (SELECT Count(*)
FROM table As X
WHERE X.sortfield < T.sortfield)
\ (SELECT Count(*) FROM table) As ColNum
FROM table As T

Then add two hidden text boxes (named txtLeft and txtRight)
to the main report, one with the expression =0 and the other
with =1. Use txtLeft in the LinkMaster property of the left
subreport and ColNum in the corresponding position in the
LinkChild property. Similarly for the right subreport using
txtRight.
 

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