Solved

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

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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