on 12-21-2015 8:45 AM
Hello everyone,
I am creating a report Showing "Branch wise Quantity.
Group hierarchy is:
GH1: Branch
GH2: Item
The Query Result Looks Like,
BRANCH ITEM QTY
A I1 11
B I2 22
C I1 100
C I2 200
NOTE: Here C is Central Location
On Report The desired Result is:
BRANCH ITEM Branch_QTY C_QTY
A I1 11 100
B I2 22 200
For C_QTY, I have created 3 formulas:
RESET on GH1
WhileReadingRecords;
global numberVar g:=0;
EVAL on GH2
WhileReadingRecords;
global numberVar g;
if({Command_1.Location_id}=1) then
g:=g + {Command_1.Closing_QTY}
DISPLAY on GF2
WhileReadingRecords;
global numberVar g;
g;
BUT I AM GETTING 0 in C_QTY.
Hi Devanshi,
Try this please:
1) Insert a subreport and place it beside 'QTY' field. The datasource of this subreport should be same as that of the Main
2) Right-click the subreport > Change subreport links > Move the 'Item' field to the 'Fields to link to' pane > Select the 'Item' field from the drop-down at the bottom right that says 'Select data in subreport based on field'.
3) Double click the subreport to edit it > Go to Report > Selection formulas > Record.
You should see something like this already:
{Item} = {?Pm-Item}
And an AND condition to this line:
{Item} = {?Pm-Item}
AND
{Branch} = 'C'
4) Add a record selection in the Main report to filter out branch = 'C'
Another way to do this is to create a SQL query and report off of it.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.