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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
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 / 18
    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...
     

    ASP.NET ARTICLES

    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway