How to auto-populate a dependent variable when only one related record is found

Stimulsoft Reports.NET discussion
Post Reply
miss
Posts: 6
Joined: Mon Oct 06, 2025 4:28 am

How to auto-populate a dependent variable when only one related record is found

Post by miss »

I want to configure my report parameters so that when a parent variable is selected, the child variable automatically populates only when there is exactly one matching value in the data source.
If more than one matching value exists, the child variable should remain blank so that the user can manually choose the desired option.

Is there any way to do this? Would appreciate your inputs to help :)
Lech Kulikowski
Posts: 7510
Joined: Tue Mar 20, 2018 5:34 am

Re: How to auto-populate a dependent variable when only one related record is found

Post by Lech Kulikowski »

Hello,

There is no such specific option.

Thank you.
miss
Posts: 6
Joined: Mon Oct 06, 2025 4:28 am

Re: How to auto-populate a dependent variable when only one related record is found

Post by miss »

Hi Lech,

Thanks for confirming that there’s no built-in option for this.
Just to clarify, would it be possible to replicate at least a simpler version of the behavior?

Specifically:

The child variable remains blank by default. When the parent variable is filled in and there’s only one related record, the child variable automatically populates with that value.

I just wanted to confirm whether this kind of logic could be handled in a script event (e.g., BeginRender) or expression, or if it’s completely unsupported in stimulsoft?

Appreciate your time and guidance
Lech Kulikowski
Posts: 7510
Joined: Tue Mar 20, 2018 5:34 am

Re: How to auto-populate a dependent variable when only one related record is found

Post by Lech Kulikowski »

Hello,

Such behavior is not supported; it is not possible to add additional conditions for displaying a dependent variable.

Thank you.
miss
Posts: 6
Joined: Mon Oct 06, 2025 4:28 am

Re: How to auto-populate a dependent variable when only one related record is found

Post by miss »

Hello Lech,

Alright i will let my team knows about this

Thankyou
Lech Kulikowski
Posts: 7510
Joined: Tue Mar 20, 2018 5:34 am

Re: How to auto-populate a dependent variable when only one related record is found

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply