Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report problem !

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
IR
Hi there,
I have a table with below structure:

ID ---> Number(long) INDEX FIELD(Unique = false)
PID1 ---> Number(long)
PID2 ---> Number(long)
OPERATE ---> Yes/No(boolean)
TOTAL ---> Number(double)

It is a example of:

1, 1, 2, YES, 2000 (Help: ID = 1, PID1 = 1, PID2 = 2, OPERATE = YES, TOTAL = 2000)
1, 2, 1, NO, 2000 (Help: ID = 1, PID1 = 2, PID2 = 1, OPERATE = NO, TOTAL = 2000)

2, 3, 4, NO, 5500 (Help: ID = 2, PID1 = 3, PID2 = 4, OPERATE = NO, TOTAL = 5500)
2, 4, 3, YES, 5500 (Help: ID = 2, PID1 = 4, PID2 = 3, OPERATE = YES, TOTAL = 5500)


That was just a small example of the stored data in database about this table !

Now, i wanna show report like this:

1, 1, 2, YES, 2000
2, 3, 4, NO, 5500

Do you got it ?

I wanna delete the records in my report that has frequency value in ID field !

Please help me !

 
What is a frequency value? Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
I'm not sure I understand the rules for which records appear or don't in the report.

If it's just the first for each ID you want, then group by ID, place the fields you want in the group header, and suppress the details and the group footer. Editor and Publisher of Crystal Clear
 
Hi dgillz,
I mean:
I wanna delete the records in my report that has repition values in ID field !

Please look at example again:

In record 1: ID field value is 1
In record 2: ID field value is 1 (repeat !)

In record 3: ID field value is 2
In record 4: ID field value is 2 (repeat !)


 
Hi chelseatech,
Thanks for your reply,
Can you explain more about your reply !
I didn't use Group, yet :(
Can you explain to me step by step, please ?

With Warm Regards
 
Use Insert/Group from your menu
Select ID as the field to group on

CR will create two new sections - GH1 and GF1
Remove the GroupName1 it inserted into GH1.
Move all the fields from the Details to GH1
Suppress Details and GF1 sections - use Format Section to do this. Editor and Publisher of Crystal Clear
 
As a simple step by step,

Select 'Insert', 'group' main toolbar.
input the 'ID' field in the first box which is the field to group by. (You'll find the combo box lists all the fields in your report, then all the fields within your tables to select from) Ascending order is the default.

Click on the OK button.
Now, if you look at your report in preview mode, You'll find the Details line now has a line above and below called Group Header#1 and Group Footer#1.

If you put the fields you want to display on your report in the Group Header#1 field. You'll see that it displays only the first record it finds within the database of a given ID value.

The last thing you need to do is in Preview mode, put your cursor on the word 'details' and right click. Select 'Suppress No Drill Down'.

This will hide your details line. This is something to play with a little as you might find it useful. If you suppress a line, it disappears from your report. if you select 'Hide Drill down ok', then when you Preview your report the details will not display until you put your cursor over the ID field. (When the cursor will change to a magnifying glass) If you double click at this point then the detail line will display.

This is a nice feature for displaying summaries on a report and allowing users to view the report detail if/when they want to.

Hope this helps....

John
 
Hi again chelseatech,
I maked Group for ID field, and i move my fields to GH and then i remove all fields from Detail section.
But i can see the repition records in my report :(

What is my wrong ???

Please help me !
 
Hi rebel11409,
Thanks for reply,
I maked group on ID field but i can see the repition records still !!!

Please help me !
 
Hadi,
try this:
place all your fields in the detail section. Right click on the detail section (grey area to the left of the detail section), select Format Section... from the popup menu, this will open up a Section Expert window, click on the x-2 box next to Suppress (No Drill Down), this will open a Format Formula Editor window, enter this statement:
Not OnFirstRecord or ID_Field_Value = Previous(ID_Field_Value)

Hope this is what you're trying to accomplish.
Bryan
 
Hi Mr.Bryan,
Thanks for your reply ;)
Now, report shows only one record !
For example if i have 6 records in my table,
Crystal Report must shows 3 records !

record 1: ID = 1 (Show)
record 2: ID = 1 (Don't show)
record 3: ID = 2 (Show)
record 4: ID = 2 (Don't show)
record 5: ID = 3 (Show)
record 6: ID = 3 (Don't show)

But by your way report shows only 1 record !

Please help me :(

 
Hadi,
This method should work as long as your data is exactly the way you posted as an example. If you want to post your email address, we can converse through email.
Bryan
 
Ok, Mr.Bryan,
It is my mail: hadi_rezaie@yahoo.com

Please send me mail !

Thanks !
 
Hi chelseatech, rebel11409, Soleil525 ;)
Thanks alooooooooooot for your helps !
Yes, your replies was right !
I had a BIG wrong in my report, but now my report works fine !

Thank you again !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top