Databases Reference
In-Depth Information
The second method is a simple variation on the first. Add another report to the project and change the
Jump to report action for the text box in the first report to the second report. The target report also con-
tains the same parameters that were defined for the first report. The only difference is that there is no
need to define parameter lists for either parameter. Figure 7-65 shows a simple report used to display the
results of a simple update query.
Figure 7-65
The data set for this report is simply the update script from the first section of the stored procedure:
IF @PriceIncrease <> 0
BEGIN
UPDATE Production.Product SET ListPrice =
ListPrice + (ListPrice * @PriceIncrease/100)
WHERE ProductSubCategoryID = @ProductSubCategoryID
END
The data set for the first report is only the SELECT statement (everything under the --Return
Products label). The target report now performs the update when it renders and displays a simple mes-
sage using the parameter values passed from the first report.
Consider using the next example with this method as a means to select a list of products and then
update the prices only for the selected products.
Selected and Deselected Item List
A check box list is a universal metaphor for managing a list of selected and unselected items. Images
may be used to create checked and unchecked boxes that are used to toggle the state of each item on
the list.
What you'll need:
A report parameter used to pass data values into a query expression.
A query expression used to match selected key values with existing keys in the report data set.
Report item(s) with an action expression used to pass parameter values back to the report.
Expressions used to modify images or text to indicate selected and deselected rows.
Search WWH ::




Custom Search