1

I am new to SSRS. I use SSRS to access a remote data source. I can use the interface shown below to build and execute queries and produce reports:

enter image description here

Is there a way to build a report by specifying the SQL directly rather than using the graphical tools. I have spent some time Googling this and I have gone through a few tutorials. I am unable to find an answer.

1

1 Answer 1

2

Click the Edit as Text button in the top left-hand corner of that window and have at it.

SSRS Query Designer

Edit If you are only seeing XML in the query window, then you are using a Report Model data source instead of a direct database connection. Models cannot be queried directly with SQL.

In order to query with SQL, setup a Data Source using a connection string that points directly your database.

3
  • @w0051977 Then you're building a query off of a Report Model data source instead of a direct database connection. Models cannot be queried directly with SQL.
    – Bryan
    Mar 4, 2013 at 16:45
  • Thanks, +1. @Bluefeet provided a link: msdn.microsoft.com/en-us/library/ms345246(v=sql.90).aspx. Please confirm that these will not work with a Report Model. Then I will be able to mark this question as answered.
    – w0051977
    Mar 4, 2013 at 16:50
  • @w0051977 Bluefeet's link is good, but he was operating under the same assumption I was when I posted the answer. If you look further down on that page, the Report Model Query Designer is all you're able to work with, given the model data source. Report Models cannot be directly queried with SQL.
    – Bryan
    Mar 4, 2013 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.