Dynamic Datasets ActiveReports v17

Posted by: dtujo on 31 May 2023, 3:04 am EST

    • Post Options:
    • Link

    Posted 31 May 2023, 3:04 am EST

    How would you configure datasets and display for dynamic data?

    For instance a series of objects with their own sets of data. See Json below:

    Example 1

    "steps": {
            "1":{
    	    "Operation": "Upset",
                "FE Weight": 11286.736,
                "Upset From": 25.049892,
                "Donut Height": 24,
                "Ratio": 0.5566643,
                "Upset OD": 45.299927,
                "Met Red": 1.0437455,
                "Cert Red": 1.0437455
            },
            "2":{
                "Operation": "Snap",
                "FE Weight": 10957.997,
                "Snap Size": 10,
                "Snap Weight": 250,
                "Snap Height": 24,
                "Met Red": 1,
                "Cert Red": 1
            },
            "3":{
    	    "Operation": "Open",
                "FE Weight": 107707.997,
                "Open From": 10,
                "Open To": 15,
                "Met Red": 1.1134975,
                "Cert Red": 1.1134975
            },
            "4":{
                "Operation": "Final Draw",
                "FE Weight": 10707.997,
                "Start Length": 24,
                "Finish Length": 35,
                "Met Red": 1.4583334,
                "Cert Red": 1.4583334
            }
        }

    Example 2

        "steps": {
            "1":{
                "Operation": "Upset",
                "FE Weight": 11286.736,
                "Upset From": 25.049892,
                "Donut Height": 24,
                "Ratio": 0.5566643,
                "Upset OD": 45.299927,
                "Met Red": 1.0437455,
                "Cert Red": 1.0437455
            },
            "2":{
                "Operation": "Snap",
                "FE Weight": 10957.997,
                "Snap Size": 10,
                "Snap Weight": 250,
                "Snap Height": 24,
                "Met Red": 1,
                "Cert Red": 1
            },
            "3":{
                "Operation": "Open",
                "FE Weight": 107707.997,
                "Open From": 10,
                "Open To": 15,
                "Met Red": 1.1134975,
                "Cert Red": 1.1134975
            },
            "4":{
                "Operation": "Draw",
                "FE Weight": 10707.997,
                "Start Length": 24,
                "Finish Length": 35,
                "Met Red": 1.4583334,
                "Cert Red": 1.4583334
            },
            "5":{
                "Operation": "Open",
                "FE Weight": 107707.997,
                "Open From": 10,
                "Open To": 15,
                "Met Red": 1.1134975,
                "Cert Red": 1.1134975
            },
            "6":{
                "Operation": "Final Draw",
                "FE Weight": 10707.997,
                "Start Length": 24,
                "Finish Length": 35,
                "Met Red": 1.4583334,
                "Cert Red": 1.4583334
            }

    Basically I want to export results from a calculator application I made and generate a report. Depending on the calculation will depend on the sequence and number or “steps” in the object. I am open to restructuring the JSON to meet what would work best.

  • Posted 31 May 2023, 10:18 pm EST

    Hi Daniel,

    You can assign your JSON to the ‘report.Report.DataSources[0].ConnectionProperties.ConnectString’ property at runtime by loading your report into a PageReport object.

    However, looking at your JSON you’ll also need to modify the JSON a bit and put similar objects in an Array to be able to access the data in order.

    Please find attached our sample along with the modified JSON for your reference.

    Regards,

    Anand

    JSON Data.zip

    RuntimeData.zip

Need extra support?

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

Learn More

Forum Channels