Page 1 of 1

Merge Datasets

Posted: Wed Feb 10, 2021 4:33 pm
by alex.coles
I have an API which I am passing to Reports twice with different parameters, so have 2 different datasources in my report in the format:

Code: Select all

[
  { 'id': 1, 'value':3 },
  { 'id': 2, 'value':4 },
  { 'id': 4, 'value':2 }
]

Code: Select all

[
  { 'id': 2, 'value':5 },
  { 'id': 3, 'value':1 },
  { 'id': 4, 'value':3 }
]
What I want is to output the two datasets merged into a databand similar to:

Code: Select all

Item	V1	V2	Dif
1     	3	0	-3
2     	4	5	1
3	0	1	1
4	2	3	1
Looking for some way of creating a merged dataset, any ideas? Is this possible?

Stimulsoft.Reports.JS
Version: 2019.4.2
Build date: 2019.11.13

Re: Merge Datasets

Posted: Fri Feb 12, 2021 9:14 am
by Lech Kulikowski
Hello,

You can try to use the DataTransformation item.
But each data source should contain all id from both sources.

Thank you.