cancel
Showing results for 
Search instead for 
Did you mean: 

Get minimum from variable from subreport

Former Member
0 Kudos

I have a report I am building in Crystal Reports 2011. The report is complex with a few subreports to get the data I need. The main report is grouped by kit number. The details are the parts needed to make the kit with the quantity need to make the kit pulled from the database. On a subreport, I am pulling the stock available and linking that to the part number on the detail section. I am then doing a calculation on main report detail of the parts needed to build the kit divided by parts available. I then need to get the minimum from this calculation to put in the group (kit) to show what quantity can be built based on the components available. Since I am using a shared variable in the calculation I need to get the amount of kits that can be produced based on current component stock, I receive the cannot summarize error when trying to get the minimum. Is there a way to do this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Create another shared variable in your existing variable formula.

Call it something like VarMin, where ever you reset your original var set the new varmin to a very high figure.

If Varmin > existingVar then varmin:= existingvar

Ian

Answers (0)