Quantcast
Viewing all articles
Browse latest Browse all 10473

SubReport Data in a Main Report Yet Again

I have been trying and reading posts all day.

 

1. The shared variable formula used in the main report will show any/correct value only if its placed atleast 1 section below the one where the sub report exists. (I've Done This)

 

2.The formula that is used inside the sub report needs to be physically placed on any of the sections within that sub report(you can suppress it to avoid displaying the value). (I've Done This)

 

3. Due to design constraints if you cannot move the sub reports from Report Footer then you can atleast mock them and place respective copies in the Report Header.These can contain just the summary values, thats it. Further, to nullify the display effect you can suppress all the sections of these sub reports and make them so small such that they appear as tiny dots and place them in extreme corners of the Report Header section. (Not sure this would apply since I have met #1 and #2)??

 

The blue outline/highlight is the passed total from by first subreport locatd in Group Header 1b. As you can see it is passing 0.

Image may be NSFW.
Clik here to view.
Capture.JPG

In the subreport, here is the formula used to get the OrderQty.

WhilePrintingRecords;

Shared NumberVar OrderQty;

OrderQty := OrderQty + {iptrn.ipqord}

 

I am using the "three part" formula to to calculate the Qty because when using a sum it sums up all records and I need to to sum by change in item. The subreport is calculating correctly. I have also tried a running sum but this won't pass either and I get messages about not being able to use the formula with itself so gave up that avenue.

 

In the main report, here is the formula used to display the OrderQty.

WhilePrintingRecords;
Shared NumberVar OrderQty;
OrderQty

//@MainFormula
//Returns the value that was stored in the shared number variable called
//OrderQty in the subreport

 

I think I have this all correct but still getting zero so i am not sure if it has something to do with resetting the value and maybe my linkages are not correct? Any help will be appreciated. I have very little experience with Crystal and less with sub reports.


Viewing all articles
Browse latest Browse all 10473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>