Crystal Report with Asp.Net


<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SampleReport.aspx.cs" Inherits="Reports_Sample" Title="Sample Report" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr>
<td colspan="10">
<div class="Heading">Exception Report</div></td>
</tr>
<tr>
<td align="center" colspan="10" valign="top">
<asp:Label ID="lbl_Msg" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="12px"
ForeColor="Red"></asp:Label></td>
</tr>
<tr>
<td style="width: 100px">
<asp:Label ID="lbl_mnth" runat="server" Text="Month:"></asp:Label></td>
<td colspan="3">
<asp:DropDownList ID="ddl_month" runat="server" Width="54%">
<asp:ListItem Value="0">Select</asp:ListItem>
<asp:ListItem Value="1">January</asp:ListItem>
<asp:ListItem Value="2">February</asp:ListItem>
<asp:ListItem Value="3">March</asp:ListItem>
<asp:ListItem Value="4">April</asp:ListItem>
<asp:ListItem Value="5">May</asp:ListItem>
<asp:ListItem Value="6">June</asp:ListItem>
<asp:ListItem Value="7">July</asp:ListItem>
<asp:ListItem Value="8">August</asp:ListItem>
<asp:ListItem Value="9">September</asp:ListItem>
<asp:ListItem Value="10">October</asp:ListItem>
<asp:ListItem Value="11">November</asp:ListItem>
<asp:ListItem Value="12">December</asp:ListItem>
</asp:DropDownList><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="ddl_month" ErrorMessage="*" InitialValue="0"></asp:RequiredFieldValidator></td>
<td style="width: 66px" colspan="2">
<asp:Label ID="lbl_year" runat="server" Text="Year:"></asp:Label></td>
<td colspan="3">
<asp:DropDownList ID="ddl_year" runat="server" Width="50%">
</asp:DropDownList><asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="ddl_year" ErrorMessage="*" InitialValue="0"></asp:RequiredFieldValidator></td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 66px" colspan="2">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>



<tr>
<td style="width: 100px">
<asp:Label ID="lbllevel" runat="server" Text="Select Site:" Width="100%"></asp:Label></td>
<td colspan="3">


<asp:DropDownList ID="ddlSite" runat="server" Width="92%" />
<%--<asp:DropDownList ID="ddl_Name" runat="server" Width="92%">
</asp:DropDownList><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="ddl_Name" ErrorMessage="*" InitialValue="0"></asp:RequiredFieldValidator>--%>
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 66px" colspan="2">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td align="center" colspan="8" valign="top">
<asp:Button ID="btn_Show" runat="server" BorderStyle="Solid" BorderWidth="1px" CssClass="Button"
OnClick="btn_Show_Click" Text="Show" Width="82px" />

<asp:Button ID="btn_Cancel" runat="server" BorderStyle="Solid" BorderWidth="1px"
CausesValidation="False" CssClass="Button" OnClick="btn_Cancel_Click" Text="Cancel"
Width="82px" />

<asp:Button ID="btn_Print" runat="server" BorderStyle="Solid" BorderWidth="1px"
CssClass="Button" OnClick="btn_Print_Click" Text="Print" Visible="False" Width="82px" /></td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 66px" colspan="2">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td colspan="10">
<asp:Label ID="lbl_Exp" runat="server" Text="Export To : " Visible="False" Width="74px"></asp:Label>

<asp:DropDownList ID="ddl_Export" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_Export_SelectedIndexChanged"
Visible="False" Width="288px">
<asp:ListItem Selected="True" Value="0">[ Select ]</asp:ListItem>
<asp:ListItem Value="1">Rich Text (RTF)</asp:ListItem>
<asp:ListItem Value="2">Portable Document (PDF)</asp:ListItem>
<asp:ListItem Value="3">MS Word (DOC)</asp:ListItem>
<asp:ListItem Value="4">MS Excel (XLS)</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 66px" colspan="2">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
<tr>
<td colspan="10">
<cr:crystalreportviewer id="crv_ExceptionReport" runat="server" autodatabind="True"
borderstyle="Solid" borderwidth="1px" displaygrouptree="False" enabledatabaselogonprompt="False"
hascrystallogo="False" hasdrillupbutton="False" hasexportbutton="False" hasprintbutton="False"
hasrefreshbutton="False" hassearchbutton="False" hastogglegrouptreebutton="False"
hasviewlist="False" hyperlinktarget="_blank" onnavigate="crv_ExceptionReport_Navigate"
onreportpartbookmarknavigation="crv_ExceptionReport_ReportPartBookmarkNavigation"
onreportrefresh="crv_ExceptionReport_ReportRefresh" onviewzoom="crv_ExceptionReport_ViewZoom"
reuseparametervaluesonrefresh="True" toolbarstyle-backcolor="#E0E0E0" width="350px"></cr:crystalreportviewer>
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 66px" colspan="2">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
<td style="width: 100px">
</td>
</tr>
</table>
</asp:Content>




//Find full code in attachment

----------------------------------------------------------------------

This is Crystal report coding with asp.net


Attachments

  • crystal report with asp.net (22308-9319-s.rar)
  • Comments

    Author: Anibal09 Aug 2010 Member Level: Bronze   Points : 0

    The msater page is not included in the attachments. How can i get it?



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: