Avatar of Sailee Govekar
Sailee Govekar
Flag for India asked on

Displaying only first row for the 2nd Stored procedure

I have two stored procedures in one report. My main stored procedure is procSSFTP_RPT_WorkAndRestDailyReport and 2nd stored procedure name is procSSFTP_RPT_GetCrewComments.

I want to display "Seafarer name" from my 1st stored procedure and "comments" from 2nd stored procedure.

I have multiple rows for the comments against the single seafarer name.

Instead of showing multiple rows of comments for single "seafarer name", I want to display one comment per "seafarer name".

Attached is the report for your reference

https://drive.google.com/open?id=1nb_DOgTVjFD1d-YdRR8jUX2omN5yO8KV
Crystal ReportsSAP

Avatar of undefined
Last Comment
Sailee Govekar

8/22/2022 - Mon
Raghavendra Hullur

Hi,
The details can be restricted to display only once for each Seafarer name and single comment (I think this will be the comment from the first record for each Seafarer) by displaying the details under Group header section by creating a group on seafarer name. But, you also have other details like Department and Rank. Will those also be constrained to a single row display for each Seafarer?
Or you just want to display all the records for each Seafarer name and display only the comment from first record for each Seafarer name?
Sailee Govekar

ASKER
We need to display top comment for each seafarer. Department and Rank will be single row.

Only the concern is with One seafarer and one comment.
Raghavendra Hullur

Something like in attached report will do. But, when you say top comment for each seafarer name, is it the first comment or is it something associate with some value? If so, you may have to change the details accordingly. Currently, in the modified report, first comment for each seafarer will be displayed.
Report1.rpt
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Sailee Govekar

ASKER
No.. its not specific. The very first comment.

and if the comment is NULL then also the seafarer name should be displayed
Sailee Govekar

ASKER
https://drive.google.com/open?id=12lSyQ7GszWc70wP0edmKm-yPd8BuEie-

I have multiple seafarer names. if I delete the comments then all the seafarer names are displayed.

If I add comments field then only on record is displayed. Which is wrong.

There will be list of seafarer
Raghavendra Hullur

That must be something to do with the link you have created between those 2 stored procs. Try changing the join from inner join to left outer or right outer join based on the data availability. You can use the report I shared (retain the comment field in the report) and check after changing the link join type.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Sailee Govekar

ASKER
Changing joins won't bring the correct data
SOLUTION
Raghavendra Hullur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Sailee Govekar

ASKER
It worked after changing the Joins.
Earlier we were facing some problems with the Joins so couldn't do it. But now introduced some relations to handle in Stored procedure.