Page 1 of 1

Interaction.Hyperlink

Posted: Wed Mar 31, 2010 12:14 pm
by MikeD

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

Set it to a value read from the Database?

Interaction.Hyperlink

Posted: Wed Mar 31, 2010 5:14 pm
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.

Interaction.Hyperlink

Posted: Thu Apr 01, 2010 4:22 pm
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)
{

}

Interaction.Hyperlink

Posted: Fri Apr 02, 2010 6:55 am
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.