Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditional Printing in Crystal Report

Posted on 2008-10-10
2
Medium Priority
?
1,108 Views
Last Modified: 2008-10-24
Hi Experts,

 I am designing a Crystal report where I need to print some labels conditionally, means If certain condition is true then only those labels should get displayed in the report else they should not. I am using Crystal Report 9.0.

My question is

1) Is it Possible?

2) If it is Then How to do it?


I want ask one more thing about crystal report. In the crystal report i hv taken two groups for different fields, every thing is working fine except for one. I hv used order by purchasedate clause in the query. I hv tested the query in backend its working fine there. But in the crystal report order by clause in not working. It is displaying the dates in random order. i dont know why its happening. Can any body tell me whats the reason and how to solve it.

Please help me out.

Thanx in advance.

Regards
Param
0
Comment
Question by:Paramhans
2 Comments
 
LVL 6

Accepted Solution

by:
divyeshhdoshi earned 1200 total points
ID: 22685159
Hi

Yes it is possible

right click on lable >> Format object >> Common Tab >> check Suppress >> click on Formula button of Suppress.
write formula for displaying that lable

eg.
if (i>0)
true
endif
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 800 total points
ID: 22687097
As above you can suppress fields conditionally.

The condition you use will suppress if it evaluates to true so if you have a condition that when true you want to display the label then you have to negate the condition in the suppression formula.

Using the above example if you wanted to display when a given field is positive you would suppress with

{YourField} <= 0

Data order.
Crystal uses the groups for the first sorting fields.

If you want it then in date order within the group you can
Click DATABASE --> RECORD SORT EXPERT
Add teh date field to the sort order.

mlmcc
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

886 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