locked
how to find the query of a new created view in crm 4.0 RRS feed

  • Question

  • Hi all

    I am trying to create some reports with SSRS, i want this report to include Activities, Cases and Contract.

    I have created a new view in CRM 4.0 and i want to find the query of this view, but i am not being able to find this view in database. Can you please help me where can i find this view in database, where it is stored??

     

    Thanks and best regards

    Ernest

    Friday, December 3, 2010 12:09 PM

Answers

All replies

    • Marked as answer by PoErnest Wednesday, December 8, 2010 8:41 AM
    Friday, December 3, 2010 1:44 PM
  • Hi PoErnest,

    Crm Views are stored in the organization database [OrganizationName]_MSCRM:
    You can use this: select * from UserQueryBase

    You have to keep in mind that views are stored as XML in the "FetchXML" atributte.


    Julio
    Friday, December 3, 2010 2:05 PM
  • Hi Julio

    thanks for your post

    Is there anyway for me to get the query of the view that i have created in crm, so i can use this query to build new reports?

    If yes please tell me how can i get it.

    Thank you again

    Ernest

    Friday, December 3, 2010 2:59 PM
  • Hi PoErnest,

    CRM generates FetchXML, you can use this XML in a custom ASP.Net but you cannot use it as query in the report.
    Maybe you can look for some tool that can convert FetchXML to SQL


    Julio
    Friday, December 3, 2010 3:17 PM
  • Thank Edwin, this was correct answer
    Wednesday, December 8, 2010 8:40 AM