Wednesday 20 November 2013

ASP.NET Session Timeout Control + jQuery Dialog + Countdown Timer

ASP.NET Session Timeout Control + jQuery Dialog + Countdown Timer

_______________________________________________________________________

Hello Friends in one of the Blog i find the Code for  Sessiontime out with Dialog box.. you can dowload demo  code with Below site



Wednesday 9 October 2013

How to Create Crystal Report in asp.net

How to Create Crystal Report in asp.net
To implement crystal reports first design the table in database and give name UserInfomation

ColumnName
DataType
UserId
Int(set identity property=true)
UserName
varchar(50)
FirstName
Varchar(50)
LastName
varchar(50)
Location
varchar(50)
After completion of table creation enter some dummy data because we need to use that data to populate reports. Now Open visual studio 2008 and create new website and open Default.aspx page in Designmode after that open Toolbox from that drag and drop MicrosoftReportViewer control from Reportingtab 
http://3.bp.blogspot.com/-eVh_qbdVrm0/TsKsTzU_NCI/AAAAAAAAAvI/qnwMDty_BxM/s1600/ReportingTab.png
After drag and drop MicrosoftReportViewer in your page select ReportViewer control and click on smart tag in right side and select Design a new Report 


http://3.bp.blogspot.com/-XiOjAp00K5U/TsKsQxUQmkI/AAAAAAAAAus/R-2EHnRXCww/s640/DesignReport.png


After click on Design a new report now welcome window wizard will open

http://4.bp.blogspot.com/-KSPBQcciK6Q/TsKsZXQ7RwI/AAAAAAAAAwE/Q5xIFBNmfoo/s400/WelcomeWizard.png


Now click on Next button after that new Data Source Configuration Wizard will open in that click on New Connection button to configure database connection.  


http://1.bp.blogspot.com/-RKc8-6wYh50/TsKsTfAneaI/AAAAAAAAAvA/txv9KkmeQM0/s400/NewConnection.png


Now one window will open to add new connection in that enter Server Name and select authentication type either windows or SQL Server and select database name after fill all the details click on Test Connection if the connection path is correct then that will display Test connection succeeded. After that click ok  

http://1.bp.blogspot.com/-iqDcHt3XMbE/TsKsOC0nYHI/AAAAAAAAAuM/v5aCeT9gClU/s1600/AddConnection.png


After click ok New database connection added to dropdown now click on Next button

http://1.bp.blogspot.com/-3ocR-DSzi1E/TsKsPnEnGnI/AAAAAAAAAuY/PZE1NJ5iO7I/s400/DataSourceConfiguration.png
After click Next it will display available Tables, views, Stored Procedures and Functions in DataSource Configuration Wizard in that open Tables section and select required table previously we created table with name UserInformation now I am selecting that table from available list

http://4.bp.blogspot.com/-EwQT2kM_st0/TsKsXYrI86I/AAAAAAAAAvw/CzqG2tbXfSo/s1600/TableSelection.png


After click finish our report wizard populate with our selected table now select that table and our Next button

http://3.bp.blogspot.com/-XtzT1KFO4ZQ/TsKsVTyEOjI/AAAAAAAAAvc/qmljqBuZjlQ/s400/ReportWizard.png


After click Next button it will display options to select Report type either Tabular or Matrix now select Report Type and click Next Button

http://1.bp.blogspot.com/-9EDXh6uN0Fg/TsKsUcNVChI/AAAAAAAAAvQ/j9cIcsiGoK8/s400/ReportType.png


After click Next Report Wizard display Design the table option with available fields from previous selected table and give options like Page, Group and Details these are used to display the data based on Groupwise etc. Here we are doing simple crystal report sample I am not doing anything simply click on Next Button

http://2.bp.blogspot.com/-LGGgGhWMm-A/TsKsRyFapSI/AAAAAAAAAuw/eA1WuVZw8NM/s400/DesignTable.png


After click Next button Report wizard will display option to select Table layout after select required table layout click on Next button

http://1.bp.blogspot.com/-ttmNgsh-PtQ/TsKsSUw2csI/AAAAAAAAAu4/b6PtEXNorVw/s400/LayOut.png


After click Next button Report wizard will display option to select Table style after select required table style click on Next button

http://1.bp.blogspot.com/-8ULTbknDmdk/TsKsYKncBkI/AAAAAAAAAv8/pxPEZbkz8Cw/s400/TableStyle.png


After click Next button Report wizard will display Completing the Report Wizard in that enter Report Name and click Finish button

http://3.bp.blogspot.com/-qUjJC4uOctU/TsKsOojLw1I/AAAAAAAAAuU/RzwH3R353HQ/s400/CompleteReport.png


After click Finish button now it will create new report if we open our website Solution Explorer we have chance to see newly created report Report1.rdlc and xsd file in App folder this xsd file contain our selected database table.

http://2.bp.blogspot.com/-DJtNzv9zPzg/TsKsWfHUfDI/AAAAAAAAAvk/79Gvs51RQhw/s1600/SolutionExplorer.png


After that Now Open Default.aspx page and select ReportViewer and click smart tag in right side in that select Report Type

http://4.bp.blogspot.com/-7bNWr4lIaW8/TsKsVxmkSGI/AAAAAAAAAvg/9yhQtFpYQOU/s640/SelectReport.png


Once Report1.rdlc selected Open Default.aspx Source code it contains code like this


<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"
Font-Size="8pt" Height="342px" Width="398px">
<LocalReport ReportPath="Report1.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1"Name="MySampleDBDataSet_UserInformation" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetData"
TypeName="MySampleDBDataSetTableAdapters.UserInformationTableAdapter">
</asp:ObjectDataSource>
</div>
</form>
</body>
</html>
If you above code Here we added referece of assembly for Reportviewer that is necessary to run our report perfectly. Now Run your application check the output that would be like this.


Demo


http://3.bp.blogspot.com/-YTZUQxwV-kg/TsKsQIEtphI/AAAAAAAAAug/ivt9XUZHutU/s1600/Demo.png