how to add conditional backgroung image or text to crystal report detail section

Hi I am creating billing report in crystalreports
I need to show a diagonal text "Cancelled" depending upon a  paramter in detail section.
How to do this.
I am using c# VS2005 crystal report.
LVL 7
Maverick_CoolAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
Do you mean you want to show Cancelled for a single item in the detail section or do you want to place a Cancelled image as background to all items in the detail section?

I think we need more info about the 'paramter in detail section'
Are you referring to a CR parameter field entered by the user?
Or do you mean a database field value in the record?
Or something else?
0
Maverick_CoolAuthor Commented:
1. Cancelled image as background to all items in the detail section

2. This image should be shown only if a parameter is set.
0
jruheCommented:
1. Drop the image in the appropriate place on the report.
2. Right-click on the image and choose Format Graphic
3. Click the "X+2" button to the right of Suppress (don't check the box to the left of Supress)
4. In the formula editor, enter the formula where you DON'T want the graphic to print.  For example, if you have a boolean parameter called PrintCancel, and when that parameter is true, it will print the cancel image and when it's false it won't print the image, the formula would be {?PrintCancel}=False

jr
0
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Maverick_CoolAuthor Commented:
the problem, i want it to be displayed in detail section.
its a big image, my regular spacing will take a hit. secondly it will repeat for all records.
i jaust qant 1 pic at center for a page.
0
peter57rCommented:
To display the image as a background spread across all items, you need to place the image in the next higher level section - this is probably a group header but if you haven't got any groups then it will be the page header.

But you need to create an extra group or page header first.
Right-click the name of the section in the left margin and choose insert section below.
Now add the image to the new section.
Rightclick the new section name and choose Section Expert.
In the section expert check Underlay Following Section.
Still in the section expert click the Suppress X+2 button and enter the condition to SUPPRESS the image.
{?someparameter} = "suppress"      //or whatever it is

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jruheCommented:
Oh I've got it.  Sorry--I didn't understand.  Add another Page Header.  Put the object there instead.  Right-click on the grey area to the left of the section, and click Section Expert.  Click "Underlay Following Sections."
0
jruheCommented:
One more thing:  Of course, you'll still need to apply the suppression criterion I mentioned above.
0
Maverick_CoolAuthor Commented:
1.ok i have almost done it. Problem is it coming to foreground.
In sense details should come above it. but picture coming over all, some text is not shown, the white background of the picture is cutting some of the text of detail section

 2. its not coming middle of the detail section its coming at the top.
0
Maverick_CoolAuthor Commented:
sorry for spam. First one is working.
Please help me with the second
0
jruheCommented:
Hmmm.  Either put the picture lower in the header (leave white space above it), or re-save the jpg with white space at the top.  If you do the former, you'll have to use supression criteria in the report section as well.  I'm traveling today but will try to check in on you when I get to the hotel tonight.

You didn't give spam--just hard work :-)
0
Maverick_CoolAuthor Commented:
any updates?
0
jruheCommented:
Did you try my answer above, ID 29894618 ?
0
Maverick_CoolAuthor Commented:
hmmm...
that will do , but isnt there any other way.
0
jruheCommented:
Unfortunately, you can't tell Crystal to start printing an object in a certain place (like, print this 5 cm down the page) without placing it there yourself.

Is there a reason you don't want to widen the header?  Another issue that is making that solution problematic?

jr
0
jruheCommented:
I'm surprised the points weren't split.  Did you use any of my answer?
Thanks,
jr
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.