Re: Filter data within a column
- From: "Iain" <iains@xxxxxxxxxxxx>
- Date: Tue, 20 Dec 2005 13:16:13 -0000
Well, one or two ways spring to mind.
1. Create three formulae. Basic, HRA, TA
Basic:if(component code="Basic")then amount else 0
HRA:if(component code="HRA")then amount else 0
TA:if(component code="TA")then amount else 0
so far so good, bear in mind that the details line will have a separate
entry for each component code, so you'll need to insert a group by employee
code, and print sum totals for each of these formulae (and suppress the
data)
2. Create three commands to act as tables. (Add Command in the database
section).
1. Select * from Employee Pay Components where Component code = 'Basic'
2. Select * from Employee Pay Components where Component code = 'HRA'
3. Select * from Employee Pay Components where Component code = 'TA'
Link each of these commands to the employee master table as an outer join on
employee code. You then have the amount field available for each of the
three 'conditions'. For large databases this may run a little slowly, and if
you are adding selections to the pay components database (dates etc) they'll
need to be passed in to the commands. However, you will only have one result
line per employee code, so the details section is useable.
3. Use a crosstab report to put the components across the top and the
employees down the page.
Regards,
Iain
"muralikrishnan21" <muralikrishnan21.1zwjm6@xxxxxxxxxxxxxxxxxxxxx> wrote in
message news:muralikrishnan21.1zwjm6@xxxxxxxxxxxxxxxxxxxxxxxx
>
> Hi,
>
> I'm a beginner. I created a Crystal Report (v9.0) from an Employee
> Database,
>
> Table 1 = Employee Master
> Fields = Employee Code, Name
>
> Table 2 = Employee Pay Components
> Fields = Employee Code, Component Code, Amount
>
> Pay Components are Basic, HRA, TA
>
> I am trying to make a report with these columns:
> Employee Code, Name, Basic, HRA, TA and Total
>
> Question: I want to filter the Basic amount and put it in Basic Column
> in the report, HRA amount in HRA column and so on. How do I do it?
>
> Please help.
>
> Thanks in advance
>
> Murali Krishnan M S
>
>
>
> --
> muralikrishnan21
> ------------------------------------------------------------------------
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------
>
.
- References:
- Filter data within a column
- From: muralikrishnan21
- Filter data within a column
- Prev by Date: Re: Simple printing questions
- Next by Date: Re: Max and Min Functions
- Previous by thread: Re: Filter data within a column
- Next by thread: Max and Min Functions
- Index(es):
Relevant Pages
|