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

Crystal Reports XI link account name in subreport 1

Status
Not open for further replies.

davismar

IS-IT--Management
Apr 1, 2010
85
US
I have (2) reports - a main report and a subreport.

I need to be able to link the account name in the main report to the account name in the subreport.

Can someone post the actual step by steps, using a parameter field, including where to put the parameter field, etc.

This is for Crystal Reports XI.

What I'm seeing is the parameter field "account name" show up when I run the report, but I don't want it to show the parameter, but rather the values that pertain to the account name in the main report to show on the subreport. Hope this makes sense!

Thanks in advance for your help!
 
Please describe how your main report is grouped, including the location of the subreport (what report section). Is the subreport being added ONLY to display the account name? Or for some other purpose? Do you have an ID field that corresponds to each account name?

-LB
 
The main report is grouped with GROUP 1 NAME = Account Name

The location of the subreport = Added to the report footer of the main report.

Is the subreport being added ONLY to display the account name? Or for some other purpose? THE SUBREPORT IS BEING ADDED TO ADD CUSTOMER INVENTORY ITEMS FROM THEIR ACCOUNT. SO IF THE PARAMETERS IN MAIN REPORT PROVIDE ACCOUNT NAME=ABC, THEN I WANT THE CUSTOMER INVENTORY IN tbl.customerinventory to display from the subreport, in addition to show the account name.

Do you have an ID field that corresponds to each account name? NO - I thought I could use Account Name, since it's appearing in both reports and somehow link the data this way.
 
The sub belongs in the group footer for account name if you plan to link the sub to the main report on account name. I suggested the ID, because names can sometimes be entered inconsistently, with different spellings, case, adding "inc", etc. So go ahead and use the name.

I guess you already have the sub prepared. When you insert the subreport, you will choose it from "use existing subreport->browse. Then you click on the link tab of the same screen and choose the accountname (or parameter) from the main report and move it to the right. If you have a field of the same name in the subreport, you should see an automatic parameter in the lower left and on the right you will see the matching field with a check mark for "choose data based on this field." Then just place the sub in the group footer for account name. If you are using a parameter on the main report, then in the lower right, select the matching field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top