Crystal Reports Supressed Record (1 Viewer)

Zippyfrog

Registered User.
Local time
Today, 08:39
Joined
Jun 24, 2003
Messages
103
I am trying to make my crystal report look better, and I am having one issue - records that aren't visible. Whether it is the visible property set to false, or supressing duplicate records, all crystal reports is doing is putting white space where the record actually is. However, I don't want to see random what space where the record should be - I want the records to be close together. How do I go about fixing that? For example:

Record 1
Record 2
Record 3
Record 4

I have a criteria field, and if Record 3 would not be visible my report would look like this:

Record 1
Record 2

Record 4

Definite blank spot for record 3. What I want is

Record 1
Record 2
Record 4

Hopefully that makes sense. Any help would be appreciated.
 

Kempes

Registered User.
Local time
Today, 14:39
Joined
Oct 7, 2004
Messages
327
You are suppressing the field rather than the section.

Go to report/section expert.

Select details on the left.
Tick the suppress (no drill down) and click the x-2 button.

Now you can type either

isnull(yourfieldhere)

or

if isnull(yourfieldhere) then true else false

that should do the job
 

Zippyfrog

Registered User.
Local time
Today, 08:39
Joined
Jun 24, 2003
Messages
103
Thank you so much. That worked beautifully.

One other question - how can I suppress a whole record when it is a duplicate? I setup the criteria for my field to suppress based off of a condition for the record, but what if the record is identical? I see the option to suppress a field if it is identical, but if each field is identical to the entire row above it, I would like to suppress and hide that row without white space.
 

Kempes

Registered User.
Local time
Today, 14:39
Joined
Oct 7, 2004
Messages
327
If you want to suppress based on a number of fields, I think you may be better working from the grouping options and hide detail altogether. (I always shrink the group footer if I want it to look like continuous records.)

Drag all fields you need into the group header and you should have the result you need.

This way, if all fields are the same for 4 records, grouping will show only one line, where-as detail would show all 4.

The other option would be to group the data in a database query/view, and base the report on that query/view.
 

Zippyfrog

Registered User.
Local time
Today, 08:39
Joined
Jun 24, 2003
Messages
103
Thanks! That is exactly what I needed to have happen. I was trying too hard to think of some other way to combine fields in the detail section, but using the grouping option worked exactly like I wanted.

I do have one more question, and it has to do with trimming. Currently a lot of my fields have an extra "1" or "2" at the end of them, which is used for internal purposes, but on the reports, I don't want to see the "1" or "2". Is there a way that I can trim the last character of a field if that last character is either a 1 or a 2? I looked through help, and it appears that the trim only works with spaces. Do you have any ideas on how to go about solving this issue? Maybe a find and replace with a string with the 1 or 2 with a single space? But I don't know how to limit it to only the final character...
 

Kempes

Registered User.
Local time
Today, 14:39
Joined
Oct 7, 2004
Messages
327
Try this.

Create a new formula field.

if right({yourfieldname},1) in ["1","2"] then left({yourfieldname},length({yourfieldname})-1) else {yourfieldname}

...which effectively says, if your field ends with a 1 or 2, then strip the last character off (regardless of character length), otherwise, show the field as it is.

hope this helps
 

Zippyfrog

Registered User.
Local time
Today, 08:39
Joined
Jun 24, 2003
Messages
103
Once again, you knew exactly what I needed to accomplish. Thanks!
 

3jmj

New member
Local time
Today, 06:39
Joined
Apr 23, 2009
Messages
6
I have similar problem, I tried formulas above and it did not work, please help below is what my report looks like: I want to accomplish how to suppress the big white spaces in between each group. I only want to leave a single space per group.

Unfotunately, when I go to design view to check what's causing the inconsistent spacings, I found out that some jobs (in ascending order) in the database are empty. It is just job no with no data. This blank space(s) is in GH2c, Job-A.



Please help me suppress this scenario, I want to suppress the jobs in detail section of the report that has no data in it. Note: my groupings are per wrk ctr, job, oper and lot.



DATE: WRK CTR: JOB: OPER NO: LOT: RUNNING? EARNED(LOSS)
4/29/09 1.110.01 0002141 10 001 NO 1080.00
4/30/09 1.110.01 0002141 10 001 YES 480.00

4/29/09 1.115.11 0002093 10 001 NO 500.00
4/30/09 1.115.11 0002093 10 001 NO 200.00





4/28/09 1.115.04 0001516 10 002 NO 400.00
4/29/09 1.115.04 0001516 10 002 NO 325.00
4/30/09 1.115.04 0001516 10 002 YES (175.00)



4/29/09 1.130.17 0001278 10 005 NO 540.00
4/29/09 1.130.17 0001278 10 00500 NO 405.00
 
Last edited:

3jmj

New member
Local time
Today, 06:39
Joined
Apr 23, 2009
Messages
6
please send me an email notification whenever there is a reply to this post. Thank you...3jmj
 

3jmj

New member
Local time
Today, 06:39
Joined
Apr 23, 2009
Messages
6
I don't understand how this works, I had posted my scenarios here twice already and no one has replied to it though it has been viewed by different members. How does this work? How can I post new issues so it will be answered? Please help...
 

Kempes

Registered User.
Local time
Today, 14:39
Joined
Oct 7, 2004
Messages
327
not sure if you are still looking at this post 3jmj but what you want to do is filter the records retrieved by going into your select expert and choosing new, job no field, then formula from the drop down and entering something similar to

not isnull({jobno})

in the box opposite.
 

Users who are viewing this thread

Top Bottom