Microsoft Certified Partner : Microsoft Dynamics CRM
You are at Blog
 
QoS-IT Blog - Latest Articles
Sep8

Written by:Kbase Q-Service
9/8/2010 11:07 AM 

  1. Open Visual Studio 2008.
    You may be prompted to select your Default set of settings. You may select any option you wish here.
  2. Select File –> New Project from the drop down menus.

    image
     
  3. Select Business Intelligence Projects from the Project types list.
  4. Select Report Server Project
  5. Enter a name and location for your project.
  6. Click OK when you are done.
  7. On the right hand side you will find the solution explorer. This area will list the reports currently in your project and allow you to add\create new ones.

    image
     
  8. Right click on project name (in this case “MyReports”). From here you can do two things.
    1. Add –> New Item : Create a new report from scratch.
    2. Add –> Existing : Add an existing report to the project. Use this when downloading and editing existing reports from Microsoft CRM.
  9. For the purposes of this tutorial we will create a new report so select Add –> New Item

     image
     
  10. Select Report from the installed templates. and enter a name for the report in the area provided.
  11. Click Add
  12. A blank report with that name will be created and added to the project.

    image
     
  13. To begin creating our report we firstly need to connect to the sql server.
  14. Select View from the Visual Studio drop down menus and click Report Data.
  15. The Report Data pane will pop up. Click the Pin icon on the top right hand corner of the pane to fix it to your visual studio window.
  16. Click New –> Data Source.

     image
  17. The Data Source properties dialog will appear. Click Edit to open the Connection Properties Dialog. 

    image
     
  18. Enter the server name (and instance) or select it from the drop down list.
  19. You should be connecting over Windows Authentication but if its necessary select SQL Server Authentication.
  20. Select or enter a database name.
    Your CRM database name will be in the format OrganizaionName_MSCRM.
  21. Click Test Connection to confirm all details are correct. If so then click OK.
  22. Optional: You may give the Data Source a name by entering one into the name box.
  23. Click OK again to accept the Data Source properties.
  24. A Data Source item with the name eg: DataSource1 will appear in the Report Data pane
  25. Right click this and select Add DataSet
  26. Optional: Enter a name for the DataSet by entering one into the name box.
  27. Click Query Designer to create your sql statement.
  28. If the designer does not look like the screen below then click the “Edit as Text” button on the top left hand corner.

     image

    This tool will allow you to retrieve the data you require for your report by various means.
    The first section allows you to add and remove tables\views from your query by right clicking in the space.
    The second section once you have added a table will allow you to select columns and define sorting and filters.
    The third is the actual sql statement. You may enter the statement here manual if you so which.
    The fourth and final section will display the retrieved data when you click on the run button (!) on the toolbar.
     
  29. For you purposes we will enter the following SQL Statement.

    SELECT     name
    FROM         FilteredAccount AS CRMAF_FilteredAccount
    ORDER BY name

    This statement will retrieve the name of every account and order it alphabetically.

    NOTE: We use the Filtered views (in this case FilteredAccount)  in place of actual tables as there have been created specifically by Microsoft for this purpose. They collate all entity fields in one table\view and also take security roles into account so as not to display data in the report that a user would not otherwise have elsewhere.
     
  30. Click the ! button and you should see something similar to the screen below.

    image
     
  31. Click OK to accept the query.
  32. Click OK again to create the Dataset.
  33. You will now see the Dataset and its field(s) on the Report Data pane.
  34. To list the accounts in the report we will now need to add a table.
  35. Select View from the Visual Studio drop down menus and click Toolbox.
  36. Double click or drag the table onto the report.
  37. Select View from the Visual Studio drop down menus and click Report Data.
  38. Drag the name field from the Report Data pane onto the first column in the table.
  39. Click the Preview button and you will see the report listing all the accounts in your CRM.
  40. Make sure to save your report before continuing onto publishing your report.

Tags:

3 comment(s) so far...

Re: Step 2 – Setting up Visual Studio for your first report

Will VS 2010 work for this as well

By Mark on  9/14/2010 9:57 AM

Re: Step 2 – Setting up Visual Studio for your first report

Mark,

You will find that sql server setup will install the required version of visual studio regardless.
If you already have the tools in visual studio 2010 they might be a higher version that what your reporting servers supports also.

Thank you
john

By John on  9/14/2010 10:01 AM

Re: Step 2 – Setting up Visual Studio for your first report

I see, I was thinking VS on my Workstation but now I see you mean to use VS that is installed with SQL server. Thank you.

By Mark on  9/15/2010 9:03 AM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Add Comment  Cancel 
Blogs
Calendar
Search
 

 Call to Learn More: 1300-50-68-48
All trademarks are property of their respective owners.

 
Privacy Statement | Terms Of Use | Login | Copyright 2009 by Ask Software Solutions