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!

Sharing data between sub & main reports

Status
Not open for further replies.

KMerritt2

Technical User
Jun 12, 2006
2
US
I have a problem with a report that I'm hoping someone can help me with. I usually do my reports in SQL, but my system won't let me create a view that groups my data. Consequently, I'm trying to use Crystal Reports to group the data for me.

What I'm wondering is, is there a way to get the main report to look up information in a subreport as if it were a table?

If it is possible to do, I would greatly appreciate any help!

Thanks!

 
Pretty vague, and subreports are generally a bad idea.

If you simply want groups, use the pull down menu Insert->Group and select the field you wish to group on.

I suggest that you seek architectural assistance instead of stating what you want to use by posting basic technical information:

Crystal version
Database/connectivity used
Example data
Expected output

What does "What I'm wondering is, is there a way to get the main report to look up information in a subreport as if it were a table? " have to do with grouping?

-k
 
Why not explain specifically what you are trying to do? You started out talking about grouping and then switched to subreports without explaining how you hoped a subreport would help address the grouping problem.

I guess you could think of a subreport as behaving like a separate table with the join being a left join from the main report to the subreport.

-LB
 
Sorry for any confusion I caused!

I'm using Crystal Reports 8.5 in conjunction with IFS ERP software.

I am limited in the tables/views that I can create in IFS. I can't create a table/view that has the summarized information that I want. What I have is a table that has three columns (Contract, Part No, Qty on hand). For each Contract, and Part No combination I have 12 rows (monthly values) for Qty on hand.

What I need is a table/view that has one row for each Contract, and Part No combination with an average Qty on hand value, but I'm unable to create it in IFS.

I can create a subreport to calculate the average over the group, but it doesn't do me any good unless I can link the correct average qty on hand with the correct Contract and Part No combination in the main report.

From what I understand about sharing variables, which is very little, I can't see an easy way to do this. I was hoping that someone has run into this kind of problem before, and has a solution.

I hope this clears things up! Thanks!
 
You don't need a subreport to compute an average.

Use Insert->Group for the Contract and then again for the Part No.

Place the qty on hand in the details section, right click it and select insert->Summary->Average and select for all groups and a grand total (you can delete what you don't want afterwards.

Now you have averages by Contract and Part. IF you only want it by part, place the contract field alongside the part number field in the part group header, and suppress the contract group header and footer.

Or you could use a cross-tab by selecting Insert-Crosstab and place the Contract in the Column, part in the row, and the qty in the summary section and change the summary to average, it has a different look but yoru clients might prefer it.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top