Showing posts with label employees. Show all posts
Showing posts with label employees. Show all posts

Thursday, March 22, 2012

distinct count

Hi

I have a table which stores the shift information for employees. The table contains 10 columns as Employeename,Employeeno,month,year,shifttimings etc. If an employee works a day in a particular shift, then a row will be inserted in to the above table for that employee.

Now at the end of the month i wanted to calculate the shift details for each employee for a particular month of a given year like employeename,employeeno, noofdays(countof shiftdays).

Can some body help?

Thanks in Advance!

Santhosh

Select

Employee.EmployeeName,

Employee.EmployeeNo,
|||

Select EmployeeName, EmployeeNo, Count(*) As NoOfDays

From EmployeeShift

Where Month = @.Month And Year = @.Year

Group By EmployeeName, EmployeeNo

|||

You could create a view as

Select EmployeeName, EmployeeNo, Month, Year, Count(*) As NoOfDays

From EmployeeShift

Group By EmployeeName, EmployeeNo, Month, Year

and apply Where to it...

sql

Friday, March 9, 2012

Displaying image in table

Hi,
I have a table which displays the list of employees in my company. I am
trying to display the picture of the employee alongside with the
information.
Is this possible in Reporting Services? The pictures will be stored in
a folder and the name of the picture correspond to the name of the
employee.
Any help would be greatly appreciated.
Thanks.
--
JordanHi Jordan,
You can place an image in the details section of the table. Place it as a
"web" image, but don't worry about entering the URL. Once it has been placed
in the table, goto the image properties tab and find the "Data" section.
Leave MIMEType blank, and make sure the source is external. Now in the
value, you need to build a string that points to the image on disk, so it
could be something like this:
="\\ServerName\Photos\" & Fields!PhotoName.Value & ".jpg"
Where the name of the photo is stored in the db, else you can build the name
from whetever your photo indexing system is (maybe an ID or something). I
store our images based on an ID field in the db, then just use that field to
get the image.
Hope this gives you a start.
Andre
"Jordan" wrote:
> Hi,
> I have a table which displays the list of employees in my company. I am
> trying to display the picture of the employee alongside with the
> information.
> Is this possible in Reporting Services? The pictures will be stored in
> a folder and the name of the picture correspond to the name of the
> employee.
> Any help would be greatly appreciated.
> Thanks.
> --
> Jordan
>|||Hi Andre,
It works like a charm.
Thanks.
--
Jordan|||I am trying to do the same thing but having trouble, Does the image control
support .tif files' I do not see them as an option. Seems weird that they
would not be supported!'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>|||I am trying to do the same thing but having trouble, Does the image control
support .tif s'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>|||I am trying to do the same thing but having trouble, Does the image control
support .tif files' I do not see them as an option. Seems weird that they
would not be supported!'
"Jordan" wrote:
> Hi Andre,
> It works like a charm.
> Thanks.
> --
> Jordan
>

Sunday, February 19, 2012

Display pictures in Northwind on the VB form

Hi,
In Northwind , there is an employees table which store photos. It seems the
pictures are linked to the picture files because there is a photopath field
containing the path. When I try to display the photos on the VB form, it g
ive me a error. I used the same way to display the logos in the pubs and th
ere is no problem. In VB, I used ODBC data source with ADODB control and a
picture control. Could you try it and tell me how to solve the problem?
Thanks a lotHi
The Photopath column contains the path to the photo. This has a http address
which you may have to change. The logo column in the PUBS database (pub_inf
o table) is an Image datatype which is the same datatype as the photo column
in the Northwind Employee table.
John
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message news:%23pkBQO0YF
HA.616@.TK2MSFTNGP12.phx.gbl...
Hi,
In Northwind , there is an employees table which store photos. It seems the
pictures are linked to the picture files because there is a photopath field
containing the path. When I try to display the photos on the VB form, it g
ive me a error. I used the same way to display the logos in the pubs and th
ere is no problem. In VB, I used ODBC data source with ADODB control and a
picture control. Could you try it and tell me how to solve the problem?
Thanks a lot|||Could you try to display the photos in VB? I cannot make it work.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:eDDcD44YFHA.3
356@.TK2MSFTNGP15.phx.gbl...
Hi
The Photopath column contains the path to the photo. This has a http address
which you may have to change. The logo column in the PUBS database (pub_inf
o table) is an Image datatype which is the same datatype as the photo column
in the Northwind Employee table.
John
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message news:%23pkBQO0YF
HA.616@.TK2MSFTNGP12.phx.gbl...
Hi,
In Northwind , there is an employees table which store photos. It seems the
pictures are linked to the picture files because there is a photopath field
containing the path. When I try to display the photos on the VB form, it g
ive me a error. I used the same way to display the logos in the pubs and th
ere is no problem. In VB, I used ODBC data source with ADODB control and a
picture control. Could you try it and tell me how to solve the problem?
Thanks a lot|||Hi Chris
As I don't have VB on a machine I can't, but I am pretty sure that the sampl
e program would work as it has been around for so long!! The code is using t
he photo column which it materialises by writing it to disc and then loads i
t into the Image control. If you stepped through the program you could check
that it wrote the file out correctly and you should be able to test loading
the file into (say) paint.
John
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message news:ezWN$N5YFHA
.132@.TK2MSFTNGP10.phx.gbl...
Could you try to display the photos in VB? I cannot make it work.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:eDDcD44YFHA.3
356@.TK2MSFTNGP15.phx.gbl...
Hi
The Photopath column contains the path to the photo. This has a http address
which you may have to change. The logo column in the PUBS database (pub_inf
o table) is an Image datatype which is the same datatype as the photo column
in the Northwind Employee table.
John
"Chrissi" <anubisofthydeath@.hotmail.com> wrote in message news:%23pkBQO0YF
HA.616@.TK2MSFTNGP12.phx.gbl...
Hi,
In Northwind , there is an employees table which store photos. It seems the
pictures are linked to the picture files because there is a photopath field
containing the path. When I try to display the photos on the VB form, it g
ive me a error. I used the same way to display the logos in the pubs and th
ere is no problem. In VB, I used ODBC data source with ADODB control and a
picture control. Could you try it and tell me how to solve the problem?
Thanks a lot