3

I wrote a datamethod for my SSRS report as seen below. I created a parameter called county and it is working fine.

When I tried to change the multivalue property of the parameter to true it stopped working.

I realized I need an array to do that String [] but I do not know what to change.

Can anyone help me? I also need to add more parameters. An example would be great.

public static System.Data.DataTable GetContactList(String County)
{
    var ranges = new Dictionary<string, object>
    {
      {"ContactPerson.1.County", County}
    };
    var dt = Microsoft.Dynamics.Framework.Reports.AxQuery.ExecuteQuery("Select   ContactPerson.1.Name, ContactPerson.1.County from Contactsquery", ranges);
    return dt;
}
hagi
  • 99
  • 3
  • 10

1 Answers1

2

Have you seen this blogpost: http://www.axepclipboard.com/?p=198

Notice the AllowBlank is False, and the method returns an array:

public static System.Data.DataTable GetContactList(string[] _county){
    var ranges = new Dictionary<string, object>
    {
      {"ContactPerson.1.County", _county}
    };
    var dt = Microsoft.Dynamics.Framework.Reports.AxQuery.ExecuteQuery("Select   ContactPerson.1.Name, ContactPerson.1.County from Contactsquery", ranges);
    return dt;
}

Hope this helps!

Skaue
  • 763
  • 4
  • 13