Page 2 of 2

how do i get multiple rows output as comma separated items on one line?

Posted: Fri Mar 09, 2012 8:40 am
by Alex K.
Hello,

In this function the third parameter is delimiter. You can use the following expression:

Code: Select all

{Func.EngineHelper.JoinColumnContent(Categories, "CategoryName", "; ")}
Thank you.

how do i get multiple rows output as comma separated items on one line?

Posted: Fri Mar 09, 2012 8:59 am
by JorisWils
yeah okay.. I explained it incorrectly I think

I mean.... In the complete text being generated... Diffrent delimiters should be used based on a condition.

So I can have dots, kommas and ";" in the complete text.

maybe something like:

Code: Select all

Func.EngineHelper.JoinCollumnContent.AddCondition(CollumnName,ValueToCheck, ColumnToPrint ,delimitor)
example:

Code: Select all

Func.EngineHelper.JoinCollumnContent.AddCondition("CategoryName","Cat","Species",";") --> delimiter ";" would be printed after the value has been printed
Func.EngineHelper.JoinCollumnContent.AddCondition("CategoryName","Dog","Species",".") --> delimiter "." would be printed after the value has been printed
Func.EngineHelper.JoinCollumnContent.AddCondition("CategoryName","Bird","Species",",")--> delimiter "," would be printed after the value has been printed

So if we have a table:

Code: Select all

----------------------------------
| CategoryName | Species   |
----------------------------------
| Cat          | Kitten    |
| Dog          | Labrador  |
| Bird         | Parrot    |
----------------------------------

The output would then be:

Code: Select all

"kitten; Labrador. Parrot, "

how do i get multiple rows output as comma separated items on one line?

Posted: Fri Mar 09, 2012 2:32 pm
by q123
Hi Aleksey,

Thanks for adding this in. The simple version should suffice for my situation and is a lot easier. Our support team and myself appreciate your efforts. Looking forward to trying it.

Regards
Martin

how do i get multiple rows output as comma separated items on one line?

Posted: Mon Mar 12, 2012 7:30 am
by Alex K.
Hello,
JorisWils wrote:yeah okay.. I explained it incorrectly I think
I mean.... In the complete text being generated... Diffrent delimiters should be used based on a condition.
So I can have dots, kommas and ";" in the complete text.
maybe something like:

Code: Select all

Func.EngineHelper.JoinCollumnContent.AddCondition(CollumnName,ValueToCheck, ColumnToPrint ,delimitor)
...
Unfortunately, but it is a very specific task.
In this case you can create your own fuction in code of report and use it.

Also this function already available in prerelease build from 2012.03.09
Thank you.