Re: Filter data within a column

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
> ------------------------------------------------------------------------
>


.



Relevant Pages

  • Re: Filter data within a column
    ... Fields = Employee Code, Component Code, Amount ... Pay Components are Basic, HRA, TA ... I want to filter the Basic amount and put it in Basic Column ...
    (microsoft.public.vb.crystal)
  • Re: Get corresponding column value
    ... This property can be used to store arbitrary data. ... If employee's select resultset is not large, ... into a data structure (dictionary with employee code as key) and put that ... R> retrieve employee first and last name when a user selects an employee ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: College finals help! End User input in PL/SQL?
    ... Employee Master File/Table ... Include your program source code with your ... Write a PL/SQL program that will prompt the end-user to enter some ... Trigger which will compute both the Employee Code and the Annual ...
    (comp.databases.oracle.misc)
  • Re: College finals help! End User input in PL/SQL?
    ... Employee Master File/Table ... Write a PL/SQL program that will prompt the end-user to enter ... Trigger which will compute both the Employee Code and the Annual ... Seeking the answer is not cheating. ...
    (comp.databases.oracle.misc)
  • Chaning Blank Query Results to different value.
    ... I import data from one source(called the Financial Cube) into an Access Table ... The financial cube uses an employee code, ... employee name, so I link TblFinancialCube with TblEmployee, which contains ...
    (microsoft.public.access.queries)