Solved

Crystal Report text object change a property when a CSS is defined

Posted on 2009-04-08
5
775 Views
Last Modified: 2012-05-06
I use Visual Studio 2008 and crystal report for a C# web application.

All text objects in my report have the same CSS. For some fields, I want, for example, to change the text color or  to change the horizontal alignment but doesn't work. When I remove the CSS, it's work.

Do you have a tips or a idea for this?

Thanks
0
Comment
Question by:AngieWill
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:level9wizard
ID: 24096421
To set a color using CSS, here's an example:
color: Red;

To set vertical alignment, you can do, for example:
line-height: 100px;
0
 
LVL 11

Expert Comment

by:level9wizard
ID: 24096425
And horizontal alignment:
margin: 0 auto; (centered)
0
 

Author Comment

by:AngieWill
ID: 24096468
Yes of course thanks.
The problem is I only want to change directly in text object in rpt file a property and doesn't work when a CSS is defined for the text object.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24100986
I haven't explored the process of tying a CSS to a report but I would suspect that with a CSS tied to the report, it overrides any Crystal formatting since that is the main reason for a CSS is to standardize formatting of objects and eliminate the need to format each object indiviually.

mlmcc

0
 

Author Closing Comment

by:AngieWill
ID: 31567933
I think that the best way is to define first the common settings of the report in window 'Report Options'.
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now