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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report generation

Status
Not open for further replies.

MarcoPerez21

Programmer
May 5, 2004
55
0
0
US
Can you run a report with two separate queries containing all the necessary data?

Marco
[ponder]
 
As far as I know, a report can only have one recordsource. You can use a subreport if that is suitable, or you can create a query that combines the two queries you need to gather the data from.
If there is a way to really use two queries, I am not aware of it.

___________________________________________________________
With your thoughts you create the world--Shakyamuni Buddha
 
Typically when you want to view 2 record sources on a report, you would use a subreport. The subreport can be linked to the main report, or it can be entirely distinct.

-Gary
 
Laurel, you can use to Queries, in my case I am using 8! I have queries for each individual day Monday- Sunday... All of those queries are then in my "Master Query" whereI get all the data from the queries to generate my report.... the only thing is that the query can only handle 255 arguments/ obects. I have no way of getting the information from "LastYear" same "week" of this Year. (let's say may 28 2004 = week 35 for this year, then I would have to get the information for week 35 of the previous year.)
I have no idea as to how to create a sub report. I am farely new to access. I do have expierence programming in Visual Studio.Net though.


Cheers
Marco
[morning]
 
Having 8 separate queries sounds unnormalized. Over 255 fields sounds very unnormalized. Perhaps you need to explain what you have for data sources and how you want to display this information.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Duane,
I have two Master queries that I need to combine to get the information over to my report. I have not a clue as to how the bestway to this would be. any insight woud be much appreciated.

here's what the SQL to the query looks like:

Code:
PARAMETERS [Enter Beginning Date] DateTime;
SELECT qry_Master_sample.qry_salesinput_master.Period, qry_Master_sample.qry_salesinput_master.Week, qry_Master_sample.qry_salesinput_day1.Day, qry_Master_sample.qry_salesinput_day1.[Store Am sales], qry_Master_sample.qry_salesinput_day1.[Store Pm sales], qry_Master_sample.qry_salesinput_day1.[Store Praline Sales], qry_Master_sample.qry_salesinput_day1.[Store Merch Sales], qry_Master_sample.qry_salesinput_day1.[Store Postage Sales], qry_Master_sample.qry_salesinput_day1.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day1.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day1.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day1.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day1.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day1.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day1.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day1.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day1.[Planned Store hours], qry_Master_sample.qry_salesinput_day1.[Actual Store hours], qry_Master_sample.qry_salesinput_day1.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day1.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day1.[Overtime Dollars], qry_Master_sample.qry_salesinput_day1.[Training Dollars], qry_Master_sample.qry_salesinput_day1.[Am # of Tickets], qry_Master_sample.qry_salesinput_day1.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day1.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day2.Day, qry_Master_sample.qry_salesinput_day2.[Store Am sales], qry_Master_sample.qry_salesinput_day2.[Store Pm sales], qry_Master_sample.qry_salesinput_day2.[Store Praline Sales], qry_Master_sample.qry_salesinput_day2.[Store Merch Sales], qry_Master_sample.qry_salesinput_day2.[Store Postage Sales], qry_Master_sample.qry_salesinput_day2.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day2.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day2.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day2.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day2.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day2.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day2.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day2.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day2.[Planned Store hours], qry_Master_sample.qry_salesinput_day2.[Actual Store hours], qry_Master_sample.qry_salesinput_day2.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day2.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day2.[Overtime Dollars], qry_Master_sample.qry_salesinput_day2.[Training Dollars], qry_Master_sample.qry_salesinput_day2.[Am # of Tickets], qry_Master_sample.qry_salesinput_day2.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day2.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day3.Day, qry_Master_sample.qry_salesinput_day3.[Store Am sales], qry_Master_sample.qry_salesinput_day3.[Store Pm sales], qry_Master_sample.qry_salesinput_day3.[Store Praline Sales], qry_Master_sample.qry_salesinput_day3.[Store Merch Sales], qry_Master_sample.qry_salesinput_day3.[Store Postage Sales], qry_Master_sample.qry_salesinput_day3.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day3.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day3.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day3.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day3.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day3.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day3.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day3.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day3.[Planned Store hours], qry_Master_sample.qry_salesinput_day3.[Actual Store hours], qry_Master_sample.qry_salesinput_day3.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day3.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day3.[Overtime Dollars], qry_Master_sample.qry_salesinput_day3.[Training Dollars], qry_Master_sample.qry_salesinput_day3.[Am # of Tickets], qry_Master_sample.qry_salesinput_day3.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day3.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day4.Day, qry_Master_sample.qry_salesinput_day4.[Store Am sales], qry_Master_sample.qry_salesinput_day4.[Store Pm sales], qry_Master_sample.qry_salesinput_day4.[Store Praline Sales], qry_Master_sample.qry_salesinput_day4.[Store Merch Sales], qry_Master_sample.qry_salesinput_day4.[Store Postage Sales], qry_Master_sample.qry_salesinput_day4.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day4.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day4.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day4.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day4.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day4.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day4.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day4.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day4.[Planned Store hours], qry_Master_sample.qry_salesinput_day4.[Actual Store hours], qry_Master_sample.qry_salesinput_day4.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day4.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day4.[Overtime Dollars], qry_Master_sample.qry_salesinput_day4.[Training Dollars], qry_Master_sample.qry_salesinput_day4.[Am # of Tickets], qry_Master_sample.qry_salesinput_day4.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day4.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day5.Day, qry_Master_sample.qry_salesinput_day5.[Store Am sales], qry_Master_sample.qry_salesinput_day5.[Store Pm sales], qry_Master_sample.qry_salesinput_day5.[Store Praline Sales], qry_Master_sample.qry_salesinput_day5.[Store Merch Sales], qry_Master_sample.qry_salesinput_day5.[Store Postage Sales], qry_Master_sample.qry_salesinput_day5.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day5.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day5.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day5.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day5.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day5.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day5.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day5.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day5.[Planned Store hours], qry_Master_sample.qry_salesinput_day5.[Actual Store hours], qry_Master_sample.qry_salesinput_day5.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day5.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day5.[Overtime Dollars], qry_Master_sample.qry_salesinput_day5.[Training Dollars], qry_Master_sample.qry_salesinput_day5.[Am # of Tickets], qry_Master_sample.qry_salesinput_day5.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day5.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day6.Day, qry_Master_sample.qry_salesinput_day6.[Store Am sales], qry_Master_sample.qry_salesinput_day6.[Store Pm sales], qry_Master_sample.qry_salesinput_day6.[Store Praline Sales], qry_Master_sample.qry_salesinput_day6.[Store Merch Sales], qry_Master_sample.qry_salesinput_day6.[Store Postage Sales], qry_Master_sample.qry_salesinput_day6.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day6.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day6.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day6.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day6.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day6.[Wholesale Merch Sales], qry_Master_sample.Expr1129, qry_Master_sample.qry_salesinput_day6.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day6.[Planned Store hours], qry_Master_sample.qry_salesinput_day6.[Actual Store hours], qry_Master_sample.qry_salesinput_day6.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day6.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day6.[Overtime Dollars], qry_Master_sample.qry_salesinput_day6.[Training Dollars], qry_Master_sample.qry_salesinput_day6.[Am # of Tickets], qry_Master_sample.qry_salesinput_day6.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day6.[Peak Ticket Hour], qry_Master_sample.qry_salesinput_day7.Day, qry_Master_sample.qry_salesinput_day7.[Store Am sales], qry_Master_sample.qry_salesinput_day7.[Store Pm sales], qry_Master_sample.qry_salesinput_day7.[Store Praline Sales], qry_Master_sample.qry_salesinput_day7.[Store Merch Sales], qry_Master_sample.qry_salesinput_day7.[Store Postage Sales], qry_Master_sample.qry_salesinput_day7.[MailOrder Praline Sales], qry_Master_sample.qry_salesinput_day7.[MailOrder Merch Sales], qry_Master_sample.qry_salesinput_day7.[MailOrder Postage Sales], qry_Master_sample.qry_salesinput_day7.[MailOrder Total Sales], qry_Master_sample.qry_salesinput_day7.[Wholesale Praline Sales], qry_Master_sample.qry_salesinput_day7.[Wholesale Merch Sales], qry_Master_sample.qry_salesinput_day7.[Wholesale Postage Sales], qry_Master_sample.qry_salesinput_day7.[Wholesale Total Sales], qry_Master_sample.qry_salesinput_day7.[Planned Store hours], qry_Master_sample.qry_salesinput_day7.[Actual Store hours], qry_Master_sample.qry_salesinput_day7.[Planned Store Dollars], qry_Master_sample.qry_salesinput_day7.[Actual Store Dollars], qry_Master_sample.qry_salesinput_day7.[Overtime Dollars], qry_Master_sample.qry_salesinput_day7.[Training Dollars], qry_Master_sample.qry_salesinput_day7.[Am # of Tickets], qry_Master_sample.qry_salesinput_day7.[Pm # of Tickets], qry_Master_sample.qry_salesinput_day7.[Peak Ticket Hour], qry_Master_sample.Qry_LYsalesinput_Master.Period, qry_Master_sample.Qry_LYsalesinput_Master.Week, qry_Master_sample.qry_LYsalesinput_day1.Day, qry_Master_sample.qry_LYsalesinput_day1.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day1.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day1.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day1.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day1.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day1.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day2.Day, qry_Master_sample.qry_LYsalesinput_day2.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day2.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day2.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day2.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day2.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day2.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day3.Day, qry_Master_sample.qry_LYsalesinput_day3.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day3.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day3.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day3.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day3.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day3.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day4.Day, qry_Master_sample.qry_LYsalesinput_day4.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day4.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day4.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day4.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day4.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day4.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day5.Day, qry_Master_sample.qry_LYsalesinput_day5.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day5.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day5.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day5.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day5.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day5.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day6.Day, qry_Master_sample.qry_LYsalesinput_day6.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day6.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day6.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day6.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day6.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day6.[Pm # of Tickets], qry_Master_sample.qry_LYsalesinput_day7.Day, qry_Master_sample.qry_LYsalesinput_day7.[Store Am sales], qry_Master_sample.qry_LYsalesinput_day7.[Store Pm sales], qry_Master_sample.qry_LYsalesinput_day7.[MailOrder Total Sales], qry_Master_sample.qry_LYsalesinput_day7.[Wholesale Total Sales], qry_Master_sample.qry_LYsalesinput_day7.[Am # of Tickets], qry_Master_sample.qry_LYsalesinput_day7.[Pm # of Tickets]
FROM qry_Master_sample;

thanks,
Marco
 
I think you are working way to hard. There may be other methods of getting your data into the display that you require. However, we don't know your data structures or what/how you need to display the final results. This is what I meant by "Perhaps you need to explain what you have for data sources and how you want to display this information."

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top