473,372 Members | 1,229 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Dynamically change background color in Crystal Reports.Net

I have a Crystal Reports.Net report being generated from my C#
application. I would like to change the background color of the
details section (not the text mind you) of the report on certain
conditions. For example if the value of the 'Meeting Number' is
greater than 100 the background color of the details section will be
light yellow, otherwise it will be white. There will be multiple
records in this reports so one (or a few) detail section might be
yellow while all others on the page are white; or vice versa. I could
either change the color of the background section to yellow or possibly
create a yellow rectangle around the section and turn it
visible/invisible at runtime depending on the value of my field.

Does anyone have any ideas on how I can accomplish this?

TIA,

ngpost1

Sep 6 '06 #1
1 16312

ng*****@hotmail.com wrote:
I have a Crystal Reports.Net report being generated from my C#
application. I would like to change the background color of the
details section (not the text mind you) of the report on certain
conditions. For example if the value of the 'Meeting Number' is
greater than 100 the background color of the details section will be
light yellow, otherwise it will be white. There will be multiple
records in this reports so one (or a few) detail section might be
yellow while all others on the page are white; or vice versa. I could
either change the color of the background section to yellow or possibly
create a yellow rectangle around the section and turn it
visible/invisible at runtime depending on the value of my field.

Does anyone have any ideas on how I can accomplish this?

TIA,

ngpost1
I found a way to do this - kinda.

I added a new field to my report's DataSet called Highlight. I added
that field to my report and set the background color, border and text
color all to be light yellow. I set the SupressIfZero property to
True. At runtime, I loop through the DataSet and if Meeting Number is
greater than 100 I set the value of the Highlight field to X otherwise
I set it to and empty string.

When the report is rendered if the Highlight field is not empty (per
the SupressIfZero setting) it will be displayed; otherwise it is
suppressed. Because the border color, background color and text is all
the same color it just looks like a yellow box around everything.

ngpost1

Sep 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: puunda | last post by:
Hi All, I had previously asked this question with regard to Cyrstal Reports, which I believe is not the most suitable for doing the job. The problem: I need to create a report with X number...
3
by: jijo kuruvila | last post by:
How we can Dynamically generate a MS Word document using ASP.Net? -- Jijo kuruvila trivandrum,Kerala,India
0
by: Augustin Prasanna. J | last post by:
Hi We have developed the reports using Reports for our asp.net web application using the Crystal Report assemblies that comes along with Visual Studio.Net 2003. the report works fine in our...
0
by: Rocio | last post by:
Hi: I have many ASP.net application created by VB.net2003 and I'm using crystal reports for .net, I'm using the crystal viewer to display my reports. I deployed those applications with the...
3
by: Null | last post by:
Hello -- I am looking for a way to dynamically generate PDF documents - combining Crystal Reports and data driven "fields". For example, I have a template that's essentially a summary document...
0
by: David Dvali | last post by:
Hello. I have just started using Microsoft Reporting tools and I like it very much. I'm using Microsoft SQL Server 2005 and Microsoft Visual Studio 2005 for generating reports in my ASP.NET web...
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
0
by: Kalpesh | last post by:
Hi All, I am using .net crystal reports to develop the reports. The version of crystal report assemblies is 10.2.3600.0. When i run the reports i got following error. #region Retry Report...
1
by: =?Utf-8?B?U3RldmUgQmFya2Vy?= | last post by:
Hi guys, I’m having an interesting problem with Crystal Reports. Thankfully, it’s simple to explain! I’ve got a report, and have added a picture to it. I configured the picture to use a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.