Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamic Report Does not work

(0) ShareShare
ReportReport
Posted on by 452

Hi there all experts.
I have created a custom entity named new_serviceds.
It has  N:1 relation with quote and sales order, which means every quote can has an number of new_serviceds records,so sales order can have.
I have created a report based on the filteredview.
When I try the record without filteredview in the MS SQL server it works fine and return the result set.
It is the query without filteredview :

 select new_serviceds.new_service_name, new_serviceds.new_estimated_day,
 new_serviceds.new_estimated_amt from new_serviceds
 inner join SalesOrder on (salesorder.QuoteId=new_serviceds.new_arvand_service_to_quoteId)
 where salesorder.SalesOrderId='xxxx-xxxxx-xxxxx-xxxxxx-xxxx';


the query works fine in sql server query.
I wanna run this report in the sales order record, in each record it returns me the result set.
Here is with the filtered view  :

 select  Filterednew_serviceds.new_service_name, 
 Filterednew_serviceds.new_estimated_amt, Filterednew_serviceds.new_estimated_day 
 from filterednew_serviceds
  inner join filteredsalesorder on
   (Filterednew_serviceds.new_service_to_quoteId = filteredsalesorder.QuoteId)
  where Filteredsalesorder.SalesOrderId = (@CRM_SalesOrderId) ;

And here is the query that returns CRM_SalesOrderId :

SELECT  salesorderid
FROM   FilteredSalesOrder AS CRMAF_SalesOrderId;



But with out the filtered view in the sql server management, the query return result.
Where I am doing wrong?

*This post is locked for comments

  • Verified answer
    gupta.ambar2009@gmail.com Profile Picture
    797 on at

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
dkrishna Profile Picture

dkrishna 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans