How to Change Crystal Report Formatting for Different Customers - Part 1
page 3 of 7
by Eric Landes
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 41535/ 59

Formatting Options

Depending on the type of application you are deploying, we will discuss different methods of changing the formatting on your report. For web applications, you can utilize style sheets used in your web application to format your report. If you deploy the web application to different servers, the CSS file can be different formatting on each server. If your reports are going to be in the same server, I would recommend placing a different aspx file with the Crystal Viewer for each customer.

For a Windows application there is no out of the box solution to setting the formatting outside of an application like the CSS file. We will introduce a way to change the formatting in your windows application with some custom code in Part 2 of this series.

For our example we start out with a sales report we created using the Adventureworks database.  We will base the report off the view vSalesPersonSalesByFiscalYears. The sample report displays data by region, then by sales person. The sales show totals by year, and then grand totals at the bottom. See the SQL used in the report in Listing 1.

Listing 1

SELECT "vSalesPersonSalesByFiscalYears"."FullName", 
"vSalesPersonSalesByFiscalYears"."SalesTerritory", 
"vSalesPersonSalesByFiscalYears"."2002", "vSalesPersonSalesByFiscalYears"."2003", 
"vSalesPersonSalesByFiscalYears"."2004"
 FROM   "AdventureWorks"."Sales"."vSalesPersonSalesByFiscalYears" 
"vSalesPersonSalesByFiscalYears"
 ORDER BY "vSalesPersonSalesByFiscalYears"."SalesTerritory", 
"vSalesPersonSalesByFiscalYears"."FullName"

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 



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


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-03 4:24:00 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search