From: dstremmet on
SELECT DISTINCTROW TIMEKEEPING.EMPLOYEENumber, Employees.FirstName,
Employees.LastName, TRADES.Trade, Employees.Salary, Employees.Agency,
Employees.HourlySalary,
IIf([agency]="afs",1.38,IIf([agency]="iss",1.365,IIf([agency]="TSI",1.37,0)))
AS Markup, [salary]*[markup] AS SalaryMarkup,
IIf([agency]="afs",[sumofreghrs]*[salarymarkup],IIf([agency]="iss",[sumofreghrs]*[salarymarkup],IIf([agency]="tsi",[sumofreghrs]*[salarymarkup],IIf([agency]="qc"
And [hourlysalary]="s",[salary]*520,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofreghrs],0))))) AS RegCost,
IIf([agency]="afs",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="iss",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="tsi",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="qc"
And [hourlysalary]="s",0,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofothrs]*1.5,0))))) AS OtCost,
[regcost]/[sumofreghrs] AS AudManhrRegRate, [otcost]/[sumofothrs] AS
AudManhrOtRate, Sum(TIMEKEEPING.reghrs) AS sumreghrs, Sum(TIMEKEEPING.othrs)
AS sumothrs
FROM (Employees LEFT JOIN TIMEKEEPING ON
Employees.EmployeeNumber=TIMEKEEPING.EMPLOYEENumber) INNER JOIN TRADES ON
Employees.Trade=TRADES.[AUTOTRADE#]
GROUP BY TIMEKEEPING.EMPLOYEENumber, Employees.FirstName,
Employees.LastName, TRADES.Trade, Employees.Salary, Employees.Agency,
Employees.HourlySalary,
IIf([agency]="afs",1.38,IIf([agency]="iss",1.365,IIf([agency]="TSI",1.37,0))),
[salary]*[markup],
IIf([agency]="afs",[sumofreghrs]*[salarymarkup],IIf([agency]="iss",[sumofreghrs]*[salarymarkup],IIf([agency]="tsi",[sumofreghrs]*[salarymarkup],IIf([agency]="qc"
And [hourlysalary]="s",[salary]*520,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofreghrs],0))))),
IIf([agency]="afs",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="iss",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="tsi",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="qc"
And [hourlysalary]="s",0,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofothrs]*1.5,0))))), [regcost]/[sumofreghrs],
[otcost]/[sumofothrs], TIMEKEEPING.REGHRS, TIMEKEEPING.OTHRS;

--
dks


"Dorian" wrote:

> Is the query returning the data?
> If the query returns the data, make sure your report control is bound to the
> right column.
> What type of data is this (text, number,date etc.)?
> -- Dorian
> "Give someone a fish and they eat for a day; teach someone to fish and they
> eat for a lifetime".
>
>
> "dstremmet" wrote:
>
> > I have a report based on a query. When I add the fields to the report, some
> > of my fields don't produce data.????
> > --
> > dks
From: dstremmet on
Yes they do.
--
dks


"J_Goddard via AccessMonster.com" wrote:

> Hi -
>
> Run the query on its own, outside of the report. Do the fields have the
> required data when you do?
>
> John
>
>
> dstremmet wrote:
> >I have a report based on a query. When I add the fields to the report, some
> >of my fields don't produce data.????
>
> --
> John Goddard
> Ottawa, ON Canada
> jrgoddard at cyberus dot ca
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access/201004/1
>
> .
>
From: dstremmet on
SELECT DISTINCTROW TIMEKEEPING.EMPLOYEENumber, Employees.FirstName,
Employees.LastName, TRADES.Trade, Employees.Salary, Employees.Agency,
Employees.HourlySalary,
IIf([agency]="afs",1.38,IIf([agency]="iss",1.365,IIf([agency]="TSI",1.37,0)))
AS Markup, [salary]*[markup] AS SalaryMarkup,
IIf([agency]="afs",[sumofreghrs]*[salarymarkup],IIf([agency]="iss",[sumofreghrs]*[salarymarkup],IIf([agency]="tsi",[sumofreghrs]*[salarymarkup],IIf([agency]="qc"
And [hourlysalary]="s",[salary]*520,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofreghrs],0))))) AS RegCost,
IIf([agency]="afs",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="iss",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="tsi",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="qc"
And [hourlysalary]="s",0,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofothrs]*1.5,0))))) AS OtCost,
[regcost]/[sumofreghrs] AS AudManhrRegRate, [otcost]/[sumofothrs] AS
AudManhrOtRate, Sum(TIMEKEEPING.reghrs) AS sumreghrs, Sum(TIMEKEEPING.othrs)
AS sumothrs
FROM (Employees LEFT JOIN TIMEKEEPING ON
Employees.EmployeeNumber=TIMEKEEPING.EMPLOYEENumber) INNER JOIN TRADES ON
Employees.Trade=TRADES.[AUTOTRADE#]
GROUP BY TIMEKEEPING.EMPLOYEENumber, Employees.FirstName,
Employees.LastName, TRADES.Trade, Employees.Salary, Employees.Agency,
Employees.HourlySalary,
IIf([agency]="afs",1.38,IIf([agency]="iss",1.365,IIf([agency]="TSI",1.37,0))),
[salary]*[markup],
IIf([agency]="afs",[sumofreghrs]*[salarymarkup],IIf([agency]="iss",[sumofreghrs]*[salarymarkup],IIf([agency]="tsi",[sumofreghrs]*[salarymarkup],IIf([agency]="qc"
And [hourlysalary]="s",[salary]*520,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofreghrs],0))))),
IIf([agency]="afs",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="iss",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="tsi",[sumofothrs]*[salarymarkup]*1.5,IIf([agency]="qc"
And [hourlysalary]="s",0,IIf([agency]="qc" And
[hourlysalary]="h",[salary]*[sumofothrs]*1.5,0))))), [regcost]/[sumofreghrs],
[otcost]/[sumofothrs], TIMEKEEPING.REGHRS, TIMEKEEPING.OTHRS;

--
dks


"Jeff Boyce" wrote:

> Post the SQL of the query.
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "dstremmet" <dstremmet(a)discussions.microsoft.com> wrote in message
> news:C0247D42-942E-49C1-8D29-D15941F4E35C(a)microsoft.com...
> >I have a report based on a query. When I add the fields to the report,
> >some
> > of my fields don't produce data.????
> > --
> > dks
>
>
> .
>
From: Jeff Boyce on
Which fields aren't showing up?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"dstremmet" <dstremmet(a)discussions.microsoft.com> wrote in message
news:C0247D42-942E-49C1-8D29-D15941F4E35C(a)microsoft.com...
>I have a report based on a query. When I add the fields to the report,
>some
> of my fields don't produce data.????
> --
> dks