BradCustom
IS-IT--Management
I have a pretty simple report in Crystal XI that joins data from an Excel spreadsheet and a SQL Database. There are only two groups
GH1 Schedules_Excel_Download_.Part Nbr
GH2 Schedules_Excel_Download_.PO Nbr
GH1b has two subreports Sub-On Hand Qty and Sub-ProdQty
GH1c has two passed variables @OnHandQtyPassed and @InProdQtyPassed
GH2 has one subreport: SalesOrderDetail
Details: Schedules_Excel_Download_.Open Sched Qty
Schedules_Excel_Download_.Need Date
Schedules_Excel_Download_.Status Code
GF1 has two formulas:
Sum of Schedules_Excel_Download_.Open Sched Qty
@TotalShort
Below are all of the formulas listed above.
@OnHandQtyPassed
@InProdQtyPassed
GF1 formula:
@TotalShort
What I'm trying to do is to allow the user to either see all records or to see only records where the result of @TotalShort is >=1
I hope there is enough information to explain what I am trying to achieve. If not please let me know and I'll post the additional information.
Thank you your the help!!
GH1 Schedules_Excel_Download_.Part Nbr
GH2 Schedules_Excel_Download_.PO Nbr
GH1b has two subreports Sub-On Hand Qty and Sub-ProdQty
GH1c has two passed variables @OnHandQtyPassed and @InProdQtyPassed
GH2 has one subreport: SalesOrderDetail
Details: Schedules_Excel_Download_.Open Sched Qty
Schedules_Excel_Download_.Need Date
Schedules_Excel_Download_.Status Code
GF1 has two formulas:
Sum of Schedules_Excel_Download_.Open Sched Qty
@TotalShort
Below are all of the formulas listed above.
@OnHandQtyPassed
Code:
whileprintingrecords;
shared numbervar OnHandQty;
OnHandQty
The pass from the subreport:
whileprintingrecords;
shared numbervar OnHandQty:={@TotalOnHandQty}
@TotalOnHandQty
if isnull (sum({Material_Location.On_Hand_Qty})) then 0 else
sum({Material_Location.On_Hand_Qty})
@InProdQtyPassed
Code:
whileprintingrecords;
shared numbervar InProdQty;
InProdQty
The pass from the subreport:
whileprintingrecords;
shared numbervar InProdQty:=({@InProdQty})
@InProdQty
if isnull ({Job.Make_Quantity}) then 0 else
(Sum ({Job.Make_Quantity}, {Job.Part_Number}) - Sum ({Job.FG_Transfer_Qty}, {Job.Part_Number})) - Sum ({Job.Act_Scrap_Quantity}, {Job.Part_Number})
GF1 formula:
@TotalShort
Code:
Sum ({'Schedules_Excel_Download_'.Open Sched Qty}, {'Schedules_Excel_Download_'.Part Nbr})-({@InProdQtyPassed}+{@OnHandQtyPassed})
What I'm trying to do is to allow the user to either see all records or to see only records where the result of @TotalShort is >=1
I hope there is enough information to explain what I am trying to achieve. If not please let me know and I'll post the additional information.
Thank you your the help!!