Building Reports Using ASP.NET and Crystal Reports - Part 2 - Quarterly Sales Report
page 11 of 15
by Vince Varallo
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 16495/ 635

Step 10: Set Selection Formula

This report should only show one fiscal year at a time. The ASP.NET application will prompt the user for the fiscal year and the report will filter the report dynamically. To do this we will create a formula in the report for the fiscal year and dynamically change this formula using the Crystal Reports Object Model. We will set the selection formula in the report to select only these records.

1.    First create the FiscalYear formula. Right click on the Formula Field in the Field Explorer and select New… from the pop-up menu.

2.    Enter FiscalYear for the formula name and click the Use Editor button.

3.    Enter 2003 for the formula text and then click the Save and Close button.

4.    Now you need to set the selection formula in the report. From the Visual Studio menu select Crystal ReportsàReportàSelection FormulaàRecord…

5.    Enter the following formula.

Listing 3

Year ({SalesOrderHeader.OrderDate}) = {@FiscalYear}

6.    Click the Save and Close button.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 7 and 8 and type the answer here:

User Comments

Title: Awesome   
Name: Rusty
Date: 8/27/2009 10:36:14 AM
Comment:
Awesome job. I am a brand new CR user and I found your article to be easy to understand, follow, and very helpful. Thanks and keep them coming.
Title: Superb   
Name: ramakrishna
Date: 8/1/2009 6:51:52 AM
Comment:
This article is very good to customise my website,
Title: great work   
Name: Ankit Agarwal
Date: 7/28/2009 12:48:39 AM
Comment:
u have done a great work
this article is really helpful
Title: Great Job   
Name: yin min
Date: 7/26/2009 5:52:54 AM
Comment:
Thanks for your step by step article.
Everyone who is new at crystal are looking for such a simple and very useful article.
Thanks again.
Title: Well Done   
Name: Muhammad Aijaz Rajput
Date: 7/10/2009 10:47:53 AM
Comment:
This is an excellent article. Thanks. I realy need the detailed step-by-step article approach that you take.
Title: Source coming soon   
Name: Vince
Date: 6/22/2009 9:20:19 AM
Comment:
The source should be posted soon.
Title: Excellent   
Name: Walter
Date: 6/16/2009 4:03:31 AM
Comment:
Hi Vince,

another excellent article. Thanks. I really like the detailed step-by-step approach that you take.

Will the source be available as a download?

Regards

Product Spotlight
Product Spotlight 



Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2009 ASPAlliance.com  |  Page Processed at 11/22/2009 5:32:32 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search