exp or Cus function to form a string from dataset | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

exp or Cus function to form a string from dataset

Hi all, Crystal Report Formula to Get String Codes. Formmula is in Details section. numbervar Count;
numbervar CountMax := 18;
shared stringVar Codes;
IF {e.federal} = "F" THEN
If Count < CountMax then
(
Count := (Count + 1);
Codes := ltrim(Codes + " " + {e.epa_wst_cd})
)
Else
(
""
) ELSE
Codes
e.federal,e.epa_wst_cd are database field. RS:
I have federal,epa_wst_cd fields in dataset. I need a Reporting services Expressinon or Custom Code function for the above formula.
I want to display the string in Footer. Thanks
Thanks & Regards
Mathivanan K
Great work may have to pass through these stages – ridicule, opposition, and then acceptance. Each man who thinks ahead of his time will probably be greatly misunderstood.- vivekananda
else I want to concatenate a field in each details Table row value & I want to display it in page footer. Example: Table detail:
Product Code Product Name
1 ABC
2 BCA
3 DCA
Either In Page footer or table footer
I want to concatenate Product Name & display like below
ABC BCA DCA
Thanks & Regards
Mathivanan K
Great work may have to pass through these stages – ridicule, opposition, and then acceptance. Each man who thinks ahead of his time will probably be greatly misunderstood.- vivekananda
You can use Stored Procedure having this code
Declare @str varchar(1000)
Select @str=Isnull(@str+’,’,”)+column from yourTable
Select @str Or In Crystal Reports, you can make use of Join function Stringvar s="";
WhilePrintingRecords;
s:=s & " " & {Column}; Madhivanan Failing to plan is Planning to fail
I don’t want to go for SP. I should do it in Reporting service expressions. i dont want to display too.
I want to write some expressions based on final(concatenated)string
Thanks & Regards
Mathivanan K
Great work may have to pass through these stages – ridicule, opposition, and then acceptance. Each man who thinks ahead of his time will probably be greatly misunderstood.- vivekananda
&gt;&gt;I want to write some expressions based on final(concatenated)string<br /><br />Then you need to concatenate anyway [<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /><br />Madhivanan<br /><br />Failing to plan is Planning to fail
]]>