SQL Server Performance

Query Parameter with special characters?

Discussion in 'SQL Server Reporting Services' started by txk, Mar 14, 2008.

  1. txk New Member

    Hi
    I am trying to generate a Report based on a parameter which is fetched from DB. The report is correctly generated for any parameter value which does not have any special character, but fails if the parameter value has a special character like '&' . In such a case, SSRS appends the characters following '&' to the path of the report and tries to fetch report from this path. It then fails with "Path of item not valid" error. I don't understand why it would append the value of QueryParameter to Path of the report and not sure if this happens with only '&' or there are other special characters to look out for.
    Does anyone know of a workaround?
    Thanks
  2. ranjitjain New Member

    I'm not sure how you will do it in SSRS. But in SQL query, while searching a column you need to enclose wildcard characters like _,% in square bracket. so try to put & enclosed in square bracket which might work something like %[&]abc%.
  3. txk New Member

    Hi Ranjit
    Appreciate your suggestion, which I tried out but it did not help.
    The only workaround that I have come up with is to associate an ID to the DB value (containing &) and instead of sending the actual value as Query Parameter, send the ID. Haven't implemented it yet, but I believe it should work.
    Thanks
  4. Adriaan New Member

    I thought special characters on URLs were always represented by stuff like %20% for a blank, and so on.

Share This Page