×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Shared Variable from One Subreport to Other Subreport

Shared Variable from One Subreport to Other Subreport

Shared Variable from One Subreport to Other Subreport

(OP)
Crystal Reports for Enterprise
Hi Experts,

In order to display percentage previous records in group footer of main report, I placed a sub-report in the group header of main report. The sub-report calculates running totals that are placed into shared variables. The main report retrieves the values (last and current year values) of the shared variables correctly.

My question how to share variables from sub-report to another sub-report? The same percentage formula displays zeros.
Please help!!!

RE: Shared Variable from One Subreport to Other Subreport

Are the sub-reports in different sections? Shared values from a sub-report are not available until the next section of a report.

RE: Shared Variable from One Subreport to Other Subreport

(OP)
Hi kray,

yes, the first sub-report that declared shared variables is in the group header of main report and the second sub is in report footer of the main report.
I can see that the second sub-report displays only the last group value from first sub-report. The second sub contains the following formula:
if lastyear <> 0 then
(currentyear - lastyear) % lastyear
ELSE 0
As result, zeros are displayed in second sub-report. What to do to display all values?
thanks kray for reply

RE: Shared Variable from One Subreport to Other Subreport

If the second sub is in the report footer, then it should have the values from the last group header sub-report. It makes processing sense.

So are you saying that you somehow want to process all values from each group? If so, a different approach will be needed.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close