Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6904381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:03:15+00:00 2026-05-27T08:03:15+00:00

I have a lagacy project (vb6) which has several reports (.rpx) next to the

  • 0

I have a lagacy project (vb6) which has several reports (.rpx) next to the project execution file (.exe). When user executes the .exe file, it downloads the .rpx file to a specified local folder of user machine and with ‘LoadLayout’ statement, it gets all the .rpx report file format into a variable of type: DDActiveReports2.ActiveReport and finally shows it.

Now, my question is: I need to embed a subreport into the main report said about it above.
The subreport file is in vb project NOT next to exe file. How can I make a relation between main report and the subreport and feed the subreport with a recordset based on some data the main report uses them?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:03:16+00:00Added an answer on May 27, 2026 at 8:03 am

    After you load the parent report, you will need to load the subreport into a variable, and set the subreport control’s object property to that variable before running the parent report. For example:

    ' Load parent report:
    Dim rptParent As New ActiveReport
    rptParent.LoadLayout App.Path & "\myParentReport.rpx"
    
    ' Load the subreport:
    Dim rptSubreport As New ActiveReport
    rptSubreport.LoadLayout App.Path & "\mySubReport.rpx"
    
    ' * Initialize the subreport control by passing the actual report to run as a subreport:
    Set rptParentReport.Sections("Detail").Controls("MySubreportControl").Object = rptSubreport
    
    ' Preview the parent report in the viewer:
    ARViewer21.ReportSource = rptParent
    

    Now, if you cannot hardcode the subreport file name (mySubReport.rpx in my example above) or subreport control name (MySubreportControl in my example above) then you can write a routine to loop through all controls in the parent report and find each subreport control. Then, make sure you store the name of the subreport’s file in the ReportName or Tag property of the subreport control. Then you can dynamically load/link subreport files with subreport controls in your code. Please reply with your questions as a comment if you need some specific help with that.

    Also, the COM version of ActiveReports Documentation is available online here (archive) in case that might be useful.

    Scott Willeke
    GrapeCity
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have joined a project which has been already developed and its a legacy
I have a legacy project which has all the source files, templates, properties written
We have a legacy VB6 application which has worked just fine on Windows XP
I have a legacy project using Rails 2.3.5 but I can't find with which
i have legacy j2ee project which is using struts 2 with spring. Now when
I have a single PHP file within a legacy project that is at least
I am using git for a large legacy project which has two branches -
I have to work on several VB6 legacy projects and despite some good VB6
In a legacy project that I'm on, we have several processing that are preformed
I have started working on a legacy project (ASP.NET 1.1) which was done in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.