GrapeCity - · PDF fileGrapeCity ActiveReports 6 ... deploy on IIS, send it to your clients...

22
GrapeCity ActiveReports 6 FAQ | 1 ActiveReports 6 FAQ How to License ActiveReports 6 projects How to License ActiveReports 6. The Differences between Standard and Professional Editions of ActiveReports for .NET How to License ActiveReports for .NET How many licenses should I purchase? WebViewer Stays on Last Viewed Page Number of Previously Displayed Report Using Custom Paper Sizes Page Numbering and Group Page Numbering How Do I Use Grouping With ActiveReports for .NET? Using Relationships with SubReports How Can I Use the Excel Export Object's Properties? HOWTO: Using Stored Procedures With Parameters Using Parameters in ActiveReports for .NET

Transcript of GrapeCity - · PDF fileGrapeCity ActiveReports 6 ... deploy on IIS, send it to your clients...

GrapeCity

ActiveReports 6 FAQ  | 1  

ActiveReports 6 FAQ  

• How to License ActiveReports 6 projects 

• How to License ActiveReports 6.  

• The Differences between Standard and Professional Editions of ActiveReports 

for .NET 

• How to License ActiveReports for .NET 

• How many licenses should I purchase? 

• WebViewer Stays on Last Viewed Page Number of Previously Displayed Report 

• Using Custom Paper Sizes 

• Page Numbering and Group Page Numbering 

• How Do I Use Grouping With ActiveReports for .NET? 

• Using Relationships with SubReports 

• How Can I Use the Excel Export Object's Properties? 

• HOWTO: Using Stored Procedures With Parameters 

• Using Parameters in ActiveReports for .NET 

 

   

GrapeCity

ActiveReports 6 FAQ  | 2  

How to license ActiveReports 6 projects  

ActiveReports 6 uses standard .NET paradigm for licensing and deploying applications containing ActiveReports 6 reports..   

• How to license ActiveReports 6 on your machine: o Documentation o KB article 

• ActiveReports 6 License Agreement for usage and distribution of ActiveReports assemblies and files. 

ActiveReports 6 can be designed in a Windows Forms, Web Application and Website projectd in Visual Studio.  It uses the standard licensing methodologies as provided through Visual Studio and the .NET framework and API.  Windows Forms projects:  In a Windows Forms project in Visual Studio, add ActiveReports 6 template from "Add New Item" to the project. If the machine is licensed, a license.licx file, if not present already, is created in the project. You will see one line, containing information about type, Assembly, Version, PublicKeyToken (in that order). Here is an example: 

• DataDynamics.ActiveReports.ActiveReport, ActiveReports6, Version=6.0.1000.0, Culture=neutral, PublicKeyToken=cc4967777c49a3ff 

Few other things: 

• Make sure that version information for the ActiveReports6 dll is correct in case you upgraded to a hotfix or service pack.  

• There might be other listings in the licenses.licx if you are using other licensed components in your project.  

• Make sure the "Build Action" on licenses.licx is set to "Embedded Resource".  o Select the licenses.licx file in solution explorer and look at the properties. 

First property listed is "Build Action" 

At this time, you design your reports, compile the application, run the reports and the red evaluation banner is gone from the bottom of each page in the report's document.  Embed license: To make sure license is embedded in the executable, "Rebuild" (Alt+Shift+B+R") the solution on your machine. If you don't have reflector, download it from here. Open the executable in reflector, expand the node for your application and you will see a file named MyApp.exe.licenses ("MyApp" being the project name) embedded under "Resources". If you double click on it in the reflector, you can also see some textual 

GrapeCity

ActiveReports 6 FAQ  | 3  

information on what is in there.  If you don't see the .licenses under "Resources", something didn't happen right and you will need to re‐build the solution.  How to deploy this application:   Deploying an application means that you will either send the executable to your client or to your customer or move it to a server or some other machine.  Important point to note here is that it will not be run on your machine. Your client's machine does not has ActiveReports 6 installed and you want to make sure that when the application is run from this other machine, reports reder without the red evaluation at the bottom of each page.  Once you have verified that the license has been embedded, you take the executable and the dependencies associated with it, lets say "application" and move it to a server, deploy on IIS, send it to your clients or any other ways you ship it for real works usage.  This is all that needs done when it comes to a windows forms project.  WebApplication projects: Web application projects functions just the same as winform and there is no extra step needed to be done.   Few scenarios that are a little bit different: 

• If your reports are in an external dll, say "MyReports.dll" and this dll is referenced in another project, say "Main.exe" which calls into the reports in this "MyReports.dll", both "MyReports.dll"and "Main.dll" needs licensed.  So the license.licx file in both the projects should contain entry for ActiveReports components. 

• If you are using a build machine to compile these reports and create a setup, you will need to get in touch with GrapeCity, so that we can provide you with appropriate steps and files to have these build machines licensed. 

In addition to the above step, if the build machine doesn't has Visual Studio installed and you are using "msbuild" or "csc" or a third party tool to create the installer containing the executable that has reports, you will need to use lc.exe to create .licenses file and then run csc to emebded license in the executable.    

GrapeCity

ActiveReports 6 FAQ  | 4  

How to license ActiveReports 6  

Licensing in ActiveReports 6 is different from how it is currently done in previous versions of ActiveReports for .Net.  Instead of using license executable, licensing steps are now part of the ActiveReports 6 installer.   

When you run the installer, one of the last screen will present you with a form to enter your "User Name", "Email" and "Serial" in order to get ActiveReports 6 licensed on your machine.  Enter the information that you received in email or mail after purchase of ActiveReports 6.   

Note: If you are installing ActiveReports 6 on Windows Vista, Windows 2003 or 2008 server, then please make sure that you right click on the installer and select ‘Run as Admin’ to run the installer.  Being an admin on the machine is not sufficient. 

• If everything worked fine, a message box with text  ‘License was installed successfully’ is displayed.  It is as simple as that.   

• If a message box with ‘Invalid User Data’ pops up; o Make sure there are no trailing backspaces in any of the three fields. o Make sure input data matches with the data provided in the 

ActiveReports6 purchase confirmation email.  o If above steps doesn't help, contact GrapeCity support team. 

 Email: [email protected]  Phone: 425‐880‐2601/425‐947‐1548 

Few relevant things to keep in mind while going through this process: 

• If you leave these fields blank, product is still installed, however you will see a red evaluation banner on all the reports that you create. 

• Remember that once you have used this information and have successfully licensed your machine, you will need the same information again to re‐license the same machine in case you somehow un‐license the machine or reformatted the hard drive or etcs. 

• Uninstalling the product will remove the licensing information from your machine and will render your machine un‐licensed. 

• It is always advised that you upgrade to the latest build instead of going through uninstall/install.  Running the latest build on top of current one will not remove the licensing information. 

• If you are still unable to get your copy of ActiveReports 6 to license your machine, email [email protected] or call 425‐880‐2601/425‐947‐1548 with your name, email and serial number.  Please do not post any of this information on forum.   

• Please read ActiveReports 6 License Agreement on the usage and distribution of ActiveReports assemblies and files. 

GrapeCity

ActiveReports 6 FAQ  | 5  

 

The Differences between Standard and Professional Editions of ActiveReports for .NET  

ActiveReports 6 Professional Edition includes all of the features of the Standard Edition and supports the following additional features:  End‐User Report Designer for Windows (WinForms) 

•  The End‐User Report Designer control is a run‐time designer that may be distributed royalty free  

• The control allows the ActiveReports designer to be hosted in an application and provides end‐user report editing capabilities.  

• The control's methods and properties provide easy access for saving and loading report layouts, monitoring and controlling the design environment, and customizing the look and feel to the needs of end users. 

 Web Viewer Server‐Side Control 

• The Web Viewer control allows quick viewing of ActiveReports on the web as well as printing capability with the new Flash Report Viewer, HTML viewer and PDF viewer types as supported. 

 HTTP Handlers 

• The RPX HTTP Handler allows the developer to hyper link ActiveReports on a web page to return HTML format or PDF format reports for viewing and/or printing.  

• The Compiled Report HTTPHandler allows the developer to hyper link ActiveReports compiled in an assembly on a web page to return HTML format or PDF format reports for viewing and/or printing. 

 PDF Digital Signatures and Timestamps 

• The well known PDF reporting features of ActiveReports just got even better in the Professional Edition. While exporting .NET reports to PDF, you can now digitally sign your reports with a hidden signature or with visible text and graphics. Personalize your signature using sixteen attributes.  

• Use the signature to validate the report author, and a Certification Level attribute to control user access. Use the new Time Stamp feature to create 

GrapeCity

ActiveReports 6 FAQ  | 6  

third‐party authorized versions of your documents. These features are fully compatible with Adobe's new security guidelines. 

 Redistributable Help for the End User Report Designer 

• You asked for a help file for the End User Report Designer that you could distribute to your end users, and now you've got it.  

• ActiveReports Professional Edition developers can deploy the compiled CHM file and PDF file out of the box or use the included Innovasys HelpStudio 3 User Guide project to customize it and compile your own CHM or PDF file. (Requires HelpStudio version 3.) 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 7  

How to license ActiveReports for .NET 

Note: This article is not applicable to ActiveReports 6.  Please see this page for ActiveReports 6 license related questions: How to License ActiveReports 6 

Licensing the machine for ActiveReports for .NET     1. Locate the original downloaded electronic store package or shipped CD.        2. Locate the licensing application based on the edition          a. Standard Edition: License.Exe          b. Professional Edition: LicensePro.Exe    3. Run the machine licensing executable you located in the above step.     4. Enter the information as prompted (User Name, Company Name) without commas or periods. (The keys in the web.config file are comma delimited and entering a comma will cause errors.)    5. Determine whether your project is a Windows Forms Solution or a Web Form Solution. Visit the appropriate section below.  All Projects    1. License the ActiveReports using the SetLicense method.                a. Create a "web.config" key by running the "Create Web.Config Key" described in the Web Forms section.           b. In your application class, create a report instance and use the SetLicense() method to properly set the key you created from Step A. The string value for the generated key should be "[Name], [Company Name], [Serial Number], [Hash Code]".           c. Note: Earlier versions of ActiveReports do not contain this licensing option. To insure this option is available please download the latest version of the product.   Windows Forms Projects Only     Please note the above steps will license your machine for new Windows Forms projects only. If you have an existing Windows Forms project, you will need to open the project after performing the steps above and rebuild the solution. This will work unless you project is a special solution as listed below.  

   1. If the project does not have a licenses.licx file in the startup project, you will need to add one with one of these methods:              a. Add a temporary ActiveReport to the startup project and rebuild the entire solution from the build menu.             b. Copy the licenses.licx from the project containing the reports to the startup project. Make sure the build action is set to ‘Embedded Resource’.    2. If the startup project includes a licenses.licx file, make sure it includes the following line:          DataDynamics.ActiveReports.ActiveReport, ActiveReports 

GrapeCity

ActiveReports 6 FAQ  | 8  

   3. If the startup project only contains an End User Designer                  a. One method is to add a new designer to the project, then choose Rebuild from the Build menu. Once this is done, and you've verified that the "DataDynamics.ActiveReports.Designer.Designer, ActiverReports.Design" line has been added to your licenses.licx file, you can safely remove the extra designer from the project.             b. The other method is to add the "DataDynamics.ActiveReports.Designer.Designer, ActiverReports.Design" to the licenses.licx file manually. Once this is added, Rebuild the Solution from the build menu.  Web Forms Projects Only     If you are using a Web Forms project you will need to run the utility to create a web.config key for your project. This utility is usually located under the Start Menu in ‘All Programs’ ‐> ‘Data Dynamics’ ‐> ‘ActiveReports for .NET’ ‐> ‘Create Web.Config Key’. You then need to enter the same information you used to license the machine and it will create a key that you can copy into your project's Web.Config file to get rid of the licensing message. The web config key will look something like this: 

<configuration>     <appSettings>         <add key="DataDynamicsARLic" value="FIRST NAME,LAST NAME,LICENSE KEY,KAJSDKQFGJKJSADFFP" />       </appSettings> </configuration> 

   

GrapeCity

ActiveReports 6 FAQ  | 9  

How many licenses should I purchase?  

 

ActiveReports for .NET is licensed per developer. You need one license for each developer who uses ActiveReports for .NET to develop a report. We no longer offer site licenses which license the entire physical building.  Click here for pricing. 

The following actions require an ActiveReports license for the personperforming them: 

1. Developing reports inside the Visual Studio.NET IDE using the ActiveReports designer. 

2. Adding or using any of the ActiveReports components: Report, Viewer control, End‐User Designer control, Export Filters, Web Viewer, HTTP Handlers. 

3. Writing code accessing any object included in the DataDynamics.ActiveReports namespace. 

4. Installing ActiveReports on a machine where it is integrated within the Visual Studio.NET IDE and then licensing that machine using the License.exe or LicensePro.exe. 

5. Developing reports using the evaluation version of ActiveReports which are subsequently published without the evaluation banner. 

The following actions do not require a license: 

1. Licensing ActiveReports on a build machine. As long as you have a license for every developer performing the above actions, you are allowed to install the license key of the product on the build machine without purchasing an additional license. The only limitation is that you cannot install the product so that it is integrated within Visual Studio.NET. You have 2 options:  

o Use the runtime "SetLicense" method of ActiveReports to license the application. (Click here for technical information on licensing ActiveReports using the SetLicense method.) This method does not require the build machine to have a licensed version of ActiveReports in order to compile.  

o Install only the ActiveReports assemblies on the machine without integrating ActiveReports into the Visual Studio.NET IDE. If ActiveReports is not integrated in the Visual Studio.NET IDE, you may lawfully run the License.exe or LicensePro.exe to license the build machine for compilation. 

2. Developing reports with ActiveReports for .NET during the evaluation 

GrapeCity

ActiveReports 6 FAQ  | 10  

period of the product. (Note that reports developed with the evaluation version by one developer may not be licensed by another developer. The developer who created the reports must be licensed in order to lawfully publish those reports without the evaluation banner.) 

 

   

GrapeCity

ActiveReports 6 FAQ  | 11  

WebViewer Stays on Last Viewed Page Number of Previously Displayed Report Problem  

 

If the user is on the third page of a report, and then they either hit refresh or navigate to another report, the view of the new report remains on page three. How can the WebViewer be forced to return to the first page on a refresh or in navigating to an entirely new report?  

Resolution  

Call the ClearCachedReport property before loading the new (or refreshed) report:  

WebViewer1.ClearCachedReport()  

   

GrapeCity

ActiveReports 6 FAQ  | 12  

Using Custom Paper Sizes   

 

The manner in which an ActiveReport is rendered is dictated by the print driver. If the printer you've explicitly assigned for the report (or the default printer for the machine it's being run on if none was assigned) does not support the paper size you've chosen, ActiveReports will render the report on the printer's default paper size.  

If you need your report to show on a custom paper size not supported by the printer, you can use the ActiveReports virtual print driver. The following code in the ReportStart event, or just before .Run is called, will allow you to do so, and to use any paper size:  

.Document.Printer.PrinterName = "" 

The PaperHeight and PaperWidth properties, which take a float value defined in inches, will have no effect unless you set the PaperKind property to Custom. Here is some sample code which can be placed in the ReportStart event, or just before .Run:  

Me.PageSettings.PaperKind = Drawing.Printing.PaperKind.Custom Me.PageSettings.PaperHeight = 2 'sets the height to two inches Me.PageSettings.PaperWidth = 4 'sets the width to four inches 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 13  

Page Numbering and Group Page Numbering  

 

Here are the correct property settings for "Page N of M" textboxes for adding page numbering to your ActiveReport.  

Page numbering in the page footer  

txtN:  

• DataField blank  • DistinctField blank  • SummaryFunc Sum  • SummaryGroup blank  • SummaryRunning All  • SummaryType PageCount  

txtM:  

• DataField blank  • DistinctField blank  • SummaryFunc Sum  • SummaryGroup blank  • SummaryRunning None  • SummaryType PageCount  

If you also want group page counts, you can add textboxes in the group header with settings as follows:  

Page numbering in the group header  

txtN:  

• DataField blank  • DistinctField blank  • SummaryFunc Sum  • SummaryGroup Header's name  • SummaryRunning Group  • SummaryType PageCount  

txtM:  

• DataField blank  • DistinctField blank  

GrapeCity

ActiveReports 6 FAQ  | 14  

• SummaryFunc Sum  • SummaryGroup Header's name  • SummaryRunning None  • SummaryType PageCount  

Note: For page numbering in the GroupHeader to show on every page, you will also need to set the Repeat property of the GroupHeader section to OnPageIncludeNoDetail. (OnPage would also work, but may leave orphaned GroupFooters from time to time.) 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 15  

How Do I Use Grouping With ActiveReports for .NET?   

 

With ActiveReports for .NET, reports can be grouped by setting the DataField property of your GroupHeaders.  

Note: ActiveReports will not group your data, so if you have not sorted your data prior to passing it to the report, you will get strange results. 

This walkthrough is split up into the following activities:  

• Adding a viewer to a WinForm.  • Adding an ActiveReport.  • Connecting the report to a data source.  • Adding groups to the report.  • Linking the report to the viewer.  

To add the viewer to a WinForm:  

1. Create a new WinForms project.  2. From your toolbox, add an ActiveReports "Viewer" to the form.  3. In the properties grid, choose the Dock property, and select "Fill".  

To add an ActiveReport:  

1. Select "Add New Item..." from the Project menu.  2. Scroll down and choose "ActiveReports File"  

To connect the report to the nwind.mdb:  

1. Click the yellow icon on the Detail bar of the report.  2. Click the "Build..." button.  3. Double‐click "Microsoft Jet 4.0 OLE DB Provider".  4. Click the ellipsis button next to "Select or enter a database name:", 

choose nwind.mdb, and click OK.  5. In the Query box, type the following: SELECT * FROM Customers ORDER 

BY Country  6. Click OK.  

To add groups to the report:  

1. Right‐click anywhere on the report.  2. Choose Insert > > Group Header/Footer.  3. In the properties grid, drop down the list of fields in the DataField 

GrapeCity

ActiveReports 6 FAQ  | 16  

property of the GroupHeader, and choose Country.  4. Drag the Country field into the GroupHeader from the Fields list, and a 

few other fields into the Detail section.  

To link the report to the viewer:  

1. Go to the Form Load event of Form1.  2. Add the following code to that event:  

Dim rpt As New ActiveReport1() rpt.Run() Me.Viewer1.Document = rpt.Document 

You should now be able to run your project, and see a report grouped by country.  

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 17  

Using Relationships with SubReports  

 

In the attached sample, you can see how you can use relations to populate subreports by implementing the GetChildRows method.  

The attached sample demonstrates:  

• Relationships  • Datasets  • Nested SubReports (Main, Sub and Grand Child)  • Group's UnderlayNext property  • Grouping 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 18  

How Can I Use the Excel Export Object's Properties?  

 

Although the Excel export is not WYSIWYG, there are several things you can do to control the results.  

After you dimension the export object's variable, but before you export the report, you can set any of the following properties:  

• AutoRowHeight (boolean) When set to true, Excel will correct for the size of the row by resizing the row to the largest object in it.  

• DisplayGridLines (boolean) Controls whether grid lines will display.  • FileFormat Can be set to Xls95 or Xls97Plus  • MinColumnWidth (float) Specifies in inches how small columns can be 

in the Excel document. Larger values reduce the number of columns in a sheet.  

• MinRowHeight (float) Specifies in inches how small rows can be in the exported file. Larger values force the export to place more controls on a single line.  

• MultiSheet (boolean) Determines whether the report will be generated as a single Excel sheet, or as a multiple sheet workbook. If set to true, each page in the report will be placed on its own Excel sheet.  

• RemoveVerticalSpace (boolean) Determines whether the exported report outputs runs of vertical empty spaces, or if they are eliminated.  

• UseCellMerging (boolean) When set to true, causes multiline textboxes to be exported as a single cell.  

Example  [C#] DataDynamics.ActiveReports.Export.Xls.XlsExport x = new DataDynamics.ActiveReports.Export.Xls.ExcelExport(); x.MinRowHeight=1; x.MultiSheet=true; x.RemoveVerticalSpace=true; x.UseCellMerging=false; x.MinColumnWidth=1; x.FileFormat=DataDynamics.ActiveReports.Export.Xls.FileFormat.Xls95; x.AutoRowHeight=true; x.DisplayGridLines=true; x.Export(this.viewer1.Document, Application.StartupPath + \\YourReport.xls);  [Visual Basic]  Dim x As New DataDynamics.ActiveReports.Export.Xls.XlsExport() 

GrapeCity

ActiveReports 6 FAQ  | 19  

x.AutoRowHeight = True x.DisplayGridLines = True x.FileFormat = DataDynamics.ActiveReports.Export.Xls.FileFormat.Xls95 x.MinColumnWidth = 1 x.MinRowHeight = 1 x.MultiSheet = True x.RemoveVerticalSpace = True x.UseCellMerging = True x.Export(Me.Viewer1.Document, Application.StartupPath + "\\YourReport.xls") 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 20  

HOWTO: Using Stored Procedures With Parameters  

 

If you have questions about how to use ActiveReports Parameters collection, take a look at KnowledgeBase Article: 539.   Here is the syntax for the query in the data source when you are using a stored procedure:  

exec dbo.[Sales by Year] '<%TestVar%>', '01/01/03'  

Basically, what this code is doing is calling the 'Sales By Year' stored procedure that is in the Northwind database. This stored procedure takes two parameters: Beginning Date and Ending Date. So '<%TestVar%>' is the beginning date and '01/01/03' is the Ending Date. When using the ActiveReport parameter collection you have two ways to pass the parameter value in:  

• You can prompt the user for the value by setting ShowParameterUI to True  

• Or you can pass the value in at run time through code  

[C#] ReportName rpt = new ReportName(); rpt.Parameters["TestVar"].Value = "1/19/1992";  rpt.ShowParameterUI = false; rpt.Run(false); this.ARViewer.Document = rpt.Document;  [Visual Basic] Dim rpt As ReportName rpt = New ReportName() rpt.Parameters("TestVar").Value = "1/19/1992" rpt.ShowParameterUI = False rpt.Run(False) Me.ARViewer.Document = rpt.Document 

 

 

   

GrapeCity

ActiveReports 6 FAQ  | 21  

Using Parameters in ActiveReports for .NET  

 

You can use the ActiveReports Parameters collection to pass parameters to the report's SQL string at run time. This can be done with the parameters dialog, which will prompt the user for input when reports are generated, or, if you're using parameters to synchronize subreports or passing the parameters in from other code, you can set the report's ShowParameterUI property to False.  

The syntax for adding parameters to the report's Parameters collection via the SQL string is: 

<%FieldName|PromptString|DefaultValue|Type%> 

• FieldName is the name of a valid field in the report's data source to be used as a parameter (e.g. CustomerID or LastName). required 

• PromptString is a string value which specifies the text that will appear in the dialog next to the control (e.g. "Enter Customer ID:"). optional 

• The DefaultValue can be used to allow users to just hit "Enter" if, for example, you have a report that generates based on a date, and you have the default for the field set to the current date. optional 

• Type indicates what type of data will be requested. optional • The default is String (with a textbox for input) • S specifies string (with a textbox for input) • D specifies date (with a calendar drop‐down control for input) • B specifies Boolean (with a checkbox for input) 

Example:  

SELECT * FROM Products INNER JOIN Categories on Products.CategoryID = Categories.CategoryID WHERE Products.SupplierID = <%SupplierID|Enter supplierID|1000%> and OrderDate = #<%Date|Order date: |1/1/2001|D%># and Discount='<%bool|Is this checked?|True|B%>' 

Passing Parameters to an ActiveReport 

Once you have added parameters to your report's Parameters collection through the SQL statement, you can access them with code:  

Dim rpt as New rptYourReport() rpt.Parameters(0).Value = 1 'A variable which takes its value from your user interface may be passed in here rpt.Parameters(1).Value = #4/1/2003# 

GrapeCity

ActiveReports 6 FAQ  | 22  

rpt.Parameters(2).Value = 'False' rpt.Run() 

Stored Procedures and Parameters 

Stored procedures can be used the same way as parameters in ActiveReports. The SQL statement would need to have the stored procedure call and placeholders for the parameters:  

CustOrderHist '<%ID|Enter Customer ID: |AFLKI%>' 

ActiveReports will then replace the parameter text "<%...%>" with whatever the user types into the dialog to create a call like this: CustOrderHist 'AFLKI'. 

Parameters and Subreports 

Parameters can be used with subreports to connect the subreport to the parent report. By setting a parameter for the field that links the parent report to the child subreport, the parent report can pass the information to the child through the parameters. The main differences when working with subreports and parameters are:  

• The subreport’s ShowParametersUI should be set to False. • The subreport’s SQL query should be set to use the parameter syntax = 

<%fieldname%>. 

Note: Both main and subreport queries must contain the same field (so the main report must have a CategoryID field and the subreport also must have a CategoryID field.