Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 21st, 2005, 10:43 AM
bwu bwu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 1 bwu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 6 sec
Reputation Power: 0
Unhappy MS Access Report Problem

My query currently looks like this

Year Value1 Value2 Value 3
2001 8.0 7.3 5.7
2002 3.4 4.9 5.3
2003 8.5 7.4 4.5

When I'm generating my report however, I want the year to accross the top of the page, so I can look at the trend of Value1 over the course of several years.

For example:
Year 2001 2002 2003
Value1 8.0 3.4 8.5
Value2 7.3 4.9 7.4
Value3 5.7 5.3 4.5

I used a "Columnar" layout, and got the values to line up along the left side. The result was:

Year 2001
Value1 8.0
Value2 7.3
Value3 5.7

Year 2002
Value1 3.4
Value2 4.9
Value3 5.3

Year 2003
Value1 8.5
Value2 7.4
Value3 4.5

I also tried the "tabular" layout, and it wouldn't work because I had too many fields. (I have Value1, Value2, ...through Value80+)

However, when I export to excel, and copy/paste transpose, then import it back into access, the "columnar" layout works great!

So I need help with either transposing a query in access, or writing some sort of automated macro to export to excel, transpose, re-import, and create the report. (The only problem is that it has to be flexible, because the number of years will change as more data is added).

Any thoughts? Ideas? Thanks!!

Reply With Quote
  #2  
Old June 29th, 2005, 07:30 AM
snipered's Avatar
snipered snipered is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2005
Location: Birmingham, England
Posts: 909 snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 20 h 48 m 50 sec
Reputation Power: 11
My best bet would be just to export to excel.

I have done this. Even if there are more rows in one report than the next, it still works great. I even added sums, using absolute referencing.

I will find the code and post it. You can then manipulate it to how you want.

Reply With Quote
  #3  
Old June 29th, 2005, 07:33 AM
snipered's Avatar
snipered snipered is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Jan 2005
Location: Birmingham, England
Posts: 909 snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level)snipered User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 20 h 48 m 50 sec
Reputation Power: 11
Unfortunatley, the code is at work. I am going on Holiday today so i won't be able to post it until i get back which is on the 11th July and i think a little too late for you.

Your best bet is go to planetsourcecode.com and type in excel and choose vb.

Sorry.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > MS Access Report Problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT