locked
Fetch XML SSRS report -- Add dynamic condition through Custom code RRS feed

  • Question

  • Hi,

              Does it possible to insert conditions using Custom code into the Query of a Dataset in the SSRS report.

    For example:

    I've a Fetch which will be having one condition like below

    <condition attribute='ownerid' operator='eq'  uitype='systemuser' value='{6ecbd430-fddf-e111-b7c1-00155d2ee30b}' />

    In a custom code, I'm returning a string like below.

    <condition attribute='new_requestor' operator='eq' uitype='systemuser' value='{6ecbd430-fddf-e111-b7c1-00155d2ee30b}' />

    <condition attribute='new_businessgroup' operator='eq' uitype='new_businessgroup' value='{1fd35737-f141-e311-93fb-00155da65970}' />.

    So I'm trying to insert the result of Custom code into the actual Query I've as an input parameter. But it is not accepting this process and considering only the actual query. Is there any process to achieve this.


    Regards, Syai, Osmosys

    Thursday, November 13, 2014 2:58 PM

Answers

  • Hi Scott, 

    Thanks for the reply. As an workaround for this, now I'm applying the filter on the table level in the SSRS report.

    Regards,

    Syai Reddy D


    Regards, Syai, Osmosys

    • Marked as answer by Syai Monday, November 24, 2014 9:41 AM
    Friday, November 14, 2014 3:35 PM

All replies

  • Hi,

    It is a limitation of the fetch provider that you can't use dynamic fetchxml - instead you need to use parameters.

    You could use an expression to set the parameter and then use in the fetchxml as 

    <condition attribute='new_businessgroup' operator='eq' uitype='new_businessgroup' value='@businessgroupid' />.

    See http://blogs.msdn.com/b/crm/archive/2011/03/18/parameterizing-fetch-based-reports.aspx

    Hope this helps,

    Scott


    Scott Durow
    Blog www.develop1.net    Follow Me
    Rockstar365
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Thursday, November 13, 2014 6:08 PM
    Answerer
  • Hi Scott, 

    Thanks for the reply. As an workaround for this, now I'm applying the filter on the table level in the SSRS report.

    Regards,

    Syai Reddy D


    Regards, Syai, Osmosys

    • Marked as answer by Syai Monday, November 24, 2014 9:41 AM
    Friday, November 14, 2014 3:35 PM