Maniupulating nested datafields

Posted by: sean.scott on 10 May 2018, 1:26 pm EST

    • Post Options:
    • Link

    Posted 10 May 2018, 1:26 pm EST

    So, I would like to do a couple of things using this XML bound report and I am having trouble. I think that I am unclear of how to specify a nested bound path datafield.

    For example, to concatenate a string with a root datafield it would go as so:

    = "Programmer: " + PROGRAMMER

    But I don’t know how to perform the same action with a nested path such as:

    = "Programmer: " + DEVELOPMENT/PROGRAMMER

    If the bound datafield has nesting the concat doesn’t work. I have tried surrounding the nested field with all the standard bounds characters () {} “” ‘’ and tried various XPATH setting like leading with a / etc.

    Some guidance would be appreciated.

    Thanks.

  • Posted 11 May 2018, 6:05 am EST

    You would need to do this in the report’s Script as below:

    public void Detail_Format()
    {
    	TextBox1.Text = ((GrapeCity.ActiveReports.Data.XMLDataSource) rpt.DataSource).Field("/Statistics/Game/ID", false, false).ToString();
    }
    
  • Posted 11 May 2018, 1:07 pm EST

    Got it, thank you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels