Joined: 22 Aug 2011
Online Status: Offline
Posts: 2
Topic: Sub Reports! Posted: 22 Aug 2011 at 12:53pm
Is it possible to add or subtract data from to separate sub reports? Here is my set up:
Main report shows:
Column 1 = Technician names Column 2 = Sub Report 1 (shows total number of orders tech has, linked by Employee ID to the main report.) Column 3 = Sub Report 2 (shows total number of units the tech has on hand, linked by Employee ID.)
Main report parameters are showing all technicians that the "fire date" is null, Employee Type is equal to "T" for technician.
Now the reason I have to do sub reports is because I can't get the totals without using them because when I do the report just blows up and I get crazy data!
So what I'm trying to do is have the report subtract the number shown from Sub Report 1 (which is a summary count of work orders) from Sub Report 2 (which is a summary count of units)?
Is this possible or am I pulling out my hair for no reason?
If you want to use a field from a sub report in the main report either in a formula or in the report itself then you must declare a variable in the subreport first
e.g.
Formula Item Count in Sub Report which contained the items of the contract:-
WhilePrintingRecords;
Shared NumberVar iItemCount;
If ({CONTITEMS.SAFEFLAG} = false or {CONTITEMS.TYPE} = 5 or {CONTITEMS.PARITEM}<>{?Pm-CONTITEMS.RECID}) = false then
iItemCount := iItemCount + 1
Then you can create a formula in the main report using the variable or just to print the variable on the report
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum