Monday, March 24, 2008

Procedure to Deploy ASP.Net 2005 Crystal Report Application to Webserver

The DLL’s Required to be referenced while developing crystal report Applications:
CrystalDecisions.CrystalReports.Engine.dll
CrystalDecisions.ReportSource.dll
CrystalDecisions.Shared.dll
CrystalDecisions.Web.dll
CrystalDecisions.Windows.Forms.dll
Creating WebSetupProject for Crystal Reports:
File ->New ProjectàSetup and Deployement Projects->Web setup project->Give the name and save it in any location
Go to solution explorer->select setup project and right click->add->Project Output->Select primary Output and content files.
It will add all requird files from your project.
Again select setup project and right click->add Merge Module->You will be getting one dialogue box which contains the Mergemodules which are installed in your system.Ensure that merge modules “CrystalReportsRedist2005_x86.msm” present in your system,If you are unable to find just download from the following links
http://support.businessobjects.com/communityCS/FilesAndUpdates/cr_net_2005_mergemodules_mlb_x86.zip.asp
http://resources.businessobjects.com/support/communitycs/FilesAndUpdates/cr_net_2005_mergemodules_mlb_x86.zip?recDnlReq=Record&dnlPath=cr_net_2005_mergemodules_mlb_x86.zip

and place in “C:\Program Files\Common Files\Merge Modules”.
Add this merge Module to your project and then Build.Now you can able to install ASP.net CrystalReport application in webserver with no installation of Crystal Reports.


Cheers,
sivaram

Friday, March 14, 2008

Calling ASP.Net Webservice Through SQL Server

The main aim of this scenario is to call a webservice through sql server job.For example if you take any inventory application and want to mail stock details to some superiors of that company as per the schedule time.
Process:Here we have to Implement one sqlserver job which calls a EXE file that could be any .Net application.
That Exe file should contain a webservice reference.So that webservice will be invoked automatically whenever sql server job runs
XP_Cmdshell :It is a extended stored procedure available in SQl server used to execute particular EXE file from the specified path.
1)Create a Webservice:
Open visual studio IDE
File-> new->website->asp.net webservice application->select the specific language either C# or VB->specify the location to be saved
Implement a method which performs your require functionality as per the scheduled time .


Class WebServiceApplication
{
[WebMethod]
Public string helloworld()
{
Return “Function executed successfully”;
}
}
Build the application and check invoke whether its invoking properly or not
2)Create a one console application:
After opening the console applicationàGo to Project tab->add web reference ->copy and paste the webservice reference URLànd Click add reference
The reference of WebServiceApplication will be added to your console application.
Then create the object for WebServiceApplication class and call the respective methd as shown below
class consoleapplication
{
static void Main(string[] args)
{
WebServiceApplication objService = new WebServiceApplication();
strStatus = objService. helloworld();
}
}

Creating SQL Server Job and scheduling:
1)Open sql server enterprise manager
2)go to management ->select sql server agent->jobs
3)right click the job->new job->name the job and give the owener field as SA
4)then select STEPS from the window->click new
5)step window will appear->name the step as wish->type:transact sql script(T-Sql)->command = XP_cmdshell “console application exe file address” àclick ok
6)select schedule tab and schedule the duration for how many days once sql server has to run
7)say Ok







Thursday, March 13, 2008

Data Transformation Between PC and PDA (Mobile Device) Using .Net

This articlie explains you how to check connection between PDA and PC and how to transfer data between PC and PDA application using .net
You can establish connection between PC and PDA using Microsoft active sync and the details you could get from microsoft sites
OpenNETCF.Desktop.CommunicationThis is a DLL having features to echeck communication between PC Application and PDA Application and transferring the data .You can reference this DLL by using add reference.
For more details :http://www.opennetcf.com/
RAPI class:
It’s the Remote API class available in “OpenNETCF.Desktop.Communication ”Dll and having great features such as
1)Getting connection status between PC and PDA .
2) You could create Directories in PDA Device
3)You could transfer files from PDA to PC as well as PC to PDA
RAPI class features:
1)Events:
Events that help to monitor The connection status between PC and PDA
1) RAPI.ActiveSync.Active --Connected
2) RAPI.ActiveSync.Disconnect--Disconnected
3) RAPI.ActiveSync.Listen-Not connected
4) RAPI.ActiveSync.Answer—connecting
2)Some Methods :By using the following methods you could transfer the data between PC and PDA as well as PDA and PC
RAPI.DeviceFileExists():It’s one of the method of RAPI class which checks,whether particular directory is available at specified path in PDA device or not and returns the bool value
Ex: RAPI.DeviceFileExists(“\\My Documents\\Invoice\\PO”)
RAPI. CreateDeviceDirectory():This is another method of rapi class and creates the dirctory at specified path in PDA
Ex: RAPI. CreateDeviceDirectory (“\\My Documents\\Invoice\\MI”)
RAPI .CopyFileToDevice():This methos is used to transfer data from PC to PDA and it takes two aregumnts
1)PC folder address 2)PDA Folder Adress
Ex: RAPI. CopyFileToDevice(“\\My Documents\\PC\”,”\\My Documents\\PDA\\MI”)
RAPI.CopyFileFromDevice():this moethod is used to transfer data from PDA to PC and it takes two arguments
1)PC folder address 2)PDA Folder Adress
Ex: RAPI. CopyFileFromDevice (“\\My Documents\\PC\”,”\\MyDocuments\\PDA\\MI”)
RAPI.DeleteDeviceFile():This methos is used to delete the particular file from PDA device at the specified path.

RAPI. CopyFileFromDevice (“\\My Documents\\PC\”,”\\MyDocuments\\PDA\\MI”)