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!

Same record different result

Status
Not open for further replies.

CrystalBart

Programmer
Jun 9, 2004
12
BE
Hi!

I am new with CR9 and I have the following problem:

I have the following table:

Header: Production Line 1 Production Line 2
Shift 1 | Shift 2 Shift 1 | Shift 2
-------------------------------------------------------
Details:
Code Produced|Produced Produced | produced

As you can see I am using the same detail data in each column. I want to print the production amount for each production line and each shift seperately. So I have to check if the record belongs to production line 01 or 02 and if it belongs to shift 1 or 2.
The reason why I am not using a cross table is that It does not give me enough possibilities to expand the table with extra data.
I have used a seperate formula-field for each column (production line / shift). Each formula field has its own custom function to check the Shift and production line. The function returns a true or false value.
When this works I will be able to group the records by code, summarize them and suppress the details. This way I will have my custom made cross-tab.
The only problem is that the report shows no data.
An example of one formula field, used in the detail section:

if F_Amount_Prod_O ({TableX.{Production_line},{TableX.Shift})=true then
{Amount_Produced}

the formula:

Function F_Amount_Prod_O (Line as string, Shift as string) as boolean

Select case Line

Case "01"
select case Shift
case "1"
F_Amount_Prod_O = True
case else
F_Amount_Prod_O = False
end select

Case else
F_Amount_Prod_O = False
end select

end function

Thanx for your help in advance! Good alternatives for how I am creating the report are very welcome!

CB
 
Try posting technical information about the environment and requirement:

Database/connectivity used
Example data
Expected output

As a further aid, try posting the Database->Show SQL Query and the Report->Edit Selection Formula->Record

Text descriptions tend to be ambiguous, such as in this case, hence the limited responses.

-k
 
You could just use the following syntax:

//{@col1}:
if {table.productionline} = 1 and
{table.shift} = 1 then {table.amount}

//{@col2}:
if {table.productionline} = 1 and
{table.shift} = 2 then {table.amount}

Etc.

-LB
 
Hey!

Thanx for the help but my problem has already been solved. Everything worked perfectly. The only problem was that I forgot to un-suppress my detail section. STUPID STUPID STUPID!! I guess thats what you get when your still a rookie :)

CB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top