General discussion

Locked

Access97 Report & SQL select statement

By cmtaz ·
I have a report that when it opens it gets the data based on a SQL Statement. I allow the user to set the parameters that are updated to the query each time they call the report via a cmdButton. Here's the problem, I have 15 row headers with 3 columns of data. Each dataset is based on a different timeframe.

For Example:
Jan '02 Feb '02 Mar '02
Grp A 10 15 20
Grp B 15 20 25
Grp C 20 25 30

I have triedusing labels in the Report Open code but I end up getting the last record although I have the looping to go through each 15 records. Do I need to place 15 labels or am I just missing something in the logic?

Thx for any help you can provide.

CLM

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access97 Report & SQL select statement

by Bob Sellman In reply to Access97 Report & SQL sel ...

You haven't said what your source data looks like. I assume that there is a date field and the user would enter on the form the starting and ending dates of the period of interest, then click on the button to run the report.

Note: If your sourcedata does not have a date field, then you have a problem, since the text (like the text in the sample you listed) does not sort properly.

If the controls on your form are txtStart and txtEnd, you could either base the report on a query that wouldinclude the criteria for the date field as between txtStart and txtEnd (you can let the query builder build the correct syntax to refer to your form).

What is the report based on? A select query or a cross-tab query? What are the columns on thereport? (Example: Division, Group, month1, month2, month3, (through month12), total) If the month headings can change (like a running 12 month report), then producing the report can be tricky, but possible with unbound controls and a separate grouping query to get the date range. I've done this and it's possible, but a pain to create.

Collapse -

Access97 Report & SQL select statement

by cmtaz In reply to Access97 Report & SQL sel ...

Poster rated this answer

Collapse -

Access97 Report & SQL select statement

by cmtaz In reply to Access97 Report & SQL sel ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums