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

Setting a Global Variable 1

Status
Not open for further replies.

alienjr

Programmer
Mar 19, 2004
6
US
I need to set a variable in one subreport that will carry over to other subreports. I am finding that if the date field is blank in one subreport, I get garbage. I want to be able to take the Date field from one subreport and place it in a second subreport if the second subreport Date field is blank and visa versa. My current variable formula is as such:

Global datevar DD;

if trim({list_wpbins4_hist._DATE}) <> ""

then

DD:= Date (tonumber("20"+right(maximum({list_wpbins4_hist._DATE}),2)),tonumber(left(maximum({list_wpbins4_hist._DATE}),2)),tonumber(mid(maximum({list_wpbins4_hist._DATE}),4,2)))

else if trim(totext(DD)) = "" then

CurrentDate

else

DD;



Any suggestions would be greatly appreciated!!!
 
You need to use [bold]Shared[/bold] variables in order to cross Subreport - Main Report boundaries.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks,

Do I replace the "Global datevar DD" with "Shared datevar DD" ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top