Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter formula

Status
Not open for further replies.

nb4884

IS-IT--Management
Aug 2, 2010
141
US
Hi All,

Have a question on formula based on parameter values.

I have a parameter on region and report displays costs of projects in that particular region. For ex if region = 1 then report displays costs for all projects in region 1.

Region Values= 1,2,3,...10
?region=
(If ({?region} = '' or {?region} = '0')
Then 1=1
Else{query1.region} = {?region})

As said, report displays project costs based on region chosen. And here is the formula for the costs column.
@region:
if ({?region} = {query1.region}
then ({query1.cost}) else tonumber({@null})

Now apart from this column I always want to display project cost for region 10, as another column. No matter what region is chosen in filter. Can anyone suggest me a formula for this?

So basically there are 2 columns, One for cost based on a region chosen and one for cost where region is always 10.

I created this formula for region 10 but it did not give me results: Here is this case I chose region 1 as parameter and when ran the report there were no results for column @region10
@region10
if ({?region} = '10'
then ({query1.cost}) else tonumber({@null})


Pls suggest: Ver CR XI


Thanks

 
if {query1.region} = '10' then
{query1.cost} else
tonumber({@null})

You want the field, not the parameter value. This assumes you have allowed region 10 into the report (that it is not excluded in the selection formula).

-LB
 
I am sorry , my region10 formula was this only:

@region10
if {query1.region} = '10' then
{query1.cost} else
tonumber({@null})

but can i display the ?region formula column and region10 formula column at the same time?

For example if I run report for region 1, then the columns would be for region 1 and region 10

with this formula of region10 I am getting blank values.


Thanks
 
Other formulas would not affect this one. The question is whether you have allowed all of these regions into your report or whether some our excluded because of your selection formula or the type of table joins.

Note that the above formula is for the detail section. If you want a summary, you need to right click on it and insert a sum at whatever level you want the summary--group or grand total.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top