Skip to Content
avatar image
Former Member

Get minimum from variable from subreport

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?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 22 at 04:26 PM

    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

    Add comment
    10|10000 characters needed characters exceeded