web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to show parameter values based on From date and to date range in ssrs report

(3) ShareShare
ReportReport
Posted on by 275
Hello, im currently developing a custom SSRS Report, i have the following parameters :
  • From Date
  • to Date
  • Customer account
  • Sales order number
  • item id number
first the user needs to select the dates parameter (from date/todate). after that, i need to show the in the customer account lookup the available customers between the date range selected , and not all customers. Same for the sales orders and itemid parameters, they should show records based on date and customer account selection.
 
anyone can provide source code that will can me.
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,390 Super User 2025 Season 2 on at
  • ISDev Profile Picture
    275 on at
     
    this doesnt help my case, it teachs how to develop an ssrs report basic. in my case, my issue is parameter wise only.
  • Martin Dráb Profile Picture
    237,807 Most Valuable Professional on at
    I'm not going to develop it for you, but I can answer some question, if you happen to ask some.
     
    You said you know the basics, but not what you're struggling with. It would be a waste of time to tell you, for example, how to add those five parameters, if you already know that. But you didn't tell us whether you know that or not.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    As per your description, I can understand that you need to filter the customer number, SO number or item number based on the dates provided. 
     
    For this you need a UI builder class, in which you need to give the lookup for each of the said fields by adding the range using the From and To dates.
  • ISDev Profile Picture
    275 on at
     
    i have created all the needed classes including the UI builder,but my issue is i need to filter the customer number, SO number or item number based on the dates provided. thats what im currently working on and facing issues.
     
  • Martin Dráb Profile Picture
    237,807 Most Valuable Professional on at
    Okay, so what problem do you have with it? Your code shows that you already know how to use query ranges.
     
    Note that I don't know what field you want to use to filter customers and items by date. Do you? If not, then you're not yet in a position to write any code; you need to think about your business requirements to decide which field to use (if there is any), which field to create and populate (if it doesn't exist yet) or maybe you'll find that the idea is wrong and you shouldn't do that.
     
    Regarding sales orders, there are a few date (or date/time) fields, such as CreatedDateTime. You may want to use queryRange() method for the filter value (but it depends on how exactly the filter should work).
  • ISDev Profile Picture
    275 on at
    Hi martin,
     
     i just need help in the query that it should show values based on the FromDate and toDate parameters and not all records. only records selected in the date range. thats it,
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    You need to add ranges in your code for query. This helps in filtering. The field on which you need to add filter depends on your business requirement where as it can be on the CreatedDateTime in most cases or may be some custom field. If you need any help how to add range in code, we are ready to help you.
  • ISDev Profile Picture
    275 on at
     
    thanks for ur help.
    the range should be on the custom field named ETD in the custom table SaleslineTrans table. because the fromdate and todate parameters are based on the ETD field. so if u can help me with the code, i will be thankful. thanks
  • Suggested answer
    Martin Dráb Profile Picture
    237,807 Most Valuable Professional on at
    As I said, what code you need to write depends on your requirements (unknown to us), one of the options is using queryRange() method for the range value. For example:
    salesLineTransQbds.addRange(fieldNum(SalesLineTrans, Etd)).value(queryRange(fromDate, toDate));
    It's just strange that you're now talking about SalesLineTrans, while your original requirement was filtering customers, sales orders and items instead.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans