Solved

Conditional Printing in Crystal Report

Posted on 2008-10-10
2
1,091 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 300 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 100

Assisted Solution

by:mlmcc
mlmcc earned 200 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

895 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

13 Experts available now in Live!

Get 1:1 Help Now