Clarity

  • 1.  Use of parameters composed by multiple values from Clarity to Crystal Repo

    Posted May 07, 2010 01:06 AM
    I`m trying to pass a parameter  composed by multiple values from Clarity to Crystal Reports (BO) and the report doesn't work.     If I select a unique value the report works fine, but if I select two or more values from a lookup with Multiple-select that I'm sending to Crystal Reports (BO) the report doesn't work.        I don't know exactly what are happening, becouse following the documentation all must be ok. I have set Value List like Dynamic, and like option Let Multiple-values.      


  • 2.  RE: Use of parameters composed by multiple values from Clarity to Crystal R
    Best Answer

    Posted May 28, 2010 05:04 PM
    Here is an example of how to use a Multi-Value Parameter within the Record Section Formula.

    ( IF {?ivc_ForumID} <> "" THEN {Command.FORUM1ID} IN {?ivc_ForumID} ELSE TRUE )

    The if statement checks if no values were returned or selected within Clarity.


  • 3.  RE: Use of parameters composed by multiple values from Clarity to Crystal R

    Posted Jun 10, 2010 12:41 PM
    Thanks a lot, but the problem continues. It's very strange becouse when you run the report from Crystal Reports Designer it works fine. When I try to run it from Clarity Reports and Jobs section, it doesn't work fine.

    It must works fine from both environments. I think that I must not to ask for the value of the item, becouse the item has a value list that is passed like a multi-value parameter.


  • 4.  RE: Use of parameters composed by multiple values from Clarity to Crystal R

    Posted Jan 25, 2011 08:33 PM
    Anyone found solution for this problem?
    If yes please let us know.


  • 5.  RE: Use of parameters composed by multiple values from Clarity to Crystal R

    Posted Jan 27, 2011 08:00 PM
    I found the way to use Multi select Clarity report parameter in Crystal report

    Create a parameter in Crystal report with "Allow Multiple values" set to True in parameter properties

    Create a DB function to split string
    create or replace type split_number_tbl as table of number;

    create or replace function split_numbers
    (
    p_list varchar2,
    p_del varchar2 := ','
    ) return split_number_tbl pipelined
    is
    l_idx pls_integer;
    l_list varchar2(32767) := replace(replace(p_list,'(',''),')','');
    l_value varchar2(32767);
    begin
    loop
    l_idx := instr(l_list,p_del);
    if l_idx > 0 then
    pipe row(substr(l_list,1,l_idx-1));
    l_list := substr(l_list,l_idx+length(p_del));
    else
    pipe row(to_number(l_list));
    exit;
    end if;
    end loop;
    return;
    end split_numbers;
    /


    In crystal report the query should be like this
    select id,code,name
    from inv_investments
    where id in (select * from table(split_numbers('{?param_project}',',') ) )

    I did this for numbers list, you can do similar for list of characters.

    Enjoy.