Solved

Conditional Printing in Crystal Report

Posted on 2008-10-10
2
1,090 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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Viewers will learn how the fundamental information of how to create a table.
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…

771 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

9 Experts available now in Live!

Get 1:1 Help Now