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

Custom Formatting your Windows Application

To make our formatting easily modifiable, use an XML file with different nodes.  For this article, there is an XML file with the following format in Listing 2.

Listing 2

<Formats>
      <PageHeader>
            <FontFamily>Arial</FontFamily>
            <FontSize>16</FontSize>
            <FontWeight>Bold</FontWeight>
            <FontColor>Navy</FontColor>
            <BackGroundColor>Gold</BackGroundColor>
      </PageHeader>
      <GroupHeader>
            <FontFamily>Arial</FontFamily>
            <FontSize>14</FontSize>
            <FontWeight>Bold</FontWeight>
            <FontColor>Navy</FontColor>
      </GroupHeader>
</Formats>

The xml contains nodes that should map to different sections in the report. For instance, for the PageHeader section, we have a node PageHeader. You can create a different node for each section in a report (ReportHeader, PageFooter, etc.). Each section can contain the formatting options for the font name (fontfamily), FontSize, FontWeight, FontColor and BackgroundColor.  That is the extent of the sample in this article. This file could be extended to add other formatting options. For the purposes of this article, the number of elements is kept small.


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