If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Making a Prompt optional from within a Data Item.

Started by andy_mason_84, 29 Oct 2012 06:41:02 AM

Previous topic - Next topic

andy_mason_84

Hi All,

OK - in my report I have a data item, which is running two prompts from Company Description.

for example:
MAXIMUM( IF ([Company Description]=?Nominated?) THEN (1) ELSE (0)  for [Product Code])

MAXIMUM( IF ([Company Description]=?Selected?) THEN (1) ELSE (0)  for [Product Code])

This is so we only bring in products which certain company has ordered, but we can still bring in the data from other companies who have ordered the same product for comparisons.

When i run the report this parameter is 'Required', any idea how to make it optional when it is not in the Detailed Filters section so it is not as easy as clicking on it and making it Optional.

Any ideas?

Cheers,

AM

pricter

I can think two possible ways

The first is to add to your prompt a static choice and make it the default selection.

The second to use the macro "prompt" and set a dummy default selection in the macro.

Bark

Quote from: andy_mason_84 on 29 Oct 2012 06:41:02 AM
Hi All,

OK - in my report I have a data item, which is running two prompts from Company Description.

for example:
MAXIMUM( IF ([Company Description]=?Nominated?) THEN (1) ELSE (0)  for [Product Code])

MAXIMUM( IF ([Company Description]=?Selected?) THEN (1) ELSE (0)  for [Product Code])

This is so we only bring in products which certain company has ordered, but we can still bring in the data from other companies who have ordered the same product for comparisons.

When i run the report this parameter is 'Required', any idea how to make it optional when it is not in the Detailed Filters section so it is not as easy as clicking on it and making it Optional.

Any ideas?

Cheers,

AM


MAXIMUM( IF ([Company Description]=#prompt('Nominated','datatype','defaultValue')#) THEN (1) ELSE (0)  for [Product Code])

Where datatype can be integer, string, memberuniquename (if a cube), etc... and defaultValue will be the value to apply if the prompt is not selected.

Regards,

Bark

maxchuie

I have a data item with a prompt that I need to make not required is there a way?

Case ?pRankGroup?
When 'Top 5' then '5'
When 'Top 10' then '10'
When 'Top 15' then '15'
When 'Top 20' then '20'
When 'Top 25' then '25'
Else 'All'
end

Lynn

Why not try a prompt macro with a default option as suggested in the earlier posts?

maxchuie

Never done a prompt macro will give it a try thx

Lynn

I think the FM user guide has decent documentation on the prompt macro. Works the same way in Report Studio.

I think you could just replace ?pRankGroup? in your expression with the macro below. That syntax would reference your parameter name, specify string as the datatype, and All as the default value.

#prompt('pRankGroup','string','All')