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

Table linking Formulas

Status
Not open for further replies.

dogmatix

IS-IT--Management
Oct 23, 2001
5
GB
Hi, I am quite new to the crystal report thing, but am learning the ins and outs quite quickly. I have, however, come across some unwanted responses using formulas. If anyone can help me please reply to this.
My problem is this, I have two tables that I wish to display data from, but I only know the sql for the query. I have created a group to work through each part showing stock amounts, from another table I wish to display the amounts in different locations which should all sum to the total amount. I have used a subreport as making adjustments to the formula seemed to be global and resulted in no data. Here is the sql I want to transform into a query.

SELECT SUM(ttqty) FROM stitems WHERE stocka='thepart' AND ttwhouse='uk'

If you can provide a solution to this please let me know, and finally 'thepart' is a parameter being passed on the main report, how do I link that to the subreport.

Thanks
 
From the information given, you only need a single report.

Put the ttqty field in the details section, group by stocka.

Right click on the ttqty field and select 'Insert Sub Total'
from the menu.

Should do the trick.
 
Thanks for that, I have managed to get the desired data using sub reports for each location. But even though the reports are the same only the first sub report seems to be shown, even though I have noew made the query identical. Have you ever heard of this type of thing??
 
Where are you putting the sub reports within the container report? Have you elected to show sub report on demand??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top