Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dynamically changing the border style of box object and line object based on some condition in crystal report.
Note: am using VS2008
Posted
Updated 2-Jan-14 4:57am
v2

1 solution

Have to write code in your c# file because in crystal report there is not an option for setting formula to change line style and color
C#
if (...) //condition
{
    LineObject lo = (LineObject)Report.ReportDefinition.ReportObjects["Line1"];
    lo.LineStyle = CrystalDecisions.Shared.LineStyle.DashLine;
    lo.LineColor = Color.DarkRed; 
}

Happy Coding!
:)
 
Share this answer
 
Comments
Member 13303427 13-Nov-17 8:34am    
What does ReportObjects array accepts. String of ________? . what is "line1".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900