Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic report example help

Status
Not open for further replies.

frstwrldprblm

Programmer
Sep 8, 2009
12
US
Basically: I have weather data broken up by region, state and month
I want to make a grouped report in the following hierarchy/grouping
Region
-State (on the "Y axis")
-month on the "x axis")
And then weather filling inside
:: As in ::

New england
Aug Sep
NY. 10. 15
MA. 20. 30
Basically this demonstrates my end goal. I can perform this analog (clicking etc) but I want to automate this.
Any help would be great!
 
not really.

i'm very new to this. i basically just need to know how to navigate a report form and be able to print things in an algorithmic way.


as in
Cells(1,1)=1
cells(1,2)=2

this is for excel. is there a way to navigate the sheet and print things? that is basically what i want to do.
 
excel", "sheet", "cells"? Is this an Access or Excel question?

What do you mean by "navigate a report form"? Is this a report or form?

What do you mean by "algorithmic way"?

I still think the FAQ matches exactly with your initial posting.

Duane
Hook'D on Access
MS Access MVP
 
okay let me reword and stop trying to rush through.

basically, i need a way to create a parent child and fill based report as above.

basically:
header=region(1)
col(1)=month....col(n)=month
row(1)=city(1)

and then fill based off those selections. i'm just really unsure how to do this. i was looking for a VERY basic example but there doesn't seem to be one.

i am good with vba (or so i thought) but i just have zero experience with access
 
Again, is this Access or Excel?

You are basically describing an Access crosstab query which is similar to an Excel pivot table.

If you can't figure this out, please provide your table structure and sample records.

Duane
Hook'D on Access
MS Access MVP
 
this is access, sorry. the excel was to demonstrate my train of thought.

Region City Month Rain
NE Maine Jan 2
NE Maine Feb 4
NE Maine Mar 2
NE Maine Apr 5
NE Mass Jan 2
NE Mass Feb 4
NE Mass Mar 2
NE Mass Apr 5
SE Fla Jan 0
SE Fla Feb 8
SE Fla Mar 3
SE Fla Apr 0
 
You should be storing an actual date value or month number rather than "Jan" or "Apr". The text values have little utility when used in reports or queries.

Try create a crosstab query with SQL like:
Code:
TRANSFORM First(tblWeatherLog.Rain) AS FirstOfRain
SELECT tblWeatherLog.Region, tblWeatherLog.City
FROM tblWeatherLog
GROUP BY tblWeatherLog.Region, tblWeatherLog.City
ORDER BY tblWeatherLog.Region
PIVOT tblWeatherLog.Month In ("Jan","Feb","Mar","Apr");
Your records will result in:
[tt][COLOR=black gray]
Region City Jan Feb Mar Apr[/color]

NE Maine 2 4 2 5
NE Mass 2 4 2 5
SE Fla 0 8 3 0
[/tt]

Duane
Hook'D on Access
MS Access MVP
 
it isn't my data, just some sample data i am learning off of.

i understand what you are saying , but the data must be presented in the way listed above.

i basically just need to know how to print data into a report in a way that you can dictate where and how it prints.

that is my main issue.
 
The data from the crosstab can be layed out as you stated in your first posting. Create a sorting and grouping header on the Region and then place the other fields in your detail section. That's how reports work. You move around your labels and text boxes in the design view.

Do you expect greater control of positioning? This can be accomplished with code but you haven't provided a reason why my suggestion won't work.

Duane
Hook'D on Access
MS Access MVP
 
ahh, makes much more sense now.

one last question ( i swear this is the last question, because i can see very clearly now how to solve the problem).

how do i go about selecting a textbox, and then upon this, populating/changing/clearing the text currently present in the text box? thanks!
 
I wish I knew why/what you objective was. Report's are basically a static, published version of your data. Forms allow user interaction and dynamic controling of various properties.

Where would your values come from and why?

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top