Databases Reference
In-Depth Information
6.
Replace the preceding expression by the following code. This is needed
for the BMP files to display without an error:
=System.Convert.FromBase64String(Mid(System.Convert.
ToBase64String(Fields!Picture.Value),105))
7.
Click on OK in the Expression builder tool and OK on the Image
Properties page.
8.
The report now appears as shown. The other changes are cosmetic,
that you can do from report properties or using the ribbon.
9. Remember, in QryCTG we used a Parameter1 parameter (you will see this
when you click the Parameters node under Report Data of this report). If we
run the report it would run, but then we would have to supply the parameter
each time. What we need is a drop-down pick-list.
10. For this purpose we create another dataset, named Dataset1 , which uses the
same data source DataSourceMain as the main report, but the embedded
query uses the following statement and returns just one field:
Select CategoryID FROM Categories;
11. Run the report and verify that it works and displays the images as well.
12. Save the report as Subrep .
Embedding the subreport in the main report
Now we have two reports: the ProductsSubReport and the Subrep report. We will
embed ProductsSubReport in the Subrep report. There are different ways you can
place the subreport in a report as described in Chapter 6 , Working with the Report
Builder , of the irst edition of this topic. Briely, the subreport can be a part of the
main report designed to be of List type; the subreport can occupy one of the cells
in a table type report, or it can be placed apart from the main report.
 
Search WWH ::




Custom Search