Building Reports Using ASP.NET and Crystal Reports - Part 6 - Build a Sales Forecast Report Using Parameter Fields
page 6 of 12
by Vince Varallo
Average Rating: 
Views (Total / Last 10 Days): 63149/ 82

Step 5: Create the Base Sales cross tab

The Base Sales cross tab will display the original sales figure without the Sales Forecast Factor applied.  This will be displayed on the first page of the report.  The second page will have the Forecast Sales cross tab which displays the original sales figure multiplied by the Sales Forecast Factor.

1.    Right click in the Report Header1 section and select InsertàCross Tab… from the pop-up menu.  Drop the cross tab into the Report Header1 section.

2.    The cross tab expert will appear.

3.    In the available fields you should see a node for the SalesOrderHeader table.  Scroll down to the SubTotal field and then click the > button that is to the left of the Summarized Fields listbox.

4.    Expand the SalesTerritory table in the Available Fields list and click on the CountryRegionCode field.  Click the > button to the left of the Rows listbox.

5.    Click the Name field under the SalesTerritory table and click the > button to the left of the Rows listbox.

6.    Scroll up to the OrderDate field under the SalesOrderHeader table in the Available Fields listbox.  Click the > button to the left of the Columns listbox.

7.    By default when you put a date field in the columns of a cross table it will create a column for each date in the database.  This will make the report unreadable.  Instead we'll create a column for each quarter in the table.  To change how the columns are displayed click on the Group Options button under the Columns listbox.

8.    In the "The column will be printed:" dropdown select "for each quarter." and click the OK button.

The Cross Tab Expert should look like the following image.

9.    Click the OK button.  The cross tab will appear in the ReportHeader1 section.

10. By default the summary fields in the cross tab are bolded.  You can change the font to regular by click on the field in the cross tab and depressing the Bold button in the toolbar.

11. Since we are dealing with numbers in the millions you'll need to expand the size of each summary field in the cross tab.  You can do this by clicking on the field and dragging the right window handle.  If you click on the top most summary field in the column and resize it then Crystal Reports will automatically make the other fields in that column the same size.

View Entire Article

User Comments

Title: Help   
Name: Arjun
Date: 2010-05-21 4:28:35 AM
Hi! anybody body can assit me to generate Accouting report trial balance, profit & loss, and balance sheet. using crystal report with ASP.NET with C#
Title: Nice Article   
Name: Rick
Date: 2009-12-01 4:56:29 PM
I read the entire series and I fell more comforable with reports. They were all put together well and every piece of code worked as expected. Thank for taking the time to share.

Product Spotlight
Product Spotlight 

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

©Copyright 1998-2021  |  Page Processed at 2021-12-04 6:26:55 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search