Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

867 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

19 Experts available now in Live!

Get 1:1 Help Now