Dynamic Report Fields

  • Thread starter Thread starter Bryan
  • Start date Start date
B

Bryan

Hello.

I have a problem which I'm unable to improve. I need to be
able to create a report based off a table every month.

1. The table each month can contain various columns
2. I have no control over the data
3. The data is broken into sections by a code

The current solution I have is for every column in my
table has a field on the report, table name 'Test', report
name 'txtTest' etc. The problem comes when more and more
fields are added to the table.

I've tried a number of solutions but none seem to work.
First of all I can't set the control source dynamically,
because of the Sub_Header (that sets the labels for each
code).

I've also tried to have aliases for all of my fields,
field1, field2 etc, but that doesn't work either.

Any ideas? I'm pulling my hair out here.

Thanks,
Bryan
 
I seem to remember seeing a similar or identical post sometime not too long
ago. Unless you clarify, there is just not enough detail here for a useful
response.

As I read it: you have a table whose design changes, or may change, each
month. You want a self-adjusting report to determine what is in the table
(Record Source) and re-create or modify itself to accommodate, in sections
"determined by a code".

Perhaps with some detail and description, someone could make some
suggestions. But as I read what you have written, I'd say, "Give thanks that
Access' Reporting is so user-friendly, because you have described something
best addressed by manually creating or modifying the existing report each
month."

I suspect the environment is not quite as unstructured as it seems to me
from reading your description, however, and look forward to seeing more
detail.

Larry Linson
Microsoft Access MVP
 
Hi,

Yes I did post this a few months back. I tried the
suggestions but none of them worked.

I have a master table I need to report off, tblMaster.
This contains many fields (which can change) for each
product code. Not all product codes have full information,
so for product code 1, we may have data in
column 'Size', 'Color', but for product code 2 we
have 'Weight' and 'Height'.

Currently the information on which product code has
certain fields is stored in another table, tblDriver.

My report currently has 150 hidden fields for each column
in tblMaster. The report has some code which determines
which columns to show, based of tblDriver.

The problem occurs when I have to create reports each
month and the fields have changed. This information is
stored in tblDriver, but it does mean that I either have
to add or remove the hidden fields on the report which can
take a while.

My ideal solution is that the report would run using the
driver without the need to name specific fields.

As each product code is broken out into a section of its
own via the sub header part of the report, I can
dynamically set the control source of the field.

I hope this is enough detail.

Thanks,
Bryan
 
Back
Top