locked
Building Custom Reports: sending parameters RRS feed

  • Question

  • I am building a Custom Report that displays all the Leads created/qualified in the last week.

    I can use a prefilter that select only those leads created OR modified in the last seven days. I figured out a way of checking the qualification date by accessing the related contact/account/opportunity creation date, so that is not a problem.

    The problem is that I need to distinguish between the two types of leads, so I check the createdon field and verify it is included in the last seven days. But what happens when the user change the number of days, from 7 let's say to 14?

    Is there a way to get that parameter inside the report?

    Friday, July 5, 2013 9:55 AM

Answers

  • It is possible to parse the parameters passed into the report, though it would be difficult to cope with all possible pre-filters. This is easist to do if you use explicit pre-filtering, as you'll have the corresponding parameter (@CRM_FilteredLead) available in the development environment.

    An alternate option would be create a separate integer parameter on the report, and require the user to set this value when running the report


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Friday, July 5, 2013 10:54 AM
    Moderator
  • If m getting your point, you open your report in BIDS of VS then add parameter like @lastxdays.

    and pass this paramenter value in your query


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Marked as answer by MarcoPierobon Tuesday, July 23, 2013 3:57 PM
    Monday, July 8, 2013 7:45 AM

All replies

  • If your query include CRMAF_ prefix than you will automatecally get the ADvanced Find Filtering form before running report. Like:-

    SELECT name, accountnumber
    FROM FilteredAccount as CRMAF_Account

    As

    lso check:-

    http://blogs.msdn.com/b/crm/archive/2009/03/06/microsoft-dynamics-crm-pre-filtering-tips.aspx



    Regards Faisal

    Friday, July 5, 2013 10:05 AM
  • It was not what I meant.

    I would need to have an integer parameter, for example the number of days.

    Would it be possible?

    Friday, July 5, 2013 10:28 AM
  • It is possible to parse the parameters passed into the report, though it would be difficult to cope with all possible pre-filters. This is easist to do if you use explicit pre-filtering, as you'll have the corresponding parameter (@CRM_FilteredLead) available in the development environment.

    An alternate option would be create a separate integer parameter on the report, and require the user to set this value when running the report


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Friday, July 5, 2013 10:54 AM
    Moderator
  • The second option was the one I was looking for, but I couldn't see the "Parameters" section until you pointed it out!

    Thanks David!

    Monday, July 8, 2013 7:39 AM
  • If m getting your point, you open your report in BIDS of VS then add parameter like @lastxdays.

    and pass this paramenter value in your query


    Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"

    • Marked as answer by MarcoPierobon Tuesday, July 23, 2013 3:57 PM
    Monday, July 8, 2013 7:45 AM