JSON Relation Or

Stimulsoft Reports.NET discussion
Post Reply
nathan
Posts: 4
Joined: Wed May 15, 2024 7:54 am

JSON Relation Or

Post by nathan »

Good afternoon,

I am trying to setup a template that will print:
Item 1
-Discount A
-Discount B
Item 2
-Discount C
etc

Here is some example data:

Code: Select all

        "lines": [
            {
                "lineId": 1,
                "product": {
                    "description": "CLA HAMBLE OAK",
                    "discountable": {
                        "allowDiscountDocument": true,
                        "allowDiscountLine": true
                    },
                    "discounts": [
                        {
                            "amount": 10.5,
                            "markdownReasonId": "DIS",
                            "type": "Manual"
                        },
                        {
                            "amount": 5.95,
                            "markdownReasonId": "DIS",
                            "type": "Manual"
                        }
                    ],
                    "itemIdentifier": {
                        "barcode": "2210024010307",
                        "id": "210024            001001         X"
                    },
                    "itemType": "Merchandise",
                    "netAmount": 53.55,
                    "quantity": 1,
                    "references": {
                    },
                    "salespersonId": "001",
                    "taxes": [
                        {
                            "amount": 8.93,
                            "categoryId": "STD",
                            "rank": 1,
                            "taxationCountryId": "",
                            "taxationRegionId": "UK1",
                            "taxModelId": "UK",
                            "taxSystemId": "UK1"
                        }
                    ],
                    "unitPrice": 70,
                    "warehouseId": "090",
                    "warehouseIdentifier": {
                        "externalReference": "",
                        "id": "090"
                    }
                }
            }
And here is a snip of the Dictionary:
Stimulsoft Dictionary.png
Stimulsoft Dictionary.png (16.5 KiB) Viewed 2998 times
I have read the online documentation but am unclear if I need to use Relation, Master Component, a combination or something else?
Is anyone able to advise please?
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: JSON Relation Or

Post by Lech Kulikowski »

Hello,

What product and version are you use?

Relations should be added automatically.

Thank you.
Attachments
Screenshot 2024-06-19 090058.png
Screenshot 2024-06-19 090058.png (77.7 KiB) Viewed 2968 times
nathan
Posts: 4
Joined: Wed May 15, 2024 7:54 am

Re: JSON Relation Or

Post by nathan »

Lech Kulikowski wrote: Wed Jun 19, 2024 7:01 am Hello,

What product and version are you use?

Relations should be added automatically.

Thank you.
Hi Lech, thank you for replying. It is .Net 2016.3 - this is the version distributed with the software package I'm using.
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: JSON Relation Or

Post by Lech Kulikowski »

Hello,

In this case, you can add relations manually.

Thank you.
nathan
Posts: 4
Joined: Wed May 15, 2024 7:54 am

Re: JSON Relation Or

Post by nathan »

Lech Kulikowski wrote: Wed Jun 19, 2024 8:01 am Hello,

In this case, you can add relations manually.

Thank you.
I have created a simple template with 2 bands (Lines_Product and Lines_Product_Discounts).
I have setup a Relation
DiscountRelation.png
DiscountRelation.png (22.5 KiB) Viewed 2962 times
And Master Component
Master Component.png
Master Component.png (12.99 KiB) Viewed 2962 times
I have also attached the .mrt file - are you able to check it please?
Attachments
Stimulsoft Discount Template.mrt
(51.37 KiB) Downloaded 216 times
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: JSON Relation Or

Post by Lech Kulikowski »

Hello,

Please check the modified report.

Thank you.
Attachments
Screenshot 2024-06-20 091337.png
Screenshot 2024-06-20 091337.png (186.69 KiB) Viewed 2940 times
Stimulsoft Discount Template_modified.mrt
(41.31 KiB) Downloaded 266 times
Post Reply