Tech Off Thread

1 post

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

How to Set MultiValue Parameters with ReportingServiceExecution

Back to Forum: Tech Off
  • User profile image
    levalencia

    I need to send a multivalue parameter, any ideas?? this is the code that I actually have,


    the full post is here
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=470509&SiteID=1




    StringBuilder selectected = new StringBuilder();

    int TiposCompetenciasSeleccionadas = 0;

    ArrayList al = new ArrayList();

    for (int i = 0; i < CheckBoxList1.Items.Count; i++)

    {

    if (CheckBoxList1.ItemsIdea.Selected)

    {

    selectected.Append(CheckBoxList1.SelectedValue);

    selectected.Append(",");

    al.Add(CheckBoxList1.SelectedValue);

    TiposCompetenciasSeleccionadas++;

    }

    }

    ParameterValue[] parametros = new ParameterValue[2 + TiposCompetenciasSeleccionadas] { pNmEmpresa, pNmCiclo };

     

    for (int i = 0; i < parametros.Length; i++)

    {

    parametros[i+2].Name ="NmTipoCompetencia";

    parametros[i+2].Value = al[i];

    }

     

     

    string[] nmtiposcompetencia = selectected.ToString().Split(new char[] { ',' });

     

     

    rs.SetExecutionParameters(parametros, null);

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.