The Reports Gallery sample demonstrates how to customize the End User Designer application by adding the TreeView control to display a list of categorized reports. At run time, the user can double-click any report out of the three categories: Page, Rdl, and Section, and load it into the designer.
Visual Basic.NET
<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\DesignerPro\ReportsGallery\VB.NET
C#
<User Folder>\Documents\GrapeCity Samples\ActiveReports 13\DesignerPro\ReportsGallery\C#
When you run this sample, the End User Designer appears with a list of report categories at the bottom left of the Form. Expand each category to view the 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.
This is the main form that appears when you run this sample. This form uses the ToolStripPanel, ToolStripContentPanel, Designer, Toolbox, ReportExplorer, TreeView, PropertyGrid and LayerList controls to create a customized unified ReportDesigner.
Right-click the Form and select View Code to see how to set up the designer and create a blank page report. It also contains code that attaches the Toolbox, ReportExplorer, PropertyGrid and LayerList 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.
Reports folder consists of three subfolders - Page Report, RDL Report and Section Report, each containing a set of reports that highlight the major features of the corresponding report types.
This folder contains several subfolders that illustrate the use of Page Reports in different scenarios.
DrillDown
Invoice folder
BillingInvoice report: This report uses the NWind shared data source. It showcases a billing invoice layout commonly used in convenience stores. The report mostly contains Label, TextBox and Line controls in its layout. It also includes an EAN128FNC1 barcode due to its high reading accuracy.
Invoice1 report: This report uses the NWind shared data source. It includes a BandedList and few TextBox controls to create the Invoice layout for displaying customer transactions. Both the page and the BandedList control are grouped by the OrderID field. One of the text boxes in the footer section of the BandedList control uses the Sum function to display the grand total of all transactions.
Invoice2 report: This report uses the NWind shared data source. It uses a Table, few TextBoxes and Shape controls to create the Invoice layout for displaying customer transactions. The report page is grouped by the CustomerID field, therefore all transactions made by a customer appear together based on the ID. One of the text boxes placed inside the Container control at the bottom of the report uses the Sum function to display the grand total of all transactions.
Invoice_Grouped report: This report uses the NWind shared data source. It uses the Table, few TextBox and Label controls to display customer transactions in an Invoice. The data is grouped on the CustomerID field, so that all transactions made by a customer appear together based on their ID.
Invoice_Parameters report: This report uses the NWind shared data source connection and two datasets to provide data. It is similar to the Invoice_Grouped report with an additional parameters feature. It uses parameters set on the CompanyName field to filter data on report preview.
Other
BarCode report: This report demonstrates all barcode types that are supported by ActiveReports. The barcode types are presented in the Table data region, using a single page layout. The rows of the table use alternate background colors (grey and white). At run time, the Barcode report displays one page that fits the table with all the sample barcodes.
Catalog report: This report uses the NWind shared data source. It shows a multi page layout spread over four pages in the report. The layout in Page1 and Page2 contains Image, Label and Textbox controls to display introductory text. The layout on Page3 contains a List data region with TextBox controls and a Table to display product details for each product category. The List is grouped by the CategoryID field to filter products by their category and its FixedSize property is set to fit in excess data. The layout on Page4 (that appears as page 9 at run time) uses Textbox, Shape and Line controls amongst others to create an Order Form, which a user is to fill manually.
CellMerging report: This report uses the NWind shared data source. This report demonstrates cell merging in Tablix data region, where cells with same values are merged automatically to avoid showing duplicate values. The row group area contains three groups that are nested in a parent/child relationship to display the row group data. The Country (parent) and City group (child) values are merged automatically to remove duplicate data values.
DeliverySlip_theme report: This report uses the Seikyu2 shared data source. It uses the TextBox, Label, Container controls and two Table data regions to display the invoice information. The report uses two themes and has its CollateBy property set to ValueIndex to determine the order in which the report pages are rendered. Some TextBox controls on the report also use the Sum function to display the total price information for each Invoice. The page is grouped on the EstimateID field, so the invoices are sorted by EstimateID.
EmployeeSales report: This report uses the NWind shared data source. It contains the Chart and Table data regions to display sales by each employee for the year 1997. A column chart shows the graphical representation of sales by each employee while the Table lists down the exact sales figures. One of the TextBox controls on the report also uses the Sum function to display the grand total of all sales.
Enterprise Reports - Marketing Plan Data: This report displays information for the Marketing Plan. The report contains embedded XML data. Table, TextBox, Line, Image, and Shape controls are used to display data. The status of each task is represented through color coding using expressions.
IRS-W4 report: This report uses the IRS XML data source to provide data to the report. It mainly contains Textbox, CheckBox, Shape and Line controls to create the layout of a tax form used in the US.
Letter report: This report uses the NWind shared data source. It contains an Image, FormattedTextBox, Table and an OverflowPlaceholder controls to create a layout for a letter. The FormattedTextBox control uses text with HTML tags to display content. The Table displays OrderID with order dates and order amount and is linked with the OverflowPlaceholder control to display excess data on the same page. The Reels logo, displayed on the report inside the Image control, is embedded within the Reels theme and the TextBox placed below the Image control uses a Global expression to display the current date. The layout page is grouped by the CustomerID field to filter data on each report page according to individual customers.
MyOrdersReport: This report uses MyOrders.csv as a data source to demonstrate the native support for CSV data providers. It contains a Table data region that displays orders with data fetched from the CSV data source.
PurchaseReport: This report uses the NWind shared data source. It contains the Textbox and Table controls to display purchase details for each company. The layout page is grouped by the Company_CD field to filter data on each report page according to the company. The Textbox control placed below each table column uses the Sum function to display totals. The FixedSize property of the Table is set to fit in excess data.
ReelsTablix report: This report uses the Reels shared data source. It contains the Tablix data region to display a sales report for each country, city and media type by year. The Tablix data region uses row grouping to group the data by Country, City and MediaType, and column grouping to group the data by Years and Quarters.
ResourceConsumptionByYear report: This report uses MostPopulatedCountriesEnergyUsageByYear shared data source. It illustrates composite charts by using a Chart data region that shows annual Natural Resource Consumption - Oil and Electricity - versus Population size. Natural Resource Consumption and Population size are plotted on the two Y axes represented by two different chart types - Column and Line. The report also contains a parameter which lets users choose the country for which they want to view the data.
SalesReport: This report uses the Reels data source connection and two datasets that fetch data through a Stored Procedure. The layout of the report uses the Chart to display sales and profit for the selected date range and the Table to display the numeric values of the same. The table also uses the DataBar function to plot profits graphically. The Reels logo, displayed on the report inside the Image control, is embedded within the Reels theme. This report also uses two nullable parameters to select the range of dates.
TablixSample report: This report uses the NWind shared data source. It contains the Tablix data region that displays an orders report with product category and names showing quarterly and yearly orders. The Tablix uses a nested row grouping to group the Tablix data region by CategoryName and ProductName, and nested column grouping to group the Tablix data region by Years and Quarter. The tablix body area displays the aggregate Sum for each category and the grand total of order amount.
TackSeal report: This report uses the NWind shared data source. It contains the OverflowPlaceholder control and the List data region to create a columnar display of tack seals with postal barcodes. The List data region has its OverflowName property set to OverflowPlaceHolder1 and the OverflowPlaceHolder1 control has its OverflowName property set to OverflowPlaceHolder2 to assure correct display of columnar data display within the report page.
This folder contains several subfolders that illustrate the use of RDL Reports in different scenarios.
Dashboard
CallCenterDashBoard report: This report uses the CallCenter shared data source. It contains 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.
MarketDashBoard report: This report uses the MarketData shared data source. It contains 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.
TeamList report: This report uses the FootballStatistics shared data source. It contains the List control that displays a list of team names with drill-through links to navigate to the TeamStatisticsDashboard.rdlx report that displays the selected team's statistics.
SalesDashboard report: This report uses the SalesResult shared data source. It consists of two datasets to display multiple Chart controls and a Tablix data region to visualize the sales performance data. This report illustrates the Galley-mode feature where all of the report contents can be previewed in a single scrollable page.
Factbook
CountryFacts report: This report uses the Factbook shared data source. It contains a List data region grouped on CountryID that groups data by Country. The report also contains a map image whose 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. The dataset has a filter that retrieves only countries, specified by the report parameter. From each textbox with category under Energy Production / Consumption you can see the Image control that uses the Icon Set data visualizer to flag energy categories where consumption is greater than production.
LifeExpectancyByGdpAndMedianAge report: This report uses the Factbook shared data source. It contains the Tablix data region to compare the average life expectancy based on the category where the Median age and GDP fall. The tablix data region consist of a row group GDP of country and a column group Median Age to display the data.
Top10CountriesByGdp report: This report uses the FactbookSortedByGdp shared data source and shows the Top 10 countries by GDP. It contains a List data region with an image in the Image control that uses the RangeBar function to create an ad-hoc horizontal bar chart.
Reels
Others
AnnualPortfolioChart report: This report uses the MostPopulatedCountriesEnergyUsageByYear shared data source. It illustrates composite charts by using a Chart data region that shows Annual Stock Performance. The Trading Volume and Trading Value are plotted on two Y axes represented by two different chart types, Column and Line.
Financial Reports - BalanceSheetReport: This report displays the company’s assets and liabilities. The report contains embedded JSON data. Table, Textbox, and Image controls are used to display data. The total assets and liabilities are calculated using expressions.
Financial Reports - CashFlowReport: This report displays the company’s cash flow. The report contains embedded JSON data. Table, Textbox, Line, Image, and Shape controls are used to display data. The VB code in the script transforms the numerical values in the accounting format.
Financial Reports - IncomeStatementReport: This report displays the income statement for the Year End (December 2017). The report contains embedded JSON data. Table, Textbox, and Image controls are used to display data. The net income and total revenue are calculated using expressions.
Financial Reports - IncomeStatementReport2: This report displays the company’s sales and expenses. The report contains embedded JSON data. Table, Textbox, Image, and Shape controls are used to display data. Total sales, Gross profit, and Net profit are calculated using expressions.
Flight On-time Performance Report: This report shows on-time performance of US airlines. The report uses nested data regions bound to different datasets from the following data sources:
The controls that are included in this report are List, Container, Table, and Tablix, where Container, Table, and Tablix are nested inside List. These controls show data as described below:
The mapping for 'DataSet Joins' is created by adding a filter in Table on Region fields. This lists the flight information in Table control that flew in a particular region displayed in the List.
Medical Reports - BloodTestReport: This report displays the patient’s blood test results. The report contains embedded XML data. Table, Textbox, and Image controls are used to display data. Results and Reference Intervals are calculated using expressions.
Medical Reports - PatientDiseaseSummaryReport: This report displays a summary of the patient’s diseases and allergies. The report contains embedded JSON data. Table, Textbox, and Image controls are used to display data.
Telecom Reports - TelephoneBillSample: This report displays the company’s telephone bill. The report contains embedded XML data. Table, Checkbox, Image, and Textbox controls are used to display data. Expressions are used to calculate totals.
BarCode report: This report displays all barcode types that are supported by ActiveReports.
Invoice1 report: This report calculates the total amount for each customer along with purchase details. The report also displays the average of the previous invoice amount, the current invoice amount and the consumption tax. This report uses Bill.mdb database to provide data.
Invoice2 report: This report shows another invoice layout and uses Seikyu2.mdb database to provide data.
LabelReport: This report displays the tack seal, which is commonly used in postal services. This multi-column report uses the customer barcode that is bound to data by using the DataField property. This report uses Nwind.mdb database to provide data.
PaymentSlip Report: The report displays the salary payment slip where the EAN128FNC1 barcode is used for barcode bound to a data field. This report uses Bill.mdb data source connection to provide data.
PurchaseOrder report: The report displays purchase slips created with bound data. It groups data for each purchase slip. The detail count is not fixed but the number of rows in the report layout is fixed. In this case, when the RepeatToFill property of the Detail section is set to True, the detail data is repeatedly displayed on the entire page. The report uses the RepeatToFill property and calculated fields to demonstrate how to create the report layout without any code. Calculated fields are used to calculate the total cost and the total selling price. This report uses Shiire.mdb data source.
Schedule report: The sample report displays the weekly schedule of employees in the gantt chart format. The report displays six day report schedules on a single page in the Viewer control. This report uses Schedule.mdb database to provide data.
You can adjust the width of horizontal bars by setting calculated values from the time width in the Tag property of the Label control within Detail_Format event. For the horizontal adjustment of bars, change the width of the Label control to match with the value in the Tag property.
UnderlayNext report: This report displays the bound data. It uses Nwind.mdb database to provide data.