Sunday, December 27, 2015


Dear All, this time what I am going to share with you is passing summarized variables from sub-reports to main-reports in crystal reports. Here, we have different ways to pass summarized fields from sub-report to main-report and vice-versa but what I am going to share with you is quite simple and easy as well.

Below I am describing the steps through which you can perform this task.
  1. Just create a new Crystal report and call it “mainpage.rpt”.
  2. Now add formula field and name it what you like. I am giving it name “mainTotal”
  3. Edit “mainTotal” formula field and write in it shared numbervar x; [note:  you can take any type like Boolean , etc.]
  4. Now, add a sub-report in main report and also create a formula fields.[Repeat step 2 and 3]
  5. Now switch to main report again.
  6. Right click on sub-report. You will see in menu option “Change Subreport Links. Click on it.
  7. Bring that “mainTotal” field in “fields to link”  and uncheck checkbox having “Select data in subrport based on field”.
  8. Press OK Button.

Hey All………. Congrates. You have created your first report that is able to share values between main report and sub-report.

Kindly see below image where to keep sub-report and summarized variable so that if you are receiving value of previous section not current section then you can make necessary changes and get the correct one report.

If above post help you then please leave a comment.

Difference Between Apache Common Logging and Log4J

Dear Folks, Log4j is a logging framework, i.e. it provides the code to log messages while Commons-logging is an abstraction layer for log...