Solved

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

Posted on 2014-12-07
3
482 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 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 35

Expert Comment

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

 James
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 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