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

How to stop the file printing after certain condition the subreport

Status
Not open for further replies.

crystalreport85

Programmer
Sep 27, 2010
51
CA
I have a fields like cart#,bin# and a counter and i am passing order# and counter to a subreport and print the item# correspond to the bin#. If the item# is 0 then it should end the file even though bin# display more then item#.

File should end as soon as there is no item# .How get the value from subreport that the item# is 0.How the shared variables work in subreport.
 
Shared variables are set in a subreport and can then have their value checked in the main report, but only by sections that come after the section that holds the subreport.

In the subreport, have
Code:
Shared StringVar 
if (item#}=0
AllDone := "Y"
To access it in the main report, create another formula field with
Code:
Shared StringVar 
Choice :=  AllDone
Create conditional suppression for the sections,
FromSubreport = "Y"

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top