on 03-13-2015 8:29 PM
Running CR2013. I need assistance in formatting the reporting of an array. I know very little about arrays, as I'm just getting into them.
I have the following as an example dataset. Short version is a list of items where the ProcessID will have the same data item repeated various time and the changing data is in the JOBOPS field. I need to report the ProcessID once, and the JOBOPS array (based upon ProcessID) on the same line. There are multiple fields to display on the detail section, however JOBOPS is the only array that needs to be reported.
I have Initialize, Load, and Print Array formula fields. However I can't get the completed array to display only once on the detail section. It loops through each value and increments the array values as it creates the array.
INT: (Report Header)
shared stringVar array JobOps := "";
Shared numberVar x := 1;
LOAD: (Details)
Shared numberVar x;
Shared stringVar array JobOps;
JobOps [x] := {JobOperations.jmoProcessID};
redim preserve JobOps[UBound(JobOps)+1];
x := x+1
PRINT: (Details)
Shared stringVar array JobOps;
Join (JobOps, ", ")
Thanks in advance!
Dataset:
ProcessID | JOBOPS |
---|---|
123 | INS |
123 | PROG |
123 | QA |
124 | TPL |
124 | INS |
124 | PROG |
124 | INS |
Current Output:
ProcessID | JOBOPS |
---|---|
123 | INS |
123 | INS, PROG |
123 | INS, PROG, QA |
124 | TPL |
124 | TPL, INS |
124 | TPL, INS, PROG |
124 | TPL, INS, PROG, INS |
Desired Output:
ProcessID | JOBOPS |
---|---|
123 | INS, PROG, QA |
124 | TPL, INS, PROG, INS |
Insert a group on ProcessID. Create a formula that simply displays the variable in the Group Footer.
Hide the detail section.
Reset the variable in a group header formula (though it looks like you are already doing a proper reset).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Change the LOAD formula to:
Shared numberVar x;
Shared stringVar array JobOps;
If {JobOperations.jmoProcessID} <> '' then
(
x := x+1;
redim preserve JobOps[x];
JobOps [x] := {JobOperations.jmoProcessID};
);
'';
Also, the drop-down on the top (inside this same formula field) that reads 'Exceptions for Nulls', change it to 'Default Values for Nulls'.
-Abhilash
Thanks for the reply. I changed the LOAD formula to the above and changed to 'Default Values for Nulls'.
Having done this, my report is still suppressing null values in the jmoProcessID field that are captured in the array. I have checked my filtering, etc. and don't see anywhere I am excluding nulls.
Any suggestions on where to start trouble shooting?
Thanks!
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.