?
Solved

Crystal Report Shared variable from sub report not showing in main report.

Posted on 2014-12-07
3
Medium Priority
?
503 Views
Last Modified: 2014-12-07
I have Sub report that can not pass shared variable to main report.
I am checking just three courses English,French,Math and in sub report data looks ok shared variables have proper values but they are not shown in shared variable in main report.
Sub report is above section where main report has to show shared variable value.
Not sure what is wrong.
Report-Card-12-07-14-Test.rpt
0
Comment
Question by:Taras
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
James0628 earned 2000 total points
ID: 40485993
In the subreport formulas that set the variables, you always set them to "" at the beginning.  For example, in PassSem1EngGrade, you have EngS1G:="" before the If.  So, when the subreport reads an ENG record, it puts the grade in EngS1G, but then when it reads the next record, the formula sets EngS1G back to "", erasing the grade from the previous record.  Remove the line before the If that sets the variable to "".  Using PassSem1EngGrade as an example:

WhilePrintingRecords;
Shared StringVar EngS1G;
EngS1G:="";    //  Remove this line

If InStr({StsGrdsGrds_1.StsGrdsGrds_1_ClassID}, "ENG") > 0 Then

EngS1G:= {StsGrdsGrds_1.StsGrdsGrds_1_Grade};

EngS1G;

Open in new window

0
 

Author Closing Comment

by:Taras
ID: 40486059
James thanks a lot.
0
 
LVL 35

Expert Comment

by:James0628
ID: 40486199
You're welcome.  Glad I could help.

 James
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month12 days, 5 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question