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

Sub Report Viewing

Status
Not open for further replies.

maecode

Programmer
Oct 22, 2003
6
SG
I created a subReport (I put it under the group section) with the same dataset in my CrystalReport.


Table_View1:
------------

ID Name1 Name2
-----------------
123 jay1 herry
123 jay2 herry
123 jay1 gan
123 jay2 gan
123 jay1 herry
123 jay2 herry
123 jay1 gan
123 jay2 gan
123 jay1 herry
123 jay2 herry
123 jay1 gan
123 jay2 gan


Formula (suppress if duplicated):
Name1
{Table_View1.name1} = previous({Table_View1.name1})

Name2
{Table_View1.name2} = previous({Table_View1.name2})

Result :

Name1 Name2
----------------
jay1 herry
gan
jay2 herry
gan
jay1 herry
gan
jay2 herry
gan
jay1 herry
gan
jay2 herry
gan

how to get the result

Name1 Name2
__________________
jay1 herry
jay2 gan


 
I'm not really sure what you are trying to do as your output does not seem to match the data that you have shown unless you are sorting this data somehow.

If you are trying to print only the name1 and name 2 for the last distinct records in a group, then I would probably create a view to get the maximum record number group by name1, then join this new view by name one and only print if recordnumber = maximum record number from view you created.
 
I agree with mdel2, your data seems wrong for the result set.

To get only unique rows, select Database->Select Distinct Records.

Otherwise try explaining what the intent is with an understandable rowset and expected output.

-k
 
hi mdl2,
What do u mean by
"print if recordnumber = maximum record number from view you created "
is this in a formula?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top