Posts Tagged ‘ Visual Studio 2008 ’

Windows Service Setup Project – Visual Studio 2008

Windows Service Setup Project differs a bit from Windows Application (Desktop) Setup Project. Consider those following steps to create Setup Project for Windows Service Application.

# Right Click on Solution and Add New Project to your Solution.

# Choose Other Project Type and Setup and Deployment and finally Setup Project to create a new Project, give it meaningful Name. For instance, My Windows Service Project name is ReportDownloader and my Setup Project Name is SetupReportDownloader.

# Right Click on SetupReportDownloader=> Add => Project Output, Finally Select the Project you want to create Setup Project for and Select Primary Out and Click OK to continue.

# Up to this, it is same as Windows Application. Now for Windows Service, Right Click on SetupReportDownloader=>View=>Custom Action. Continue reading

Adding reference to System.Configuration in Visual Studio 2008

To add a reference of System.Configuration/ Configuration in Visual Studio 2008
# In Solution Explorer, right-click the project node and click Add Reference.
# In the Add Reference dialog box, select the .NET tab and select System.Configuration from the list and then click OK.
Continue reading

Customized Thousand Separator in Crystal Report

Crystal Report Provides an easy to use default thousand separator for numeric Fields. You can use it by checking Thousand Separator from Field Properties.

However, when you want your own kind of thousand separators you have to go through more complications. You will have to use Formula Fields of Crystal Report. Continue reading

How to set Crystal Report Header in Visual Studio 2008

I wasted almost a day searching on google to resolve this issue. If you want to set some values or title of report dynamically from code behind, you can use this following code snippet.

string amount = amountTextBox.Text;
string titleString = "        Total Sanctions above  ";

List investmentList = new List();
investmentList = new InvestmentManager().CollectAmountWiseInvestment(amount);

expirySanctionCrystalReport reportDocumentObject = new expirySanctionCrystalReport();

//Set Crystal Report Header 
CrystalDecisions.CrystalReports.Engine.TextObject amountText = (CrystalDecisions.CrystalReports.Engine.TextObject)reportDocumentObject.ReportDefinition.ReportObjects["dateText"];
amountText.Text = amount;

CrystalDecisions.CrystalReports.Engine.TextObject titleText = (CrystalDecisions.CrystalReports.Engine.TextObject)reportDocumentObject.ReportDefinition.ReportObjects["TextTitle"];
titleText.Text = titleString;

amountWiseCrystalReportViewer.ReportSource = reportDocumentObject;
amountWiseCrystalReportViewer.Visible = true;

Continue reading

How to install Windows Service manually

There are two types of Windows Service Installation i.e. One is creating setup project, the other is installing the EXE manually. Here, I am trying to put up some tricks together for the later one.

First of all, Windows Service installation can be done using Visual Studio 2005/2008 Command Prompt. That means, you need Visual Studio installed in your target machine. Have a look at those simple Commands. Continue reading