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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Select items from a field to display on Report Header 1

Status
Not open for further replies.

chrish47

MIS
Oct 6, 2002
29
US
I have created a crystal report from a query (in PeopleSoft - Oracle) and the query passes 2 paramaters in one of the columns (the Fiscal Year entered in the Prompt, and the Accounting Period entered in the Prompt). I am trying to figure out how to get the Crystal report to show these paramaters on the report (the Paramater fields show up as empty when I put them on the report, because the query is asking for the paramaters and I can't figure out how to get crystal to ask for the paramaters and pass them to the query).

So to get around this I have added a column to my query and passed the paramaters back in this column, now I need to look at a different column and select the value from this column based on the value of the first column.

This is a little confusing. Here is the structure and a sample.

columns:
Project Amount Source Period
12345 100.00 THIS_PERIOD 2002
12346 200.00 PRIOR_PERIOD 4

and so on, other values for Source are FY2001 and FY2002 but there is no value for Period.

What I want to do is have a formula on the Report Header that selects the value from period (2002) when Source is THIS_PERIOD and another one that selects the value from Period (4) when the Source is PRIOR_PERIOD. The report is a crosstab report with the Project as the rows and the Source as the Columns (there are 4 columns + a total).

Any help or guidance would be greatly appreciated.

Thanks,
Chris Huss
CWU Accounting

 
You need 2 formulas for each value to carry. Put this on the details band and call it {@ThisPeriod}:

if { Source }= "THIS_PERIOD"
then {value}
else ""
//(or else 0 if value is numeric)


Then put this formula in the RH:

Maximum ({@ThisPeriod})

Repeat this for the other value. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Excellent,

Thanks Ken, I knew that there had to be an easy way to do this, I just couldn't figure it out without a little help.

Thanks,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top