How to Display Query Parameters in Oracle Unifier Primavera

This post is especially for anyone designing a Crystal Report for Oracle Unifier Primavera – kinda technical.

It’s easy enough to display “Additional Parameters” on a Crystal Report – the report formulas simply need to be the exact same name as the parameter name. But Query Parameters are passed as a big, ugly string like this:

<|>AZ1,AF1,AH1<|>GAS-Common,GAS-Enhanced CO2 Compressor,GAS-Other<|>10-10150-31,12-12010-31,16-16010-22,20-20010-21,20-20050-21,20-20100-21,20-20150-21,20-20200-21,20-20250-21,20-20400-21,20-20450-21,20-20500-21,30-30050-22<|>65,12,82,86,84,20,30,10,80,72,16<|><|><|>G&A Allocation,NA,TelAV GmbH,2012-04 April Project  Cost,2005 to 2010 Project Costs and Land Adjustment<|>incurred costs,trends,contract,original budget,project change notice,change order<|>EPC,Owners,EDS

Ugly indeed.

Here is the solution:

  • Place an empty formula called “SearchConditionF” in the Report Header
  • Create another formula, and call it something like “Query Param”. Here is the syntax for this formula:
    • Replace ({@SearchConditionF},”<|>” ,CHR(10))
    • The formula replaces the “<|>” with a carriage return, placing each distinct param value list on its own line
  • Place the formula on the report. Set the formula formatting to “Can Grow” so it can expand down the page depending on how many query parameters are configured. Parameter fields left blank will display as a blank line.
  • Add a text object with the names of each query parameter, with a carriage return after each
  • Make the font sizes the same for the formula and text object
  • Line them up horizontally while in Preview (there will always be a blank line to start all the Query Param display lines)

Limitation: if any of the lists of values is really long, it will run over into the next line, so the formula field needs to be made as wide as possible on the report canvas. Ideal for Landscape orientation.

As ever – if you have any Crystal Reports questions, send ’em on over!

, , , ,

No comments yet.

Leave a Reply

CommentLuv badge