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

Formatting Options

We covered how to customize reports displayed in web applications in Part 1. In Part 2 we will cover how to implement something similar for your Windows Form application. Crystal Reports .NET includes the ability to use CSS style sheets for your web application. Unfortunately there is no built in ability to use something similar to CSS Style sheets in your WinForm application. 

To implement something similar to a style sheet, our examples involve using custom XML file to describe the formatting for your reports. Our WinForm application uses a custom function to apply the formatting specified in the XML file to our Report. Listing 1 shows the SQL syntax used in our report. We use the Adventureworks database and tables to create a sales report. Once we have the report that we want to display, now we need to change the formatting in our windows application.

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-28 5:44:30 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search