I think, for now, this query should work.
SELECT bank, branch, chqno, SUM(Amount) Amount
,STUFF((SELECT ', ' + CAST(ReceiptNo AS VARCHAR(10)) [text()]
FROM dbo.code1
WHERE bank = t.bank
FOR XML PATH(''), TYPE)
.value('.','NVARCHAR(MAX)'),1,2,' ') ReceiptNo
,STUFF((SELECT ', ' + childName + ' (' + Class + ')' [text()]
FROM dbo.code1
WHERE bank = t.bank
FOR XML PATH(''), TYPE)
.value('.','NVARCHAR(MAX)'),1,2,' ') child_class
FROM dbo.code1 t
GROUP BY bank, branch, chqno
Output:
bank branch chqno Amount ReceiptNo child_class
ban1 branch1 11111 800 1, 2, 3 child1 (1-A), child2 (1-b), child3 (1-c)
ban2 branch2 22332 400 4 child3 (2-B)
Something to think about: performances issue, in the future, when dealing with large amount of data, maybe rewrite to call a function then cross join.