ActiveReports16 Designer - Chart Data

Posted by: colin on 28 May 2024, 4:00 pm EST

    • Post Options:
    • Link

    Posted 28 May 2024, 4:00 pm EST

    I’m trying to create a 2d bar chart in the designer with 3 series and 1 data point for each series, so it will end up just being 3 different color bars and the axis.

    I’m trying to get the value of each series set at runtime to either a calculated field in the main report, or a DataField that the main report is already using.

    Is anything like this possible?

  • Posted 29 May 2024, 4:34 am EST

    Hi Colin,

    As the terms ‘Series’ and ‘Data Point’ are specific to SectionReports I am assuming that you are using SectionReport, for SectionReport chart unfortunately there’s no direct way using the designer to bind it to runtime data points.

    However, you can at runtime add Datapoints/series to your existing chart by updating the SectionReport object through code, if you are working with RPX-based SectionReport you can load it into a SectionReport class and then add your respective Series/DataPoints at runtime.

    Please find attached a sample implementing the same for your reference.

    Regards,

    Anand

    MultiLineChart.zip

  • Posted 29 May 2024, 11:42 am EST

    Thank you very much for the quick response and the sample. Unfortunately in my situation I won’t be able to run outside code against the report, everything will need to be done from within the section report’s functionality.

    Can I use this code (or something similar) in the section report’s script, and assign the x and y values for the data points based on data the report has at runtime? I know the field names that will be used for each series.

  • Posted 30 May 2024, 5:45 am EST

    Hi Colin,

    Sure you can add your points to the RPX Report through its script, please find attached a sample implementing the same.

    Regards,

    Anand

    SectionReport1.zip

Need extra support?

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

Learn More

Forum Channels