Radchenko_vv wrote: ↑Wed Oct 13, 2021 11:18 am
Lech Kulikowski wrote: ↑Tue Oct 12, 2021 2:51 pm
Hello,
Please check the modified report.
Thank you.
Something wrong with this report file.
I have send report mrt file in attached files with dataset.
Excel - this is how must be.
-- Test request to fill customer data
--Customer_Info_(DataSource)--
-- Customer List --
DECLARE @List_Customer table(Cust_Id INT, Cust_Name varchar(100))
INSERT INTO @List_Customer (Cust_Id, Cust_Name)
SELECT 1, 'Customer_1' UNION
SELECT 2, 'Customer_2' UNION
SELECT 3, 'Customer_3'
-- Customer Settings List --
DECLARE @List_Customer_Settings table(Settings_Id INT, Settings_Name varchar(100), Settings_Text_Info nvarchar(4000), Cust_Id INT )
INSERT INTO @List_Customer_Settings (Settings_Id, Settings_Name, Settings_Text_Info, Cust_Id)
SELECT 1, 'Finans', 'At the expense of the funds received by the Customer from the compulsory medical insurance fund', 1 UNION
SELECT 1, 'Finans', 'Payment under the Contract is made at the expense of funds received by the customer from TFOMS for 2020', 2 UNION
SELECT 1, 'Finans', 'Funds received by the customer from the compulsory medical insurance fund, from the national budget, from funds from other income-generating activities.' , 3 UNION
SELECT 2, 'Adress', 'C.B.D. Library, and Subscriptions Service,P.O Box 255,Plympton,South Australia 5038', 1 UNION
SELECT 2, 'Adress', 'Troyka Limited, 799 College Street, Toronto, Ontario, Canada M8G IC7', 2 UNION
SELECT 2, 'Adress', '14 Rue de Provigny, 94236 Cachan Cedex' , 3
SELECT
lc.Cust_Id
,lc.Cust_Name
,(SELECT top 1 Settings_Text_Info FROM @List_Customer_Settings lcs WHERE lcs.Cust_Id = lc.Cust_Id AND lcs.Settings_Name = 'Adress') AS Adress
,(SELECT top 1 Settings_Text_Info FROM @List_Customer_Settings lcs WHERE lcs.Cust_Id = lc.Cust_Id AND lcs.Settings_Name = 'Finans') AS Finans
FROM @List_Customer lc
ORDER BY lc.Cust_Id