Get names of alle subreports (1 Viewer)

dragnor

Registered User.
Local time
Tomorrow, 00:02
Joined
Jul 30, 2008
Messages
12
Hi, I need some help if posible. If you know the name og one report, and then want to get the information about all recordsources used in that report, also if the recordsources are used in subreports or subforms?

Please don't ask my why I need this, it's a company that need a function to do it without going to design view.
 

ajetrumpet

Banned
Local time
Today, 17:02
Joined
Jun 22, 2007
Messages
5,638
A report usually has only one recordsource, if there even is one.

You might try the "debug.print" method in Basic and use the recordsource property to see what you get...??
 

dragnor

Registered User.
Local time
Tomorrow, 00:02
Joined
Jul 30, 2008
Messages
12
you are able to add/include a subform or subreport into a report, and i need to know how many there are in a report, there names, if there are any.

But thanx for your response!
 

ajetrumpet

Banned
Local time
Today, 17:02
Joined
Jun 22, 2007
Messages
5,638
i know what you mean. a subreport is a report object in itself too....you can always loop through the controls and extract the data that way by checking the names of all the objects if you wish. If the name of the current control object is a subreport, print it, or whatever you want to do with it...
 

dragnor

Registered User.
Local time
Tomorrow, 00:02
Joined
Jul 30, 2008
Messages
12
How du you loop through the controls and test for a subreport og subform?
 

ajetrumpet

Banned
Local time
Today, 17:02
Joined
Jun 22, 2007
Messages
5,638
i just threw this together elsewhere as well. Hope it helps..
 

Attachments

  • test.zip
    16.5 KB · Views: 94

dragnor

Registered User.
Local time
Tomorrow, 00:02
Joined
Jul 30, 2008
Messages
12
Thank you, this is nice of you. Have a great weekend!
 

Users who are viewing this thread

Top Bottom