Set URL dynamically for hyperlink in a report

Stimulsoft Reports.WEB discussion
Post Reply
mdshoaibpathan
Posts: 5
Joined: Thu Jul 16, 2020 6:46 am

Set URL dynamically for hyperlink in a report

Post by mdshoaibpathan »

Hi Team,

We are having a hyperlink in our report which is used to download the XML file located at location specified in the Interaction.Hyperlink property. it looks like as follows:

http://localhost/applicationVDName/XMLE ... }​​​​​.xml

expression1 evaluates correctly and dynamically to a different value as expected. The ask here is to bring in first part of the URL i.e. "http://localhost/applicationVDName" to be generated dynamically based on from which application this report is being accessed. Do we have something already available in Stimulsoft designer? or is there a way we can write another expression which could evaluate to this?

applicationVDName is a web application hosted on a distributed Web server. Need to pull its path dynamically in the report. Something like below:
{expression2}/XMLExport/Test_{​​​​​expression1}​​​​​.xml

Is this even possible? could you please advise and help us here.

Request you to please let me know in case you need any more information to answer this.

Thanks,
Shoaib
Lech Kulikowski
Posts: 7336
Joined: Tue Mar 20, 2018 5:34 am

Re: Set URL dynamically for hyperlink in a report

Post by Lech Kulikowski »

Hello,

You can set the property in your code:
var reportComponent = report.GetComponentByName("ComponentName") as Sti...;
// set the necessary property

Thank you.
Post Reply