dimecres, 21 de novembre del 2012

How to filter a report using a comma-separated string entered in a text box

In some cases, a more efficient way to pass multiple text strings to a parameter in a report is to enter comma separated values such as, "Camping Equipment, Mountaineering Equipment, Golf Equipment" rather than entering each value and hitting the "Insert" button in a multi-select text box prompt.
There is no direct way to have a
text box prompt handle a comma-separated value string, but we can create this behaviour by using some query macro functions.

Use this expression if the values users will be entering have spaces in them. Note that the report will not filter correctly if users put spaces between the comma-separated values (ie. "Fax, Telephone" instead of "Fax,Telephone"):
[Data Item to be Filtered] in (#csv( split(',', prompt('Parameter', 'token') ) )#)

1 comentari:

  1. Cognos Online Training| Cognos10 Online Training| Cognos BI Training

    www.Monstercourses.com/cognos

    ResponElimina