After I hook up a datasource with a stored procedure, I
run the query and expect the fields box to populate with
the retun query columns. This does not happen. Are there
certain conditions that the query has to meet for SQL RS
to do this, for example, does the query have to return a
permanent table?
Thanks,Yes.
For your query, in order to update the fields list, you will need to click
on the "Refresh Fields" button in the Data Set toolbar in Data View.
The report designer has two methods available to update the fields list.
1. Automatic (fast, low-cost): The Schema is queried by calling
IDbCommand.ExecuteReader(SchemaOnly), which returns schema information
without executing the query (parameter values are not needed). This method
is automatically invoked when you switch from Data to Layout View. It is
fast because the query doesn't have to be executed. However, there are
queries whose schemas can only be discovered by running the query. The
queries which don't return a schema include stored procedures that either
use dynamic SQL or use temporary tables. Most SQL command text and stored
procedure calls with a fixed schema work fine here.
2. Manual (slow, higher-cost): The schema is queried by calling
IDbCommand.ExecuteReader(SingleResult), which executes the query returning
the 1st row and also schema information. This method is invoked when you
click on the "Refresh Fields" button in the Data View (query designer). For
stored procedures, this method requires asking the user for sample parameter
values and then running the query with those values.
--
Jerry Povse
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"stevec" <anonymous@.discussions.microsoft.com> wrote in message
news:27dae01c4635a$b1d41810$a301280a@.phx.gbl...
> After I hook up a datasource with a stored procedure, I
> run the query and expect the fields box to populate with
> the retun query columns. This does not happen. Are there
> certain conditions that the query has to meet for SQL RS
> to do this, for example, does the query have to return a
> permanent table?
> Thanks,
No comments:
Post a Comment