Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

How to change the sub-report links dynamically in crystal reports 10.x?

I  have a main report called "Main.rpt". There are 3 more reports named as "One.rpt", "Two.rpt" and "Three.rpt" separately.

I want to have a sub-report in the "Main.rpt" page which initially points to "One.rpt" file. And at runtime, i need to change the sub-report's pointing link to "Two.rpt" or "Three.rpt".

How can I accomplish this?
0
Yogeshup
Asked:
Yogeshup
  • 2
1 Solution
 
mlmccCommented:
I think the easiest way to do this is to insert all the subreports into the main report each in its own section then suppress the 2 you don't want with conditional suppression.

You can add "new" sections by
Right click the left margin of the section you want another
Click INSERT SECTION below

If you do that on the details section you will now have
Details
   Detail A
   Detail B

mlmcc
0
 
mlmccCommented:
How do you determine which subreport to use

You can conditionally suppress a section by
Right click the left margin of the section you want to suppress
Click SECTION EXPERT
Click the formula button to the right of SUPPRESS
Enter a formula that returns TRUE when you want the section suppress

mlmcc
0
 
frodomanCommented:
I agree.

I don't think you can change it at runtime because you must authenticate to the db before you can make changes but if you change the subreport then you haven't authenticated with the correct info - it's an endless cycle.

mlmcc's suggestion to include all 3 and suppress the unneeded ones is the best approach.

frodoman
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now