Showing posts with label Generatring A Report Based on Employee Name.. Show all posts
Showing posts with label Generatring A Report Based on Employee Name.. Show all posts

Thursday, 17 January 2013

Generatring A Report Based on Employee Name.





step1:Create a new  Crystal Report --Go To Vistual Studio - File-New- Website-Name-CrystalReport1.rpt
After that we design like this.

Step2: Creating A new Web Page  -- Go To Vistual Studio - File-New- Website-Name-Employee.aspx

step3:Write The Below Code in employee.aspx

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="EmployeeTimesheetEmpRpt.aspx.cs" Inherits="EmployeeTimesheetEmpRpt" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

<table widht="100%">
     
        <tr>
            <td colspan="2">
                <table align="center" style="width: 100%">
                    <tr>
                        <td>
                            <asp:Label ID="lblEmployee" Text="Employee" runat="server"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlEmployee" runat="server" Width="150px">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="RfvEmployee" runat="server" ControlToValidate="ddlEmployee"
                                CssClass="failureNotification" InitialValue="-1" ErrorMessage="Please Select Employee"
                                ToolTip="employee is required" ValidationGroup="Timesheet">Please Select Employee</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                 
                    <tr>
                        <td class="style1" colspan="2" align="left">
                            <asp:Button ID="btnView" runat="server" Text="View All Employees" ValidationGroup="Timesheet" onclick="btnView_Click"
                                 />
                     
                        </td>

                        <td class="style1" colspan="2" align="center">
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>


</asp:Content>