Post

1 follower Follow
0
Avatar

Running reports based on parameters

Hi!

I am trying to use variables in my Word template and having difficulty.

What I need to do is to determine an appropriate package name "on the fly".

I have defined a variable ($$project) and I can set the variable name as needed, e.g. "Enrollment".  What I need to be able to do is to append that variable to a package name, to get the correct package.  For example, I need to get

$repeatPackages where Name = 'Functional Requirements Enrollment'

and I want to be able to change this package name by changing the $$project value.

I have seen code which says $repeatPackages where Name = $$project and I might be able to use $repeatPackages where Name contains $$project, but I don't seem to be able to concatenate $$project with other text and use it as an attribute.

I have tried:

$set $$PackageName 'Functional Requirements ' $$project

$set $$Package Name 'Functional Requirements $$project'

$set $$PackageName Functional Requirements $$project (this seems to give me the correct text string), but

$repeatPackages where Name = $PackageName OR $repeatPackages where Name = '$PackageName' don't work.

Is it possible to do what I need?

Am I missing something?

I'd appreciate some advice.

Happy Turkey!!

Tom

Tom Tomasovic Answered

Please sign in to leave a comment.

1 comment

0
Avatar

As it turns out, concantenating values is not currently supported in the reporting grammar.

One option you could use would be to create a parameter and pass in the complete package name when running your report. For example, add the following section to the end of your report template:

$info
$description "Please enter the package name you would like to report on."
$param $$pkgname
$endinfo

You would then edit your template to something like this:

$repeatPackages where Name = $$pkgname

This won't grant you the ability to report on multiple packages within a single report, but would have the same effect on a package by package basis.

Permanently deleted user 0 votes
Comment actions Permalink