if i declared a global variable in a sub report, shouldn't i be able to call it within that report by anything including another subreport, main and etc... ??
i can't seem to find anything on how i use that global variable.
konad,
I believe that a global variable is only one way, for example from main report to sub. If you are using CR8 you can delcare a "shared" variable and it is accessible to any portion of your report, including subreports. I had a similar situation where I uses a shared array and a shared subscript variable and it worked great! Give it a try.
Depending upon the version of Crystal, In Ver 7, you would call your variable "Shared" in the subreport and create a variable in your main report called "Shared" with the same name. It will retrieve the variable from the subreport. I don't think you can pass a shared variable from 1 subreport to another without utilizing the main report to transition the data.
It's also important where you place your subreport within the main report.
Global variables are only global within the main report or subreport. They don't cross the line. That is the difference between global and shared. Ken Hamady
ok from what i have read "me thinking again" you can't used a variable outside of the "subReport" or "mainreport" even if its all on one report?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.