UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Another quick (possibly stupid) report question....    
 
   
JrMayor
post Feb 9 2007, 02:21 PM
Post #1

New Member
Posts: 14



Another one.
I am trying to put a spreadsheet like table inside my report. I have created a subreport that does this wonderfully. However, instead of creating one table when I preview the subreport, it creates 2 1/2 pages worth. How do I modify this?
Go to the top of the page
 
+
khaos
post Feb 9 2007, 02:23 PM
Post #2

Retired Moderator
Posts: 8,589
From: Lansing, MI



If you have records on the main report you may need link child/link master to tie the main and sub reports together. This would just be fields that match between the two, like a primary key on the main that is the foreign key on the sub or anything else like that.

HTH
Ken
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 02:24 PM
Post #3

New Member
Posts: 14



Sorry if I am unclear. This isn't a report issue, but instead a subreport issue. I can't get the subreport to show just one table, it makes a ton of them.
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 02:34 PM
Post #4

New Member
Posts: 14



It appears as if the chart is made 14 times. Interestingly, I have 14 values in it. What am I doing wrong here?
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 02:36 PM
Post #5

New Member
Posts: 14



It has something to do with the record source.
Go to the top of the page
 
+
khaos
post Feb 9 2007, 02:44 PM
Post #6

Retired Moderator
Posts: 8,589
From: Lansing, MI



This is somewhat like not joining two fields in a query. You get more records than expected. The properties mentioned are properties of the subreport control on the main report. I can't guarantee this is the solution but I'm pretty sure. Sorry to not give you enough info before but it's hard to guess the level of Access knowledge from a post.

Ken
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 02:54 PM
Post #7

New Member
Posts: 14



Ok, how exactly do I go about doing that?
Go to the top of the page
 
+
khaos
post Feb 9 2007, 03:05 PM
Post #8

Retired Moderator
Posts: 8,589
From: Lansing, MI



Make sure you're on the subreport control and not in the subreport, on the data tab of properties you'll see these two different properties. How it would normally be used is lets say you have a list of customers and items they bought. The main report would be customers, the sub the items. To make sure only customer 1's items show up for customer 1 put customerID (assuming this is the key field) in both of the properties. Often my link master are the controls on the main report that are bound to the fields. So I would put a hidden field (if its not shown) on the main report and call it txtCustomerID. txtCustomerID would be the only word in link master, customerID in link child. You can have more than 1 field, just use semicolons to separate.

HTH
Ken
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 03:30 PM
Post #9

New Member
Posts: 14



My problem is that the subreport on its own creates the 14 tables. If I leave the record source blank, it makes only one table (which is what I want), but the calculations have errors, obviously. Any suggestions?
Go to the top of the page
 
+
khaos
post Feb 9 2007, 03:43 PM
Post #10

Retired Moderator
Posts: 8,589
From: Lansing, MI



If you run the source of the subreport alone (in a normal query) does it return the number of records you expect? What if you open the subreport when it's not part of the main report?
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 03:46 PM
Post #11

New Member
Posts: 14



What I stated in my last post happened when I opened the subreport on its own.
Go to the top of the page
 
+
khaos
post Feb 9 2007, 03:47 PM
Post #12

Retired Moderator
Posts: 8,589
From: Lansing, MI



Then the query of the subreport must have the outer join or not be aggregated if it needs to be.
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 03:50 PM
Post #13

New Member
Posts: 14



Could you please put that in "my low skills in access" format? I don't understand how to fix it. Thanks again.
Go to the top of the page
 
+
khaos
post Feb 9 2007, 03:53 PM
Post #14

Retired Moderator
Posts: 8,589
From: Lansing, MI



Lets go back to the customer sample from above. If you failed to join customerID from tblCustomers to tblCustomerItems you would have an issue. The number of records returned would be multiplied out and get very large. Lets say you have 2 customers with 10 items each. You'd expect 20 records but probably get 40 or more in the return query without the join. A join is the line drawn between fields in a query. You can post the SQL (from SQL view) if you need help with this.

Ken
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 03:57 PM
Post #15

New Member
Posts: 14



My query looks like I want it to. Basically I am creating a report from a survey that we did. The first question has a possibility of 14 answers and I am just putting a chart in the report that counts each answer. So the query lists the name of the group, and their answer. Now, when I create a subreport using this data, it makes 14 correct charts but I only want one. Does this help?
Go to the top of the page
 
+
khaos
post Feb 9 2007, 04:08 PM
Post #16

Retired Moderator
Posts: 8,589
From: Lansing, MI



Are you using a pivotchart?
Go to the top of the page
 
+
JrMayor
post Feb 9 2007, 04:11 PM
Post #17

New Member
Posts: 14



No, I am using the CountIff method to count the number of times each occurs and am putting the results in a text box. I am making a text box for each.
Go to the top of the page
 
+
khaos
post Feb 9 2007, 04:16 PM
Post #18

Retired Moderator
Posts: 8,589
From: Lansing, MI



Thats the issue then. You have 14 records so are doing this count 14 times. I'd build a query like such:

SELECT 1stCountif, 2ndCountif etc and use that as the subreports source, bind each field that has a countif to the proper query field.

HTH
Ken
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th May 2013 - 08:38 AM