473,418 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

How to transfer report data to excel

I have seven queries that I want to output totals into one excel spreadsheet. The queries have different criteria so cannot be combined. All queries outcomes have the same three basic titles (for example, Number of items, $ Amount of items, and $ Amount Commission).

I created a report to show all queries using subreports and my outcome looks just how I want it. When I exported the report to excel, it changed the format, yet when I exported to word, it appears just as the report looks. Is there something that I need to do to correct this?

I need my outcome to be in Excel because it is needed for the person requesting data.
Aug 28 '07 #1
3 3098
Jim Doherty
897 Expert 512MB
I have seven queries that I want to output totals into one excel spreadsheet. The queries have different criteria so cannot be combined. All queries outcomes have the same three basic titles (for example, Number of items, $ Amount of items, and $ Amount Commission).

I created a report to show all queries using subreports and my outcome looks just how I want it. When I exported the report to excel, it changed the format, yet when I exported to word, it appears just as the report looks. Is there something that I need to do to correct this?

I need my outcome to be in Excel because it is needed for the person requesting data.
You cannot easily output to excel a report with a number of subreports to give you a two dimensional matrix in the manner I think your suggesting. If I were you I would simply make a table insert the result sets of each query into it and output that table it would be much simpler.
Each of your queries have different parameters but the field names are the same presumably.. so if you ran inserts based on the queries you would be asked for the parameters for each one in order to populate the table

Hope this maks sense to you

Regards

Jim
Aug 28 '07 #2
Jim,

I don't quite understand about creating the table. Do I have the queries make-tables? But how do combine all tables? I've tried to do append tables with the queries which kinda' works, but it doesn't distinguish between the queries. Ultimatly, I want my outcome to look like this format:
# Number of items #####
$ Amount of items $$$$$$
$ Amount Commission $$$$$$

When I export to excel, I get this outcome:
# Number of items $ Amount of items $ Amount Commission
###### $$$$$$ $$$$$

I don't want the second format because there are about seven items that go with different criteria (for example: New Business, Renewals, Cancels, etc).
Aug 28 '07 #3
Jim Doherty
897 Expert 512MB
Jim,

I don't quite understand about creating the table. Do I have the queries make-tables? But how do combine all tables? I've tried to do append tables with the queries which kinda' works, but it doesn't distinguish between the queries. Ultimatly, I want my outcome to look like this format:
# Number of items #####
$ Amount of items $$$$$$
$ Amount Commission $$$$$$

When I export to excel, I get this outcome:
# Number of items $ Amount of items $ Amount Commission
###### $$$$$$ $$$$$

I don't want the second format because there are about seven items that go with different criteria (for example: New Business, Renewals, Cancels, etc).
I'm not quite sure what you're meaning with those hashes and dollar signs and
stuff let me give you an pointer on how to distinguish first.. You said your fieldnames for all he queries were the same and datatype?. To that extent if you create a table first and foremost....... (yes I know you can make the query create the table through 'make table query' .......but lets forget that for a moment, do it manually till you see what I mean....then you can progress to the make table query next when you have your head round my meaning here.

The point in creating the table is to create an empty bucket if you like in which to pour the data. You know that each of your queries will output the data in a fixed format whether thats text numeric whatever so the idea is to make a table that you know will hold the format of that data. Now you say there is no distinguishing feature I agree with you there there probably isnt at the moment BUT you know what your each of your queries does and the meaning of them.

The trick then is to make ANOTHER column in EACH of your query as a false column if you like a 'virtual data' column if you will you can achieve this simply in the grid by entering a value for the fieldname like this

Distinguisher: "This is query one data"

Now if we were to create that as a 'virtual' column in the query what is the next effect ? it is this.... you get a column of data with "This is query one data" in each and every row cell so to speak for the entire dataset......that is the distinquishing feature....you do that for each of your queries so... if its four queries then its

Distinguisher: "This is query one data"
Distinguisher: "This is query two data"
Distinguisher: "This is query three data"
Distinguisher: "This is query three data"

Now in the table in which you intend to dump this data you merely create an additional field called.........you got it... DISTINGUISHER and then using a simple append query if you like drag your query and dump all the query columns into the grid and Access will automatically recognise the query field headers as matching the table in which you intend to dump into INCLUDING your 'Distinguisher'. Hit the run button and there you have four datasets in the one table from which you can then distinquish what data is from what query purely by reference to the extra column in the physical table

I hope I am making sense?

As for the formatting thing without me fully understanding what you mean by it I can't advise yet I am sort of believing that all your columns are of data are the same datatype?. They have to be or this method is not going to answer your problem.

This table creation method multiple append is much the same as a UNION query except that we are placing the data in a physical table as opposed to JOINIING 'in the air' via a query so to speak

Hope this helps to a point if not come back

Jim
Aug 29 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: Michael Malinsky | last post by:
I'm attempting to create a database which will take information from one (perhaps two) tables and utilize that information to return queries to a report designed in Excel. The general idea I...
1
by: Steven Stewart | last post by:
I have a user who has been using Excel for a while to keep statistics and print reports. She finds using it cumbersome because of long formulas and a lot of copying and pasting. I have designed...
4
by: meditcakepbgt | last post by:
halo.. i have this problem.. i have a query that have been derived from many tables and query.. and i want to transfer some of the value in the query to a specific cells in the microsoft excell.....
5
by: hmiller | last post by:
Hey there folks: I have been trying to get this work for about a week now. I'm new to VBA... I am trying to transfer a populated table in Access to an existing, but blank, Excel worksheet. I...
3
by: JohnM | last post by:
I can transfer from a query with DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "Filenam", CPath, True I would like to use a form for the user to select and order data then...
4
by: somanyusernamesaretakenal | last post by:
What I am trying to achieve: Basically I have generated a report in access. This report needs to be updated using excel. (Updating the new data, not changing existing data) What I did was I...
5
by: Sport Girl | last post by:
Hi everybody. I am new in PERL language and working in it since little hours, actually i am still a trainee and i need help please. In fact, i need a script in PERL that enables me to retrieve...
1
by: Sport Girl | last post by:
Hi everybody , i have the task of developing in Perl a script that retrieves data from 3 tables ( bugs, profiles, products) from a MySQL database called bugs and display them in an excel sheet...
1
by: is49460 | last post by:
Good afternoon! I use transfer spreadsheet function the export data from one of the table into the excel spreat sheet. I use the following code: DoCmd.TransferSpreadsheet acExport, 8, "qry...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.