• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Mimic a sub report on a sub report

Sub report layout
Group Header 1          Department
  Group Header 2          Personnel
    Group Header 3          Work Order Name
        Detail                          List of tasks completed
    Group Footer 3                   Sum of the Task Completed on Work Order

What I would like to do is mimic a subreport after the group footer.
 
I need to populate a section after group footer 3 with multiple items linked to Work Order Name.  Is this possible?
-------------------------------------------
Sample Data
Group Header 1    Maintenance Department
  Group Header 2     John, Doe
    Group Header 3     Maintenance 101                Total completed

          Details              vbr31 Prerequistes                   0
                                   vbr32 Required Reading           2  
                                   vbr33 Test                                0

    Group Footer 3          TOTAL COMPLETED                2

--------------------------------------------------------------------------
 Work Order Routing List: (mimicked sub report)
   
    Description                Signoff      Date Signed
    -----------                     -------      -----------

    Recommended           C.J.          23-Mar-11
    Submitted                  K.T.          24-Mar-11    
   
0
cookiejar
Asked:
cookiejar
  • 4
  • 4
1 Solution
 
mlmccCommented:
Is that data available in the report data?
If so you could aggregate it into arrays and print it out when you need it.

If the data isn't available you could have another subreport in the main report that gets the daya and passes it into the subreport.

mlmcc
0
 
cookiejarAuthor Commented:
The data is available in the subreport.  I am not an advance Crystal Reports developer, so how can I aggregate into an array and print it after group footer 1 in this case?


    Description                Signoff      Date Signed
    -----------                     -------       -----------

    Recommended           C.J.          23-Mar-11
    Submitted                  K.T.          24-Mar-11    
0
 
mlmccCommented:
Add a formula to the report header
WhilePrintingRecords;
Global StringVar Array DescriptionList;
Global StringVar Array SignoffList;
Global StringVar Array DateSignedList;
Global NumberVar Index;

In the group3 header add a formula
WhilePrintingRecords;
Global StringVar Array DescriptionList;
Global StringVar Array SignoffList;
Global StringVar Array DateSignedList;
Global NumberVar Index;
ReDim DescriptionList[1];
ReDim SignoffList[1];
ReDim DateSignedList[1];
Index := 0;
""

In the detail section
WhilePrintingRecords;
Global StringVar Array DescriptionList;
Global StringVar Array SignoffList;
Global StringVar Array DateSignedList;
Global NumberVar Index;
Index := Index  + 1;
ReDim Preserve DescriptionList[Index];
ReDim Preserve SignoffList[Index];
ReDim Preserve DateSignedList[Index];
DescriptionList[Index] := {DescriptionField};
SignoffList[Index] := {SignOffField};
DateSignedList[Index] := CStr({DateField},"dd-MMM-yy");
""

In the group3 footer add a formula too display each array
WhilePrintingRecords;
Global StringVar Array DescriptionList;
Join(DescriptionList,chr(13);

WhilePrintingRecords;
Global StringVar Array SignoffList;
Join(SignoffList,chr(13);

WhilePrintingRecords;
Global StringVar Array DateSignedList;
Join(DateSignedList,chr(13);

You can put the 3 display formulas in the group footer.  Make sure to format them to CAN GROW

mlmcc

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
cookiejarAuthor Commented:
mlmcc,

When I populate the array in the detail section, there are some cases the desciption that is being loaded into the array is null.  That causes the descriptionlist  display height to increase.  See the attachment.  Is there a way that if the value is null not to load into the array?
display-array.png
0
 
mlmccCommented:
Test for a NOT Null field

In the detail section
WhilePrintingRecords;
Global StringVar Array DescriptionList;
Global StringVar Array SignoffList;
Global StringVar Array DateSignedList;
Global NumberVar Index;
If Not IsNull({DescriptionField}) then
(
    Index := Index  + 1;
    ReDim Preserve DescriptionList[Index];
    ReDim Preserve SignoffList[Index];
    ReDim Preserve DateSignedList[Index];
    DescriptionList[Index] := {DescriptionField};
    SignoffList[Index] := {SignOffField};
    DateSignedList[Index] := CStr({DateField},"dd-MMM-yy");
);
""

mlmcc

0
 
cookiejarAuthor Commented:
Thank you.

I am not sure if there is a solution for the following:
 

Due to the number of array lists that I have to insert in the group footer, I can not adjust the array list so that an item in the list does not wrap.

The arrays placed on the report look like the following:
 
DisplayList  SignOffList

1 Recommend  1 Deparment
2 Recommend     Supervisor
3 Approve        2 Department Officer
                        3 Engineer Officer  

I would like it to look like this:
1 Recommend   1 Department
                            Supervisor
2 Recommend   2 Department Officer
3 Approve         3 Engineer Officer
0
 
mlmccCommented:
Can you make the signoff list wider? smaller font?

You can also check when building the array as

If Length({SignoffField}) > 20 then
   DescriptionList[Index] := {DescriptionField} & chr[13]
Else
    DescriptionList[Index] := {DescriptionField};

mlmcc
0
 
cookiejarAuthor Commented:
Thank you, you are definitely an expert.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now