Skip to main content

Posts

Showing posts from February, 2010

Crystal Report with ASP.net

There are many approaches you can take to link crystal report with asp.net . In this article I’m going to discuss some methods. Direct Method – In here we are creating the report using crystal report and link it with the aspx.  There are two ways of doing this. Integrated Security (go to article) Using credentials (in here we want to provide server user name and password) (go to article)     Data Set Method - In here we are creating the datasets and using data sets we are creating reports. Data set with same project (go to article ) Data set with Different project (go to article ) Object Method – In this method we are binding a object collection to the report. Object with Crystal Report  

Crystal Report with Asp.NET – Using Data Objects

First of all you want to  create a database connection to your SQL Server . (Optional – you can find many other ways if you are already known.)  Then crate you Business Class which marches to the data base table. for a example Customer.cs file public class Customer { public int Year { get ; set ; } public String Name { get ; set ; } } Then go to query editor and run this SQL, It is better you have some records inserted in the table. SELECT TOP (1) Name, Year FROM Table1 FOR XML AUTO, Elements It will return following kind of a XML. thus copy it and save it as Table1.xml (for that add a new XML file to the project and paste the content and save it.) <? xml version ="1.0" encoding ="utf-8" ? > < Table1 > < Name > Amal </ Name > < Year > 12 </ Year > </ Table1 > Then add a new crystal report by selecting a black report option.   Now go to the database Expert and select .Net Object from the Tree men

How to enable document versioning in the SharePoint

Go to particular document library or a list Go to Document Library Settings   Go to versioning settings Enable it . In here you can also configure the versioning amount , type and others.

Easy Enter

Blackberry App

Windows Mobile App

InfoSD

InsMag

Crystal Report With Asp.NET – Data Set in Different Project

When architecting the system some types you might layering the application to Data Layer and Presentation Layer. Therefore you normally put the Dataset to the data layer, But your report in the presentation layer. Thus When you are creating the crystal report in Presentation Layer it is not showing the Data Set which is in the Data Layer.   There fore when you are creating the report using data set, it is shown as empty.   Thus you want to copy the dataset to the project. For that copy and paste the data set to the project. Now you can design your report by adding the dataset as previous article . After design the report you can delete the dataset i the project (WebApplication) Now we want to call the report when the page is loading. Report.aspx.cs protected void Page_Load( object sender, EventArgs e) { ReportDocument CollReport = new ReportDocument (); string reportPath = Server.MapPath( "CrystalReport.rpt" ); CollReport.Load(reportPath); D

Crystal Report with Asp.Net – Data Set Method

First you need to add a dataset to your project.    Then Black Screen will be shown. Now you have to add database tables to your datasets. thus if you did not have any database connection yet create one using server explorer. You can use either windows authentication or SQL server Authentication. In here I'm using SQL server  authentication. If every things fine you can select the database from the database list. (you can also create databases from here)   Then Drag and drop the tables to the dataset designer. Now you can design your report but we will do little a little advance thing. Assume you want to get Table1’s Names by giving the Year . Now you want to pass parameter to the query. So you want to add a new method to a table1’s Data Adapter. For that,   do as above and generate your query using the query designer as follows.   and click finished. Now can see new method is inserted to your table1’s Data Adapter. Now you want to design the

Crystal Report with Asp.NET – Direct method using server credentials

In this we are going to create a database connection using server user name and password. For this do the all the steps as previous post until Make New Connection to Create a New DB connection, in there give server name, username and password. If everything is correct you can select the server database in your list.   Then click next and finished the wizard. So you can view your tables in the Field explorer as previous post . Now you can design your report by drag and dropping fields. Finally save you report as report1.rpt.    Now not like the previous, we want to give server credentials when we Load the report. Thus following codes you can use to  give credentials in report.aspx protected void Page_Load( object sender, EventArgs e) { ReportDocument CollReport = new ReportDocument (); string reportPath = Server.MapPath( "Report1.rpt" ); CollReport.Load(reportPath); CollReport.SetDatabaseLogon( "username" , "password" , "

Crystal Report in ASP.NET – Direct Method Using Integrated Security

Create new Asp.Net Web Application or a Web Site Add new crystal report to the application.               Then select the Black Report. (You can also select the other options (Ex:-Wizard,) ) when you are familiar.   Next we want to add the data base connection to create the report. In Here I’m going to use Integrated security .  Thus in the Field Explorer..            Then click Make New Connection to Create a New DB connection       As above you want to give the server name and check the Integrated Security . If every this is correct now you can select your database from the database list.  Then click finish to Finished the wizard. Then under connection your database will be shown. Then select the tables you want to add the report and add them.    Then Click ok to continue. Now you can see the table in the Field Explorer . Now you can drag and drop fields and design your report and save it as Report1.rpt . When the report is done. y

How to connect to Internet Using Blackberry

In the blackberry there are many standard connection methods. BES/MDS Direct TCP WiFi But in these methods some times will not work on all the careers so their is a another undocumented method that you  can use. package com.rdmcorp.itms.sdm.DataService; import net.rim.device.api.servicebook.ServiceBook; import net.rim.device.api.servicebook.ServiceRecord; import net.rim.device.api.system.CoverageInfo; import net.rim.device.api.system.DeviceInfo; import net.rim.device.api.system.WLANInfo; public class ConnectionCreator { public static String getConnectionString() throws ServerException { String connectionString = null; // Simulator behavior is controlled by the USE_MDS_IN_SIMULATOR variable. if (DeviceInfo.isSimulator()) { connectionString = ";deviceside=true" ; } // Wifi is the preferred transmissio