How can i display multiple records of same table in crystal report?

Vijay Kamble
Vijay Kamble used Ask the Experts™
on
Hi,
I want to create a 1 crystal report which shows the Member detail form member section i have to display member records and in spouse section i want to display spouse details and also same for member dependents.i have all details in one table but there are different record for member,spouse and dependents. (e.g for member code OM0582 in database OM0582  01 for spouse OM0582  02 , if member have 3 dependants then OM0582  03,OM0582  04,OM0582  04). i am attaching screen shot of table records of 1 member. i want to display this records in one member form, how can i do this?
error.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
I think you attached the wrong screen shot

Can you select all related records based on the member code OM0582 or do the dependents have their own record code?

Can you select using like?

{MemberCode} Like "OM0582*"

mlmcc
Vijay Kamblesoftware engineer

Author

Commented:
yes you are right I attached wrong screen shot. dependants have there own member code like spouse OM0582 02 same like dependants..
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
How do you select records?

Did you try the LIKE method?

mlmcc
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Vijay Kamblesoftware engineer

Author

Commented:
I show above record for example purpose i will select all records from table.i have separate record for member spouse and dependants. first six digit is common for member spouse and dependants and from right 2 digits are different for member, spouse and dependants. e.g. if Mr x have member code om0582 01 his spouse have om0582 02 and if he have 3 child's then dependants codes are om0582 03,om0582 04 and om0582 05.This all records are in same table. so how can display in creating in single member form reports?
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Are u able to select all the records?

Then just put the fields on the report in the details section

mlmcc

Commented:
Hi,
Can you show us with a screenshot like how you want to display the details related to a single member code? I mean if you want to display the main member, then followed by spouse abd children in a specific order, then we can create a formula by selecting first 6 letters of member code and group by that to display all related info one below other.
In case, your requirement is different, then, if you provide a screenshot of how you need to display, we can think on that.
Provide a rough screenshot or in an excel sheet how you want the details to be displayed.
Vijay Kamblesoftware engineer

Author

Commented:
i am attaching my full format of member form report. i want to pass from member and to member no parameter in report for selected members. i have member photo in server area and name of file stored in table (field name is strcustomercode) . i am also attaching xlsx file some data for single member for your reference.
Member-Detail-Form-GURU.xls
Data-Structure.xlsx
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Is all the data for the form in a single view?

Looking at what you want, I would probably make the dependent information a subreport and just pull the appropriate information into the subreport linking on the member number and changing the selection formula in the subreport to
   Left({?pm_MemberNumber},6) = Left({subMemberNumber},6)

Sort it by member number to get the order correct

mlmcc
Vijay Kamblesoftware engineer

Author

Commented:
Mr.mlcc I am new in cr. please give me a example or any tutorial for my reference.
Vijay Kamblesoftware engineer

Author

Commented:
Mr mlcc all data in form is in single view. i have to pass parameter main report? On the basis of main report parameter how can display the subreport?
I don't know where all of the data in your sample form is coming from, but another option might be to use a group.  Create a formula that's just Left ({your table.strCustomerCode}, 6) and group on that, and then sort on strCustomerCode.  That will give you one group for each member (eg. OM0582), with the records in the group sorted by the number (01, 02, 03, etc.).  I assume that there will always be a 01 record.  You could put the fields for that record in the group header, and the fields for the other records (spouse, etc.) in the detail section.  If you need to display different fields for some records, you could have separate detail sections (eg. one detail section for the spouse (02), and then a different one for the dependents), and suppress the detail section(s) that you don't need based on the last 2 digits (eg. Right ({your table.strCustomerCode}, 2) <> "02" to suppress the spouse detail section on the "dependents" records).

 James
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Is there a way to determine the spouse?
Is it always the 02 dependent?

mlmcc
Vijay Kamblesoftware engineer

Author

Commented:
yes. 02 is fixed for spouse 01 for member.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial