ASP.NET
  Home arrow ASP.NET arrow Working with Parameters with Crystal Repor...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Working with Parameters with Crystal Reports and ASP.NET 2.0
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 32
    2007-07-24

    Table of Contents:
  • Working with Parameters with Crystal Reports and ASP.NET 2.0
  • Passing the value to Crystal Report Parameter dynamically: source code
  • Passing the value to Crystal Report Parameter dynamically at run-time: explanation
  • Passing the value to the Crystal Report Range Parameter dynamically: source code
  • Adding Multiple Value (Discrete and Range) parameters to Crystal Report
  • Passing the value to Multiple Crystal Report Parameters dynamically: source code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Working with Parameters with Crystal Reports and ASP.NET 2.0


    (Page 1 of 6 )

    This is the second article in a series that covers programming with Crystal Reports with ASP.NET 2.0. In this article, we will focus on working with parameters using Crystal Reports and passing the parameter values from an ASP.NET 2.0 web site.
    A downloadable zip file is available for this article.

    If you are new to Crystal report programming, I strongly suggest that you read the first article in this series, Programming Crystal Reports with ASP.NET 2.0. This article uses and enhances the solution (source code) provided at the above link.

    The entire solution (source code) for this article is available as a free download in the form of a zip. The source code in this article has been developed using Microsoft Visual Studio 2005 Professional Edition on Microsoft Windows XP Professional Edition with Microsoft SQL Server 2005 Express Edition. I used the same version of Crystal Reports which comes with Visual Studio 2005 Professional Edition. I didn't test the code in any other tools/IDEs/servers/editions/versions. If you have any problems, please feel free to post in the discussion area.

    Adding a single parameter to the Crystal Report at design time

    Before proceeding further, open the "SampleWebSite01" website (available as a download with this article) and add a new Crystal Report (named "SampleParam1.rpt") focusing on the Orders table of the Northwind database. Make sure you add OrderID, CustomerID, EmployeeID and OrderDate to the report. All of this is explained in the first article of this series.

    The following are the steps required to add a parameter to the Crystal report:

    Using the "FieldExplorer," right click on "Parameter Fields" and click "New" as shown in the following figure (01).

    Enter "Name" as "p_EmployeeID," "Prompting Text" as "Enter Employee ID,"  specify "Value Type" as "Number" and click on "OK" as shown below in figure 02. 

    Click on "Select Expert" on the tool bar, as highlighted in red in figure 03.

    In the "Choose Field" dialog box, select "Orders.EmployeeID" and click on OK as shown in figure 04.

    In the "Select Expert" dialog box, select the operator as "is equal to," select "{?p_EmployeeID}" as the value (shown in Figure 05) and click OK.

    More ASP.NET Articles
    More By Jagadish Chaterjee


       · Hello guys,This is second part in the series focusing on Programming Crystal...
       · Hello...My name is BasavarajYou have not specified about the crystal report...
       · Hi,Thanks so much for your post. I have followed your steps however when I run...
       · Thanks.its a very helpful for me
       · Great Support !!!
       · Hi, I am Sumit JoshiI am a Director of Macrosoft Solutions.You give great...
     

    ASP.NET ARTICLES

    - Adding Content to a Static ASP.NET Website
    - Building a Static ASP.NET Website in a Basic...
    - Develop Your First ASP.NET Website with Visu...
    - Run ASP.NET in Windows XP Home with Cassini ...
    - How to Test a Web Application
    - How to Add Code and Validation Controls to a...
    - Working in Source and Split Views to Build a...
    - How to Build a Web Form for a One-Page Web A...
    - How to Develop a One-Page Web Application
    - An ASP.NET Web Application in Action
    - Developing ASP.NET Web Applications
    - An Introduction to ASP.NET Web Programming
    - Introduction to the ADO.NET Entity Framework...
    - Completing an In-Text Advertising System und...
    - Programming an In-Text Advertising System un...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek