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!

Linking subreports

Status
Not open for further replies.

crystalize

Vendor
Nov 20, 2007
26
US
I don't get the linking of subreports. I have created 5 subreports and when I click refresh of the main report all 5 report params are shown there. I need to fill-in each one to get the report to look right.

Most of the reports can be selected by name but one needs to be selected by number_ID to work properly.
Then name and number_ID are both in the same table.

I have read up on this but nothiing explains it very clearly, at least to me.
 
You are prompted for the parameters because Crystal was not supplied a value. Right click the subreport and choose "Change Subreport Links...". Then make sure the proper fields from the available fields list are added to the fields to link to list. In order to stop the report from prompting for a value for every parameter, each parameter must have a value from the main report to base the subreport data on. Select each linked field and verify that the "Select data in subreport based on field" checkbox is checked, and that the proper field is selected.
 
In your case, select number_ID from the linked fields list, and make sure that the dropdown below "Select data in subreport based on field" is set to TABLE_NAME.number_ID.
 
I did what you suggested but it didn't seem to make any difference. I need to choose one name when in the main report and have Crystal distribute that to all the subreports. Also, I want the software to change the name I choose into the number_ID for the one subreport.

Currently I am still getting all the param prompts. If if fill them in it would be good for only this one time, then next time I create the report I would need to fill them all in again. I just want to be prompted once for the entire report.
 
Have you removed the old parameters from the subreport? Check Record Selection in the subreport.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
By default Crystal will create a new parameter in the subreport. Make sure you only have one parameter in the subreport after you do the link.

Also, I've found it safer to look at the record selection formula inside the subreport to see what the subreport is using. The select expert gets confused if a parameter is used for more than one selection criteria.

If you can, clear out the record selection in the subreport, and delete all parameters. Then create the link from the main report and the correct parameter will be created.

Editor and Publisher of Crystal Clear
 
That seems to be working when I use the matter.number for my main record selection. However, in 3 subreports the exact data I need is not showing up.

I need to use matter.number.id (which is different from matter.number) on some subreports.
Also, I need to use row.id which is linked to matter.number.id on one subreport. (I have the row.id linked to the matter.number.id.)

When I go to record selection and add on these additional requirements for record selection I do not get the data I need.

I have not created a second parameter for this because I don't want to be prompted each time. I need the system to recognize that matter.number_id 55555 is equal to row_id number 55555.

Should I link on more than one field in the main report?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top