Interaction.Hyperlink

Stimulsoft Reports.WEB discussion
Post Reply
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Interaction.Hyperlink

Post by MikeD »


Is there a way of setting the Interaction.Hyperlink value in code? OR

Set it to a value read from the Database?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Interaction.Hyperlink

Post by Jan »

Hello Mike,
Is there a way of setting the Interaction.Hyperlink value in code?
You can use following code:

component.Hyperlink.Value = "test";
Set it to a value read from the Database?
You can specify following expression in Interaction.Hyperlink property:

Code: Select all

{Customers.Url}
Thank you.
MikeD
Posts: 86
Joined: Fri Feb 12, 2010 4:23 pm
Location: USA

Interaction.Hyperlink

Post by MikeD »


Let me be more specific.

I have a Variable.

I can set the Hyperlink property in the property tab in design mode.

How do I do this in code.

I have this for loop which gets me all the StiVariables I'm using in the report.

stVar doesn't have a Hyperlink property for me to set.

What am I doing wrong???

foreach (Stimulsoft.Report.Dictionary.StiVariable stVar in report.Dictionary.Variables)
{

}
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Interaction.Hyperlink

Post by Jan »

Hello,

If i correct understand you need to change value of variable which used in hyperlink expression of component? If that correct you can use following code:

Code: Select all

foreach (Stimulsoft.Report.Dictionary.StiVariable stVar in report.Dictionary.Variables)
{
   stVar.ValueObject = "test";
}
If you want change hyperlink value in component, you can use following code:

Code: Select all

StiComponentsCollections comps = report.GetComponents();
foreach (StiComponent comp in comps)
{
   if (condition)
     comp.Hyperlink.Value = "test";
}
This code will be process all components in report template.

Thank you.
Post Reply