Solved

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

Posted on 2014-12-07
3
455 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
  • 2
3 Comments
 
LVL 34

Accepted Solution

by:
James0628 earned 500 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 34

Expert Comment

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

 James
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now