---
title: "Parameter Field in Crystal Report"  
description: "There are multiple ways of passing parameters to the crystal report. This article focuses on the design time approach to attach parameters.   If you h"  
author: "Chris Anderson"  
published: 2011-08-10  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/602/parameter-field-in-crystal-report  
category: "crystal report"  
tags: ["crystal report"]  
reading_time: 2 minutes  

---

# Parameter Field in Crystal Report

There are [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) ways of passing [parameters](https://www.mindstick.com/articles/87/passing-parameters-in-c-sharp) to the [crystal report](https://www.mindstick.com/articles/930/crystal-report-in-visual-studio-2010). This article focuses on the design time [approach](https://yourviews.mindstick.com/view/81036/coronavirus-pandemic-approach-in-dictatorship-of-hungary) to attach parameters.\

If you have a [Crystal Reports](https://www.mindstick.com/forum/306/how-used-the-sum-function-in-crystal-reports) with various [product](https://yourviews.mindstick.com/view/83909/why-mindstick-platform-is-so-important-for-our-product-promotions) details and you need to display the product details according to Product Id, passing the [parameter](https://www.mindstick.com/blog/450/parameter-class-in-c-sharp) at runtime, then in these types of situations you can use the Parameter [Field in Crystal](https://www.mindstick.com/forum/310/sql-expression-field-in-crystal-report) Reports.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/f0437b70-ce6f-43f1-adf0-7c568930d8d2.png)

The above report simply displayed all the records from the Products table. This is because we have not yet configured the Select Expression and the Report Parameters. Let us add a parameter to the report. Go to the report, right click and select Field Explorer. This will load the field explorer tab where you can add a parameter to the report. Now, right click on the Parameter Fields and add a new parameter as shown in the screenshot below.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/c1105435-87b6-4918-9bc5-dd6d957a0ab0.png)

After creating you have to drag the parameter field from the field [explorer](https://yourviews.mindstick.com/view/81617/now-it-is-time-to-say-goodbye-to-internet-explorer) and drop it into the section details of the crystal report as shown in the screenshot below.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/fe85d987-cbdd-481a-bee6-f5f6299a5e07.png)

The next step is to add a Record Selection Formula. The record selection formula option is found under the Special Fields option. Right click on the record selection formula and add it to the report. Next, right click on the record selection formula you just added to the report and click on Select Expert.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/65206795-c4c9-442c-8e83-ef66f3c33791.png)

The next screen shows the filter criteria. We are matching the productID parameter field with the product_id in the Product table.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/39a11be0-c749-4e53-bc37-6fdc7a7f2003.png)

Select the OK button to close the Select Expert window.

Now, run the application again and you will notice that the page prompts you to enter the parameter field, which in this case is the Product ID.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/f5ed7734-4725-4024-b233-74289e4623db.png)

When the OK [button is clicked](https://answers.mindstick.com/qa/94813/why-does-my-app-terminate-when-the-button-is-clicked-on-android-studio) you will see the results of Product ID.

![Parameter Field in Crystal Report](https://www.mindstick.com/mindstickarticle/92797a6e-467f-4876-8212-dd8a6c2e3dcc/images/47dde20e-9111-4590-8b98-1d0a5baf09e5.png)

\

---

Original Source: https://www.mindstick.com/articles/602/parameter-field-in-crystal-report

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
