Ticket T299656
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

How to create a cross-reference to navigate from one table to another

How to create a link from the master report to a subreport at runtime

created 9 years ago

[DevExpress Support Team: CLONED FROM T299469: XtraReport NavigateUrl not working when target is inside Subband]
Hi DevExpress Support,

Furthermore - is it possible to create a link from the master report to a control inside a subreport at runtime?

regards,
Michael

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

Hello,
To achieve this, assign the detail label's name to the master label's NavigateURL property and set the master label's Target to "_self". Here is a code snippet:

C#
detaillbl.Name = "detailLabel"; //<<< --- //... masterlbl.NavigateUrl = "detailLabel"; //<<< --- masterlbl.Target = "_self";

I have also attached a sample application for your reference. Let me know if I can be of further help.

See also:
Cross-References and Hyperlinks
How to create a report dynamically

Thanks

    Show previous comments (3)
    DevExpress Support Team 9 years ago

      Okay Michael,
      Since we are using the XRControl.PreviewClick event handler, this solution will work in the WinForms Document Preview only.

      >>> If there is no solution which uses the NavigationUrl feature, I will use a transparent label next to my subreport as bookmark target.
      Indeed, the simplest solution is to place an empty (or a small) label to the required position and set it as a navigation target through the NavigateUrl property.

      Alternatively, try the solution I mentioned above: create a link between the report bricks manually after your report document is generated. To do this, get the required bricks from your report document and use the VisualBrick.NavigationPair property to create a link (How to create custom Table Of Contents). I've modified and attached your project. Please keep me posted.

      MB MB
      Michael Brandt 9 years ago

        Works like a charm!

        DevExpress Support Team 9 years ago

          My pleasure.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.