Referencing an embedded report (1 Viewer)

solnajeff

Registered User.
Local time
Today, 09:03
Joined
May 22, 2007
Messages
33
Hi

I have a report that in standalone form for a test that changes the heading dynamically according to the test being administered, when it is to be printed.

However I have embedded the report in a form for administering a test using the computer. Unfortunately I am finding it difficult to change the heading in code as it gives an error saying incorrect spelling or does not exist.

I am assuming that the embedded report is not 'open' and does not trigger the relevant events. If I click on the report the onLoad event will change the heading but I cannot find out how to reference the report in order to trigger the change.

I am sure that I am missing something obvious and would appreciate any assistance.

Regards

Jeff
 

moke123

AWF VIP
Local time
Today, 02:03
Joined
Jan 11, 2013
Messages
3,921
What events have you tried?
How about running the code in the main form?
I dont believe the on load event fires with a subreport.
It may fire when it recieves the focus so you could try setting focus to the subreport in the on load of the main form.
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:03
Joined
Oct 29, 2018
Messages
21,477
Hi Jeff. Are you able to post a sample db for us to check out?
 

June7

AWF VIP
Local time
Yesterday, 22:03
Joined
Mar 9, 2014
Messages
5,475
Or show the code that is setting the heading. By 'heading' do you mean a label or textbox in the report header?
 

solnajeff

Registered User.
Local time
Today, 09:03
Joined
May 22, 2007
Messages
33
Hi


Thanks for your replies.


I have managed to determine where I went wrong. When launching the form for a test the elements were hidden prior to the start and I had been setting the focus of the subreport prior to making it visible.


Makin the report visible then setting the focus allowed everything to function correctly.


Thanks for your time


Regards


Jeff
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 23:03
Joined
Oct 29, 2018
Messages
21,477
Hi Jeff. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom