Crosstab form?

  • Thread starter Thread starter JOHN SMITH
  • Start date Start date
J

JOHN SMITH

Hi,



I have create a crosstab query that will have a constant number of rows
(machine names) and will have an indeterminate number of columns (days),

could be 10,11,12, 9, 8 columns



I would like to show this data either on a form or report format.



Is there a way to add/eliminate fields on a form/report so that it will
match the number of columns on my table/query?

or another way to accomplish this?



Thank you all,



ciao
 
Decide on a number of columns and stick with it. Either that or make
separate forms/reports for each number of columns.

Then make your crosstab columns based on a "relative date" for instance
ColHead: "D" & DateDiff("d",[SaleDate], Date())
Set the Column Headings property to something like:
D0, D1, D2, D3,...D10
The D0 column will display today's values.
 
If John's data can fit on one page with 12 colums then I would say yes -
make one report with 12 colums and hide the others as needed.
But if you have to make multible reports, then you still can use the
same report. In a crosstab report I have done I take the column of were the
data starts (not counting the grouping for rows) and use that info to
populate the colunms on the report about 8 that are not row information then
for the next grouping I have a modifier that adds to this to tell where I
should start the next set of data.
I just have a form that gathers this information. No need to have
multiple reports.

If you have the Solutions database it has a good example of how to limit
the number of shown columns.

Craig Hornish
(e-mail address removed) - so I can delete it when it becomes a spam magnet

"Think outside the box, because anything is possible."
"How long it will take or whether it requires divine intervention is another
issue"

Duane Hookom said:
Decide on a number of columns and stick with it. Either that or make
separate forms/reports for each number of columns.

Then make your crosstab columns based on a "relative date" for instance
ColHead: "D" & DateDiff("d",[SaleDate], Date())
Set the Column Headings property to something like:
D0, D1, D2, D3,...D10
The D0 column will display today's values.

--
Duane Hookom
MS Access MVP


JOHN SMITH said:
Hi,



I have create a crosstab query that will have a constant number of rows
(machine names) and will have an indeterminate number of columns (days),

could be 10,11,12, 9, 8 columns



I would like to show this data either on a form or report format.



Is there a way to add/eliminate fields on a form/report so that it will
match the number of columns on my table/query?

or another way to accomplish this?



Thank you all,



ciao
 
The "Solutions.mdb" solution is horrible. There is a much better and
flexible solution for dynamic (any number of columns) crosstab reports at
http://www.invisibleinc.com/divFiles.cfm?divDivID=4. If John thinks he
really needs the flexibility of any number of columns (rarely necessary)
than I would recommend this solution. It allows any number of derived
columns from 2 to 100s. It is also much faster and requires less code than
the Solutions.mdb.

--
Duane Hookom
MS Access MVP


Craig Hornish said:
If John's data can fit on one page with 12 colums then I would say
yes - make one report with 12 colums and hide the others as needed.
But if you have to make multible reports, then you still can use the
same report. In a crosstab report I have done I take the column of were
the data starts (not counting the grouping for rows) and use that info to
populate the colunms on the report about 8 that are not row information
then for the next grouping I have a modifier that adds to this to tell
where I should start the next set of data.
I just have a form that gathers this information. No need to have
multiple reports.

If you have the Solutions database it has a good example of how to
limit the number of shown columns.

Craig Hornish
(e-mail address removed) - so I can delete it when it becomes a spam magnet

"Think outside the box, because anything is possible."
"How long it will take or whether it requires divine intervention is
another issue"

Duane Hookom said:
Decide on a number of columns and stick with it. Either that or make
separate forms/reports for each number of columns.

Then make your crosstab columns based on a "relative date" for instance
ColHead: "D" & DateDiff("d",[SaleDate], Date())
Set the Column Headings property to something like:
D0, D1, D2, D3,...D10
The D0 column will display today's values.

--
Duane Hookom
MS Access MVP


JOHN SMITH said:
Hi,



I have create a crosstab query that will have a constant number of rows
(machine names) and will have an indeterminate number of columns (days),

could be 10,11,12, 9, 8 columns



I would like to show this data either on a form or report format.



Is there a way to add/eliminate fields on a form/report so that it will
match the number of columns on my table/query?

or another way to accomplish this?



Thank you all,



ciao
 
Back
Top