12-26-12, 19:12 #1Registered User
- Join Date
- Dec 2012
Unanswered: I am having problems combining two queries into one report
The two queries have numerical data involving products. The Numerical Data has different column headers in each query, so I can not simply combine them into one query and create a report based off that.
I would like it to read
Report base on
However, everytime I do this, it either
1) paste the sub report on top of my actual report if i put it in anywhere in the detail box.
2) infinitely ask me to enter the paramater value prompt that I have in each query.
3) does not show every data value in the sub report.
Basically, where do i place the sub report in my main report to avoid this issue? and why am i getting the enter paramater value non stop? I am entering the same paramamter value for both reports(the product ID)
12-27-12, 03:56 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
A sub report is effectively a new report for each invocation. So if you have a parameter in the sub report query then it will request a parameter each time. The fix for that is to base the column that you supply as a parameter on the value in the main report.
However for me if you are using a sub report there has to be some logic which links it to the main report which meansvthat logic should be applied to the query to create a single report.
I'm not a fan of setting parameter values inside a query as its to easy for a user yo screw up. I far prefer setting such values in a form where you can make certain values are sane before running firms or reports.I'd rather be riding on the Tiger 800 or the Norton
12-27-12, 05:34 #3Grumpy old man (training)
Provided Answers: 10
- Join Date
- Sep 2006
- Surrey, UK
If there are no points of equivalence between your two queries, you are going to have a very hard time combining them into one report. After all, without a common field between them, how will Access know which records in the second query relate to which records in the first?
Subreports (like subforms) work best with one-to-many relationships - is that what you have here?10% of magic is knowing something that no-one else does. The rest is misdirection.
Beers earned: 1