Post

1 follower Follow
0
Avatar

Reporting code is not working

Can someone explaing to me why this block of code works fine:

$repeatPackages where Parent = ‘Business’

$Name

$exclude when not Packages Exist

$listPackages $Name

$endExclude

$Break

$endRepeatPackages

 

but this one generates an error (Missing $endexclude keyword for $exclude section.):

 

$repeatPackages where Parent = ‘Business’

$Name

$exclude when not Packages Exist

$repeatPackages1

$Name

$endRepeatPackages1

$endExclude

$Break

$endRepeatPackages

 

Appreciate any assistance.

Thanks!

Tom

Tom Tomasovic Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hey Tom,

I think it's an easy fix, even though the error message is a bit misleading. Since you've got two levels of package nesting in your second example, they both need to be numbered so the reporting engine can keep them separated. Try putting an integer on your first $repeatPackages (i.e., $repeatPackages0) and the matching $end, and that should work for you.

Jason

Permanently deleted user 0 votes
Comment actions Permalink
0
Avatar

Jason,

 

You are good!!!!

 

Working now. (FYI, you should update your Custom Reports document to reflect this.)

 

Tom

Tom Tomasovic 0 votes
Comment actions Permalink
0
Avatar

Thanks Tom! Section 5.6 in the custom reports user guide covers nested repeats of the same type:

"In order for CaseComplete to match $repeats and $endrepeats, you must include a digit in the $repeat and $endrepeat statements to uniquely identify them..."

I agree that the example that follows could be clearer - it starts off with a single $repeatRequirements keyword before the "real" example of a couple of nested $repeatChildRequirements statements with the requisite numbering - and I'll take a look at cleaning that up some to make it more user-friendly.

Permanently deleted user 0 votes
Comment actions Permalink