Report two tables that are connected as foreign keys in StimulSoft - stimulsoft

I have two data bands in StimulSoft, one of the tables is connected to the first table by a foreign key, Master table is AllTeam looks like this:
id
TeamSubject
Manager
GroupCode
DateCreate
1
Sky
Ali
120
1400/01/01
2
Gold
Saman
111
1401/10/15
3
Mersad
Hamed
220
1400/06/21
The second table is connected to the master table by the foreign key of the 'id' column
TeamMembers looks like this:
id
AllTeamID
Name
Family
MemCode
1
1
saeed
karimi
1234
2
2
ali
hasani
1289
3
2
hamed
akbari
9874
4
3
kazem
sami
7895
6
1
ahmad
barati
121212
9
1
pardis
goli
359642
I want both tables to be displayed in Stimulsoft so that after each row of the master table all the records connected to it from the second table below it are displayed.
Result should be like this
id
TeamSubject
Manager
GroupCode
DateCreate
1
Sky
Ali
120
1400/01/01
id
AllTeamID
Name
Family
MemCode
1
1
saeed
karimi
1234
6
1
ahmad
barati
121212
9
1
pardis
goli
359642
id
TeamSubject
Manager
GroupCode
DateCreate
2
Gold
Saman
111
1401/10/15
id
AllTeamID
Name
Family
MemCode
2
2
ali
hasani
1289
3
2
hamed
akbari
9874
id
TeamSubject
Manager
GroupCode
DateCreate
3
Mersad
Hamed
220
1400/06/21
id
AllTeamID
Name
Family
MemCode
4
3
kazem
sami
7895
My main problem is that how can I introduce the ID field in the first data band, that is, the master table, to the second data band as a variable?

Related

Multiple Tables in a Single Container

I'm using the GridDB Node js Connector and was wondering how I could add multiple tables in a single container while retaining data for all of the tables?
P.S. I went through the SQL documentation for GridDB, so using the JOIN command is not confusing; it is simply the cluster intiliazation. The code from the documentation is attached below:
○Inner join
SELECT * FROM employees e INNER JOIN departments d ON e.department_id=d.department_id;
id first_name department_id department_id department
------+-----------+--------------+--------------+-----------
0 John 0 0 Sales
1 William 1 1 Development
2 Richard 0 0 Sales
4 Lisa 3 3 Marketing
5 James 1 1 Development
○Left outer join
SELECT * FROM employees e LEFT JOIN departments d ON e.department_id=d.department_id;
id first_name department_id department_id department
------+-----------+--------------+--------------+-----------
0 John 0 0 Sales
1 William 1 1 Development
2 Richard 0 0 Sales
3 Mary 4 (NULL) (NULL)
4 Lisa 3 3 Marketing
5 James 1 1 Development

Extract the mapping dictionary between two columns in pandas

I have a dataframe as shown below.
df:
id player country_code country
1 messi arg argentina
2 neymar bra brazil
3 tevez arg argentina
4 aguero arg argentina
5 rivaldo bra brazil
6 owen eng england
7 lampard eng england
8 gerrard eng england
9 ronaldo bra brazil
10 marria arg argentina
from the above df, I would like to extract the mapping dictionary that relates the country_code with country columns.
Expected Output:
d = {'arg':'argentina', 'bra':'brazil', 'eng':'england'}
Dictionary has unique keys, so is possible convert Series with duplicated index by column country_code:
d = df.set_index('country_code')['country'].to_dict()
If there is possible some country should be different per country_code, then is used last value per country.

Question about excel columns csv file how to combine columns

I got a quick question I got a column like this
the players name and the percentage of matches won
Rank
Country
Name
Matches Won %
1 ESP ESP Rafael Nadal 89.06%
2 SRB SRB Novak Djokovic 83.82%
3 SUI SUI Roger Federer 83.61%
4 RUS RUS Daniil Medvedev 73.75%
5 AUT AUT Dominic Thiem 72.73%
6 GRE GRE Stefanos Tsitsipas 67.95%
7 JPN JPN Kei Nishikori 67.44%
and I got another data like this ACES PERCENTAGE
Rank
Country
Name
Ace %
1 USA USA John Isner 26.97%
2 CRO CRO Ivo Karlovic 25.47%
3 USA USA Reilly Opelka 24.81%
4 CAN CAN Milos Raonic 24.63%
5 USA USA Sam Querrey 20.75%
6 AUS AUS Nick Kyrgios 20.73%
7 RSA RSA Kevin Anderson 17.82%
8 KAZ KAZ Alexander Bublik 17.06%
9 FRA FRA Jo Wilfried Tsonga 14.29%
---------------------------------------
85 ESP ESP RAFAEL NADAL 6.85%
My question is can I make my two tables align so for example I want to have
my data based on matches won
So I have for example
Rank Country Name Matches% Aces %
1 ESP RAFAEL NADAL 89.06% 6.85%
Like this for all the player
I agree with the comment above that it would be easiest to import both and to then use XLOOKUP() to add the Aces % column to the first set of data. If you import the first data set to Sheet1 and the second data set to Sheet2 and both have the rank in Column A , your XLOOKUP() in Sheet 1 Column E would look something like:
XLOOKUP(A2, Sheet2!A:A, Sheet2!D:D)

Excel Update column based on another column from another sheet

I've an excel with 2 sheets
In One sheet I've data like below
ID ID1 Name
1 101 ABC
2 202 XYZ
3 303 MNP
In Sheet2 I've data like below
ID ADD
1 LONDON
2 USA
3 CANADA
Now I need add one more column in sheet2 and want ID2 corresponding to ID1 from sheet1.
Like
ID ADD ID2
1 LONDON 101
2 USA 202
3 CANADA 303
Please help.
Use INDEX(MATCH()):
=INDEX(Sheet1!B:B,MATCH(A2,Sheet1!A:A,0))

WPF Table Multiple Row Header

How can i achieve this multiple row header in WPF table?
Example:
ID Name Age Gender
City Phone 1
Address 1 Phone 2
Address 2
------------------------------------
1 Justin 30 M
L.A. 1000000
St.Add 1 2000000
St.Add 2
2 Monica 25 F
Salt Lake 5000000
St.Add 8 6000000
St.Add 9
Table is placed in a flow document and which will be shown via WPF Document Viewer. Thank you.

Resources