I have a main report with a subreport. The two are linked by a jcode. I find an amount for Drug#1 on the main report and then find an amount for Drug#1 on the subreport. Basically, main table is Insurance#1 and subreport is Insurance#2. I then calculate a difference from the two. The problem comes when there isn't a Drug#1 in the subreport. My formula gets an error because an amount minus a null = error. I have tried using IsNull/HasData but without success.
This is the control source on my text box:
=[ttl_allowable]-[Reports]![rptPlan_Comparison_By_Payor]![rptPlan_Comparison_By_Payor_Sub]![ttl_allowable]
How can I make the subreport value equal 0 if nothing is matched and brought back?
Or
Is there a way to link the main report and subreport to where only matching JCode records are brought back in the subreport?
Any suggestions are appreciated.
This is the control source on my text box:
=[ttl_allowable]-[Reports]![rptPlan_Comparison_By_Payor]![rptPlan_Comparison_By_Payor_Sub]![ttl_allowable]
How can I make the subreport value equal 0 if nothing is matched and brought back?
Or
Is there a way to link the main report and subreport to where only matching JCode records are brought back in the subreport?
Any suggestions are appreciated.