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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Displaying Master Field Data In Sub Report, Access 2016    
 
   
RustEE
post Feb 3 2020, 02:10 PM
Post#1



Posts: 20
Joined: 21-October 19



Hello,
I am making a report that uses sub-reports, and would like to show data sent down to the child field in the sub-report.
However every time I set the child field as the control source of a field in the sub-report I get no data displayed.
Is there something I am missing or is this just not possible?
Go to the top of the page
 
June7
post Feb 3 2020, 02:44 PM
Post#2



Posts: 1,304
Joined: 25-January 16
From: The Great Land


If you want to provide db for analysis, follow instructions at bottom of my post.

You want data on main report to display in subreport? Why? This is quite unusual and impractical. Mainly because subreports load before main report, therefore main report data is not available to subreport (same case on forms).


This post has been edited by June7: Feb 3 2020, 03:05 PM

--------------------
Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
 
RustEE
post Feb 3 2020, 03:17 PM
Post#3



Posts: 20
Joined: 21-October 19



Here is a quick and dirty report with a sub report.
In this instance I would like to show the order number in the sub report not the main report.
In my actual application there are several sub reports showing various data points for one main report and I would like to show the master field data in the sub report.
I need this so I can use the data to make headers to break up the report but I lose the data once it is passed down it seems.
Attached File(s)
Attached File  UA_Database.zip ( 41.1K )Number of downloads: 4
 
Go to the top of the page
 
projecttoday
post Feb 3 2020, 05:11 PM
Post#4


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


So why don't you just add the order number to the sub report?

--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 10 2020, 03:08 PM
Post#5



Posts: 20
Joined: 21-October 19



I did add the order number to the sub report.
However it never displays that field, I am guessing because it is passed down from the master report as a master field.
In the example I posted it is the top field in the sub report but when you open the master report it just shows the order number field from the actual master report.
If it were displaying in the sub report there would be duplicates of the order number.
Go to the top of the page
 
projecttoday
post Feb 10 2020, 04:07 PM
Post#6


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


It worked for me.

--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 10 2020, 06:12 PM
Post#7



Posts: 20
Joined: 21-October 19



Can you send me a screenshot of what you are seeing?
Because when I open the master report on the example I sent I only see the order number once for each order.
There should be a shorter field on top which is in the master report and then it should repeat just below that but be oriented to the right side of the report.
The second instance would be from the actual sub report.
Go to the top of the page
 
projecttoday
post Feb 10 2020, 10:44 PM
Post#8


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


Here it is.
Attached File(s)
Attached File  UA_Database.zip ( 27.14K )Number of downloads: 3
 

--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 11 2020, 08:54 AM
Post#9



Posts: 20
Joined: 21-October 19



I am still not seeing it when I run the main report.
I have included a two screenshots that may help with illustrate my issue.
If you look at the sub report screenshot you will see that there is a long field at the top showing the first order number from the query.
In the main screenshot you will see that the field is missing but since the main report had a smaller field with the order number it still shows on the report once per order.
For this instance I would like the longer field from the sub report to show up as well.
This is the only way I can think of to get the data a sub report is grouped by to show up at the top of every page if the sub report is multiple pages long.

Attached File(s)
Attached File  UA_Database_Screenshots.zip ( 140.82K )Number of downloads: 3
 
Go to the top of the page
 
projecttoday
post Feb 11 2020, 09:45 AM
Post#10


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


So in other words, you want to know why the sub report page header isn't printing. Correct? Please confirm this.

There is another current thread on this.

--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 11 2020, 12:40 PM
Post#11



Posts: 20
Joined: 21-October 19



Correct, it seems to be because the header is passed down from the main report.
I did not see any current threads on this when I looked before starting this one.
A link would be greatly appreciated, I will start checking for it myself.
Go to the top of the page
 
projecttoday
post Feb 11 2020, 01:10 PM
Post#12


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


Sorry, but that thread won't help. sub report page headers

Can you put whatever you wanted in the sub page header in the main page header?

Otherwise, I think you have to use grouping to simulate a page header.

Additional info:

this.

this.


--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 11 2020, 03:39 PM
Post#13



Posts: 20
Joined: 21-October 19



I am currently using the grouping to do this but my problem is it only shows at the beginning of the group rather than at the top of every page in that group.
It is not the end of the world but I thought having the group at the top of every page would make reading the report easier for the end user.
The problem with putting it on the main page header is that unlike the example database I posted, in my real one there is customer data at the top of the report.
Go to the top of the page
 
projecttoday
post Feb 11 2020, 03:48 PM
Post#14


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


Did you use the counter like they have in the example? You have to increase the counter when you've printed enough details for one page. That will trigger a change in the group.

--------------------
Robert Crouser
Go to the top of the page
 
rzw0wr
post Feb 11 2020, 09:37 PM
Post#15



Posts: 370
Joined: 28-March 12
From: Indiana


Try putting the Order number in the REPORT header. Works for me.
Dale

--------------------
Access 2010 32 bit.
Not really very good at access.
Go to the top of the page
 
projecttoday
post Feb 12 2020, 12:02 AM
Post#16


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


But that counter is going to have to be in the input. So either in the query or in a temporary table.

--------------------
Robert Crouser
Go to the top of the page
 
RustEE
post Feb 21 2020, 10:45 AM
Post#17



Posts: 20
Joined: 21-October 19



I am sorry, I wrote a response but must not have sent it. I used the first example where I had to group based on the order number then below that I added a sort of false group with the expression set to "=0". Then I just made a header for a false group and put the order number in there, set the header to repeat and voila. Seems to be working well so far but I haven't had a chance to go back and fully test it with a real application. Thank you for all the help.
Go to the top of the page
 
projecttoday
post Feb 21 2020, 10:50 AM
Post#18


UtterAccess VIP
Posts: 11,782
Joined: 10-February 04
From: South Charleston, WV


You're welcome.

--------------------
Robert Crouser
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    29th March 2020 - 10:29 AM