ActiveReports Developer 7
CPL Report Loader
See Also Support Forum
ActiveReports Developer 7 > ActiveReports Developer Guide > Samples and Walkthroughs > Samples > Page Report > CPL Samples > Layouts > CPL Report Loader

Glossary Item Box

The CPL Report Loader sample demonstrates how to customize the GrapeCity Unified ReportDesigner application by adding the TreeView control to the form to display a list of categorized reports. At runtime, you can double-click any report to load it into the designer.


ShowSample Location

ShowVisual Basic.NET

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\CPL\Layouts\VB.NET\CPLReportLoader

ShowC#

<User Folder>\ComponentOne Samples\ActiveReports Developer 7\Page Reports\CPL\Layouts\C#\CPLReportLoader

ShowRuntime Features

When you run this sample, the GrapeCity Unified ReportDesigner appears with a list of report categories at the bottom left of the form. Expand each category to view reports under it and double-click any report to load it into the designer. You can also go to the Preview Tab to view the report.

ShowProject Details

ShowReports folder

This folder contain subfolders that are named according to each report category. Each report category contains several reports.

ShowCalendar folder

Showevents.rdlx

This report uses the Calendar control to display events.

ShoweventsTypes.rdlx

This report uses the Calendar control to display Family, Music and Cultural events and the Container controls to set a custom event background color for each event type.

Showvacations.rdlx

This report uses the Calendar control to display employee's vacations.

ShowDashBoard

ShowCallCenterDashBoard.rdlx

This report uses the Bullet control to indicate when the data is approaching or past a warning range and the Sparkline controls to indicate daily trends in key pieces of performance and sales data. It also uses the Icon Set data visualizer to indicate the warning levels for key performance data.

ShowMarketDashBoard.rdlx

This report uses the Sparkline control to display stock price trends over the last 30 days. The sparkline allows investors to see trends without knowing what actual values are associated with each point.

ShowTeamList.rdlx

This report uses drill-through links to navigate to the TeamStatisticsDashboard.rdlx report that displays the selected team statistics.

ShowTeamStatisticsDashboard.rdlx

This report uses the Bullet control to display the team's scoring performance in ranges below average, average and above average. The report also uses the Sparkline controls to display the team statistics. 

ShowFactBook

ShowCountryFacts.rdlx

This report uses the List data region that groups data by Country. The report also contains the map image, which Value property is set to the expression with the MapCode data field from the XML data source.

It contains a hidden parameter that is used to accept the country ID. This report is called in other reports by drill-through links or as a subreport, so the country ID is passed silently. The default ID is the World country.

The dataset has a filter that retrieves only countries, specified by the report parameter.

By each textbox with category under Energy Production / Consumption you can see the Image control that uses the Icon Set function to flag energy categories where consumption is greater than production.

ShowLifeExpectancyByGdpAndMedianAge.rdlx

This report uses the Matrix data region to compare the average life expectancy based on the category where the median age and GDP fall. The Median Age and GDP categories are calculated fields that use the Choose and Switch functions respectively.

ShowTop10CountriesByGDP.rdlx

This report contains the Image control with a database image that uses the Range Bar function to create an ad-hoc horizontal bar chart.

ShowReels

ShowCustomerMailingList.rdlx

This report uses the Container control with the TextBox and Barcode controls. The Columns property of the Body section is set to 3 to create mailing labels.

ShowCustomerOrders.rdlx

This report uses the List and Table data regions that group data by CustomerID and SaleID respectively to display order information. The SalesAmount textbox of the Table has its Value property set to Sum function to calculate the total for each order (as a table group subtotal). The YearTotal textbox of the Table has its Value property set to Sum function to calculate the total with tax for each order as well as the grand total of pre-tax sales.

The Reels logo that is displayed on the report is embedded within the Reels theme.

The page number in the PageHeader section is reset every time a new customer is displayed.

ShowCustomerOrdersCoupon.rdlx

This report demonstrates how to create a coupon where the amount of coupons is determined by the report parameter.

The Reels logo displayed on the report is embedded within the Reels theme.

ShowDistrictReport.rdlx

This report uses the Chart and Matrix data regions to display the number of sold items and the profit for each month of the two year span (2004-2005) for the selected district.

The report parameter determines what district to display and uses the available values from the second report dataset SalesData

The Reels logo that is displayed on the report is embedded within the Reels theme.

The StoreName textbox in the report Body uses the drill-through link (the Action is set to Jump to report) that opens the StoreReport.rdlx with more information.

ShowDistrictSales.rdlx

This report uses the BandedList data region that groups data by SaleYear, DistrictID and RegionID to display district sales details. 

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowFilmography.rdlx

This report uses the nested List data regions that group data by MovieID and MoviePersonID to return a distinct number of movies with the selected actor(s).

The report contains two cascading parameters that narrow down the number of actors displayed in the list. 

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowGenreSales.rdlx

This report uses the Matrix data region to display the units sold for each genre, each year and each quarter. The report also uses the plain column Chart to display the number of titles sold for each genre.

This report uses the multivalue parameter that allows you to select more than one genre for displaying sales data.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowGenreStatistics.rdlx

This report uses the Median and Mode aggregate functions to show the middle value in a set of data as well as the most commonly occurring value.

It also uses the ReelsConfidential.rdlx-master report to provide standard page headers and footers.

ShowMonthlySalesReport.rdlx

This report uses the Table data region that groups data by District. The Textbox controls in the Table have their Value property set to expressions to display the total of sales for each district and region as well as the totals of all districts within a region for a given month.

It also uses the Plain Line Chart with the data grouped and sorted by Day for each SaleDate to display sales and profit for the selected month.

This report uses query based parameters to select the month and region for displaying data.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowMovieReport.rdlx

This report uses four List data regions with groupings. The MovieList is grouped by MovieID, the GenreList is used to display the genre names and is grouped by GenreID, the CrewList is used to display the title and is grouped by CrewTitleID, and finally the CastNameList is used to display the cast and crew and is grouped by MoviePersonID.

This report uses cascading parameters. The first parameter asks to select which letter the movie titles starts with, and then the second parameter asks to select a movie to display. 

The CrewName textbox in the report Body report Body uses the drill-through link (the Action is set to Jump to report) that opens the Filmography.rdlx with more information on the selected person. The parameters of this report are passed to the Filmography.rdlx report. 

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowReelsConfidential.rdlx-master

This master report is a template for other reports. This master report provides the connection to the Reels data source that child reports can use.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowRegionPerformance.rdlx

This report uses the Table data region to display data. The Table uses the Region value to group the report data and the SalesAmount value to sort the report data.  It also uses filtering to filter the report data by the RegionID value. The Sum Textbox controls in the Table have their Value properties set to expressions to display the total of sales amount for each region.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowReorderList.rdlx

This report uses the Table data region without grouping. The Table detail row has its BackgroundColor property set to the expression to create a green bar report.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowSalesByMediaType.rdlx

This report uses the List data region to display data. The List data is grouped by Image.

The List contains the Table data region that groups its data byMediaID.

The report also contains the Plain Column Chart to display sales and profit by media type and embedded images.

This report uses the ReelsConfidential.rdlx-master report to render the report page header and footer.

ShowSalesByRegion.rdlx

This report uses the Matrix data region and subtotals to display the number of units sold and profit for each region by year and quarter. The Matrix report data has the row grouping by Region and the column grouping by SaleDate.Year.

The report also uses the Plain Column Chart to display the annual profit for each region. Data in the Chart is also grouped by Region and SaleDate.Year.

The image in the report PageHeader uses the embedded images from a local image folder.

ShowSalesReceipt.rdlx

This report uses the Table data region and three Container controls nested in the List data region. The List is grouped by SaleID to produce the body of the receipt. The salesTaxLabel and totalSalesTax textboxes use the Sum function that totals the amount due in the list and adds tax to the sum of a field for the grand total due.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowSalesReport.rdlx

This report uses the Table and Chart data regions to display totals of sales and profit for the selected date range. The Table also uses the DataBar function to plot the profits.

The Chart and Table data is grouped by Month and Year. The Month textbox uses the drill through link to display MonthlySalesReport.rdlx with more information on the selected month. 

This report uses parameters that allow the null value to select the range of dates.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowStorePerformance.rdlx

This report identifies stores with profits above or below expectations. The report has two Image controls that display the database images and use the IconSet function.

This report uses the ReelsConfidential.rdlx-master report to render page headers and footers.

ShowStoreReport.rdlx

This report uses the Table and Chart data regions to display sales and profit for each employee.

The Table and Chart data is grouped by EmployeeID. The Table uses the hierarchical grouping to show the relationship between employee and supervisor for each store. The FirstName textbox has its Padding> Left property set to the Level function that leaves space of 15 pixels wide to the left of the control.

This is the drill-down report where the Visibility > Hidden property of the Table detail row is set to =Fields!Supervisor.Value <> 0 and the Visibility > ToggleItem property is set to the FirstName data field. The expression in the Visibility > Hidden property calculates whether the supervisor field returns 0, so only the supervisor's name is initially displayed. By clicking the toggle image next to the supervisor's name, the rows with details about employees are displayed.

The report uses the cascade of parameter values - Region, District and StoreNumber. Each parameter depends on the value of the previous parameter and each comes from a separate dataset.

The Reels logo that is displayed on the report is embedded within the Reels theme.

ShowTopPerformers.rdlx

This report uses two Table data regions to display the top and bottom performers based on the movies sales. Each Table data is grouped by MoviePersonID and MovieID (nested grouping).

The TopN filter is applied to one table and the BottomN filter is applied to another. The number of items returned by each of the filters are specified in report parameters.

This report also uses two integer parameters to alter the number of items displayed in each table. The parameters use default values, which are passed to textboxes of the Table Headers.

This is the drill-down report where the second Table Group Header in each Table has its Visibility > Hidden property set to True and the ToggleItem property set to to the PerformerName textbox. By clicking the toggle image next to the name, the rows containing details about performers are displayed.

ShowUnifiedDesignerForm

This is the main form that appears when you run this sample. This form uses the ToolStripPanel, ToolStripContentPanel, Designer, Toolbox, ReportExplorer, TreeView and PropertyGrid controls to create a customized Unified ReportDesigner.

Right-click the form and select View Code to see how to set the designer and create a blank page report. It also contains code that attaches the Toolbox, ReportExplorer and PropertyGrid controls to the Designer, inserts DropDown items to the ToolStripDropDownItem and sets their functions. Finally, it also contains code that adds the reports to the TreeView control, loads a report into the Designer when the report is double-clicked, and checks for any modifications that have been made to the report in the designer.

See Also

©2014. ComponentOne, a division of GrapeCity. All rights reserved.