Pages

Thursday, March 28, 2013

How to put favicon (small image) in address bar of a web page?

First create a .ico image file. We could use the web site http://favicon.htmlkit.com/favicon to convert any picture to icon image. Now link that .ico image to your webpage using <link> tag in HTML <head> section. For example,
<link rel="shortcut icon" type="image/ico" href="~/Images/favicon.ico"/>

Tuesday, March 26, 2013

What is TCP Port?

Port is a 16-bit unique number that identifies  a specific software program on the server system. Ports are unique identifiers. For example, port 80 represents Web Server (HTTP) , port 21 represents FTP server and port 25 represents SMTP server. Without port numbers, the server system would have no way of knowing which application a client wanted to connect to. So, ports are just numbers that representing a server application. A server can have up to 65536 (0-65535) server application running. A TCP port numbers from 0 to 1023 are reserved for specific applications. Don't use these ports for your own custom server programs. 

How to pass parameter value for a subreport in Crystal Report

To set a parameter value for a parameter field in sub-report of a Crystal Report you may have to use the function

SetParameterValue(string parameterFieldName, object value, string subreport)
First create a ReportDocument object for main report and pass the parameter values to main report and subreports, for instance,
mainrpt = new ReportDocument();
ReportViewer.Enabled = true;
mainrpt.SetParameterValue("@ClmId", CLMID); // main report param
mainrpt.SetParameterValue("@Param1", ParamValue,"SubReport1.rpt"); //subreport param
mainrpt.SetParameterValue("@Param1", ParamValue,"SubReport2.rpt"); //subreport param
ReportViewer.ReportSource = mainrpt;
ReportViewer.Visible = true;