Programmatically Run a ON-Demand Subreport in Crystal Reports

In Crystal Reports is there a way to run a on-demand sub-report through a function instead of a link? How?
LVL 1
chris1582Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
I am not aware of a way to run an ON DEMAND subreport.

What are you trying to do?

Is the subreport only in the report header or footer?
If so just change it to a regular subreport.

mlmcc
0
chris1582Author Commented:
it is in the footer. the reason it cannot be a regular sub-report is because it needs to be unique sub-report dependent on the group name which the person is currently viewing in the drill down of the report. so, each group need a unique sub-report. if i change it to a regular sub-report then i can not dynamically pull a unique report for each group.

But they do not want to click on a link and expect the on demand sub-report to run automatically when the click on a group in the drill down section.
0
mlmccCommented:
How is the drilldown setup?

I assume you are using groups with the details hidden.
You might be able to put the subreport in the group footer and suppress it until the user drills in using the drilldownlevel.

mlmcc
0
James0628Commented:
You said the subreport is in the footer, but did you mean report footer or group footer?  If it's in the report footer, it's only going to be run once, and what you're viewing in the drilldown won't change that.

the reason it cannot be a regular sub-report is because it needs to be unique sub-report dependent on the group name which the person is currently viewing in the drill down of the report. so, each group need a unique sub-report. if i change it to a regular sub-report then i can not dynamically pull a unique report for each group.
There's a good chance that I'm missing something, but I don't see the conflict between "regular sub-report" and "unique sub-report dependent on the group name".  Put the subreport in the group header or footer and link the group field to the subreport, and it will be for that group.  If the section is hidden, then I think the subreport will just be run if someone drills down into that section.

 But I never used drilldown in my reports, so I may be missing something there.

 James
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.