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

Pulling right data from sub-report

Status
Not open for further replies.

sondev

IS-IT--Management
Jan 7, 2005
22
I am very new to crystal reports. I am currently using v.10. I have made my report and I created a subreport for a Summary description below the main report. The main report is initially grouped by txtclientName. Now the summary or subreport needs to display the engineers per client. I am able to pull only the first field of data by placing the field, txtengineer, into the subreport and linking the field name as 'is equal to'='{?Pm-Consulting_Projects.txtAssEngineer}'. (When i initially setup with using the 'pm' parameter, the field would list all engineers and not group by client.) I dont believe this is the correct method because it doesnt work. I am not able to display all engineers for each client. It only displays one. I have selected 'Display distinct records' because there are many records for each engineer and i only need to show one per client and sum() the other fields to display only one calculated field. Remember i am new to this so any suggestions would be very helpful. thanks
 
I'm not sure exactly what is happening, but to link a report and a subreport, you need a parameter field that you have set up in the subreport. Link this parameter (using the "Change Subreport Links" option) to the relevant field in the main report. They must be exactly the same data type.
If this doesn't help, your table structures and example data would help.
 
One common problem with linked subreports is that it adds the link as a record-selection in the subreport, additional to any test you already have. Is that the problem?

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
The record selection may be the problem. I re-read my last post and it was not very clear. I basically i have about 10 clients (txtclientname), and i am reporting job task and hours for each client. At the end of each client report, I have my SUMMARY in the footer. So i placed a subreport in the footer. This data needs to be grouped by that particular client and list each engineer distinctively. For some reason, crystal is only listing one engineer. I need all engineers for each client to be listed. I made sure my txtengineer field was placed in the detail section... I checked "Change Subreport Links" and made sure all fields were relevant. This is currently what i have listed in "Change Subreport Links"...

Fields are linked to: txtengineer,br_time,br_rate

Each field is using the following parameter for the subreport... ?pm-consulting."txtengineer","br_time","br_rate"

Any ideas on why this subreport only shows the first engineer for the client and not the rest?
 
The subreport should be placed in the group footer and linked ONLY on the client field.

-LB
 
PS. Any criteria that you are using to limit the main report should be used in the subreport record selection criteria.

-LB
 
From the subreport, click [Report], [Edit Section Formula], [Record]. What have you got there?

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top