The correct approach is to save the ID or the desired value during the report generation phase (in the object’s BeforePrint method or in Hyperlink.Value):
// In the template / BeforePrint:
Text1.Hyperlink.Kind = HyperlinkKind.Custom;
Text1.Hyperlink.Value = Convert.ToString(Report.GetColumnValue(“Orders.OrderId”));
// (or Text1.Tag = Report.GetColumnValue(“Orders.OrderId”);)
// In the Click handler:
private void Text1_Click(object sender, EventArgs e)
{
var clickedId = ((TextObject)sender).Hyperlink.Value; // or .Tag
}
Comments
Hello!
The correct approach is to save the ID or the desired value during the report generation phase (in the object’s BeforePrint method or in Hyperlink.Value):
// In the template / BeforePrint: Text1.Hyperlink.Kind = HyperlinkKind.Custom; Text1.Hyperlink.Value = Convert.ToString(Report.GetColumnValue(“Orders.OrderId”)); // (or Text1.Tag = Report.GetColumnValue(“Orders.OrderId”);) // In the Click handler: private void Text1_Click(object sender, EventArgs e) { var clickedId = ((TextObject)sender).Hyperlink.Value; // or .Tag }