Print Page | Close Window

Line Colors

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=3450
Printed Date: 04 May 2025 at 1:44pm


Topic: Line Colors
Posted By: Djavid
Subject: Line Colors
Date Posted: 16 Jun 2008 at 12:47pm
Hi All,
 
How can i change the color of a line programmatically???
 
Thanx.



Replies:
Posted By: BrianBischof
Date Posted: 16 Jun 2008 at 2:06pm
You can set the LineColor property of the LineObject class.

Get a reference to the object using the ReportDocument class.

(CrystalDecisions.CrystalReports.Engine.LineObject)ReportDocument.ReportDefinition.ReportObjects['line object name'].LineColor = Color.Red;


Replace 'ReportDocument' with your report object name. I have the complete CR.NET object model mapped out in my books. You can find out more about my books at http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Amazon.com or reading the http://members.crystalreportsbook.com - Crystal Reports eBooks online.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window