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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this grouping possible in CR 8.5 ?

Status
Not open for further replies.

tekniks

Technical User
Jun 27, 2003
98
US
GH1 -- Mat_id
GH2 -- Lot_id
GH1a -- Mat_id
GH2a -- Lot_id
GH1b -- Mat_id
GH2b -- Lot_id

Or is there some other solution to achieve the above ?


Alternatively, I can GH1a- GH2a and GH1b-GH2b in 2 different sub-reports in 2 sections of GH1(1a and 1b) but I definitely need to have GH2 above GH1a.

Thanks

Tek
 
Hi,
It looks like you are using the same fields to group on multiple times-

How can Crystal determine that a particular Lot_Id or Mat_Id 'belongs' in a particular group?


What output arrangement are you trying to create?
( What details are in each 'group'?)

[profile]
 
Try posting technical information:

Crystal version
Database/connectivity used
Example data
Expected output based on the example data

-k
 

I have the following database structure:
Table:B_LINK
Batch_ID
2
3
Table:G_LOG
Batch_ID Mat_ID Lot_ID
2 FM321 H05
2 KX123 H03
2 23456 H04
3 FM123 H01
3 34567 H02
**************************************
Now within the same G_LOG table the Lot_id becomes batch_id like this
Batch_ID Mat_ID Lot_ID
H03 FM345 L01
H04 22446 M01
H01 12345 N01
H02 44678 G01
H05 54216 G03
The link between the two tables as you can see is the batch_id.

I want to display the following info in CR(8.5)- Oracle 7.3.4:
All the Mat_id's starting with 'FM...' at whatever level in the tree they exist in the table G_LOG(They could be at 1st level or 3rd level).
That is:

1) If for a given batch_id from B_LINK the mat_id in G_LOG is a 'KX' material then ---> go one level down in G_LOG and see if it contains an 'FM...' -- then display. If not then go one more level down and see for 'FM...' - then display.

2) If for a given batch_id from B_LINK the mat_id in G_LOG is a 'FM...' material --> then display.

In the above example the batch_id - 2 has both 'FM...' and 'KX...', therefore firstly I have to display mat_id - FM321 and then drill down for 'KX123' in G_LOG to see if it contains an 'FM...' i.e. 'FM345' and display that.

Heirarchial grouping was not giving me the desired results so what I did was -- created 2 sub reports and then created aliases of the same table to arrive at the desired result.

However, now we've additional requirement and one Mat_id can have multiple Lot_id's linked to it.

I have created 3 groups)a,b, and c) of Mat_id and placed the above said 2 sub reports in the last 2 groups and each sub report is grouped by Lot_id which gives the desired result. However the multiple lot_id's for the first group of Mat_id have to be displayed before the sub reports display any data, --- how to achieve this?
GH1 -- Mat_id
GH2 -- Lot_id -- want to display multiple of this
GH1a -- Mat_id
GH2a -- Lot_id[/color red] -- grouped in sub - report
GH1b -- Mat_id
GH2b -- Lot_id[/color red] -- grouped in sub - report

The expected output would be --

Mat ID - FM323
Lot ID - H00
- H06
Mat ID - FM123
Lot ID - H07
- H60
- H01

and so on.....

Let me know if anything needs to be clarified further.

Thanks

Tek
 
Hi,
Still a little confusing;
What is the Actual structure of G_LOG?
Is Batch_ID 3 or HO3 ? What do you mean by
'within the same G_LOG table the Lot_id becomes batch_id like this'

Like What?

Please post the output from a desc G_LOG SqlPLus command.


[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top