Friday, November 5, 2010

JavaScript - Web Services and Dynamic HTML

Few days ago I did a study of how a dynamic browser based client software can be, below is some findings related to usage of "Web Service" and Update of ListBox dynamically:

[Access of Web Service by using JavaScritp]
http://www.daniweb.com/forums/thread145927.html
http://msdn.microsoft.com/en-us/library/bb263974(VS.85).aspx

[Change content of HTML page dynamically]
http://dev.aol.com/accessibility/bestpractices/selectlist

Thursday, November 4, 2010

Crystal Report - Grouping and Page Width

Below is an example of using "Group" feaure of Crystal Report Wizard. The example show that the first two fields are related to the group while remained fields are related to each record of the group.

However, this kind of grouping is done in client station instead of Server (based on Query result of SQL command), and will have performance issue if there are a large number of records.




According to user manual of Crystal Report 2008, chapter 6, it is possible to change width of a page (in function "Page Setup") so that information of large number of fields can be displayed properly. However, seems this feature is missing in the build-in Crystal Report tools of Visual Studio 2008.

Wednesday, November 3, 2010

Crystal Report - Query in Server

Try to use Crystal Report in these few days. Below is an example of passing parameter to a SQL command to ensure the query is done in server side.


There is no significant different in performance while "where" is used instead of "on".

However, if using "Selection Formula --> Record", all records will be send to client station before records selection and it will cause serious performance downgrade if number of records is large.

Wednesday, October 27, 2010

e-form and WorkFlow

Try to evaluate different e-form products in the past few days. Now have a clearer concept about difference between "e-Form" and "WorkFlow":

Basically "WorkFlow" management and "e-form" are two separated modules (or functions).

An "e-form" is an entity which allows user to "open/fill/save" content of a form. Each “e-form entity” is a single entity which may be stored as a physical file (or a XML record in database). Additional programming effort is required to store the content to separated fields of a relational database.

"WorkFlow” is build on top of "e-form" with other tasks. For example, for a workflow which related to OT cliam/approval. The work flow involves the following tasks:
  • Open e-form of OT claim, fill-in information, save the form to repository and database.
  • Submit (eg: through email) the e-form to Staff A for checking
  • Checked by Staff A and submit (eg: through email) the e-form to Staff B for approval
  • Approved by Staff B and return the e-form to the staff who claim for OT.

The above workflow involves 4 tasks which base on handling and status update related to ONE e-form.

To provide above functions in a flexible e-form system with prelim workflow function, one of the solution will be the following:

The "e-form" provides functions of "e-form filling" with 3 buttons (Submit, Check, Approval) When button of “Submit”, “Check”, “Approval” is clicked, it will call related “Web Services (or function)” of WorkFlow Engine to provide related operation.

  • [Submit]: Save e-form as entity and record in database. Update workflow status and send email alert to Staff A
  • [Check]: Update workflow status and send email alert to Staff B
  • [Approval]: Update workflow status and send email alert to staff who submit the OT Claim.

The e-form interpreter should be capable to enable/disable the button(s) which depends on status of the work flow. Status should be an entity of the XML which represents the e-form.

For simplicity, may consider above is a web-service based solution in which "e-form" is an entity which provides "open/fill/save" operation. Other logic related to workflow operation is done through web service.

Thursday, October 14, 2010

web 4.0

Find an image related to web 4.0, seems interesting and it is related to intelligent personal agent.


Sunday, May 30, 2010

C# - Send email by using CDO

Ref:
http://support.microsoft.com/kb/310212


Example:
try
{
CDO.Message oMsg = new CDO.Message();
CDO.IConfiguration iConfg;

iConfg = oMsg.Configuration;

ADODB.Fields oFields;
oFields = iConfg.Fields;

// Set configuration.
ADODB.Field oField = oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];

//TODO: To send by using the smart host, uncomment the following lines:
//oField.Value = CDO.CdoSendUsing.cdoSendUsingPort;
//oField = oFields["http://schemas.microsoft.com/cdo/configuration/smtpserver"];
//oField.Value = "smarthost";

// TODO: To send by using local SMTP service.
//oField = oFields["http://schemas.microsoft.com/cdo/configuration/sendusing"];
//oField.Value = 1;

oFields.Update();

// Set common properties from message.

//TODO: To send text body, uncomment the following line:
//oMsg.TextBody = "Hello, how are you doing?";


//TODO: To send HTML body, uncomment the following lines:
//String sHtml;
//sHtml = "\n" +
// "\n" +
// "\n" +
// "\n" +
// "

\n" +
// "

Inline graphics

\n" +
// "\n" +
// "";
//oMsg.HTMLBody = sHtml;

//TOTO: To send WEb page in an e-mail, uncomment the following lines and make changes in TODO section.
//TODO: Replace with your preferred Web page
//oMsg.CreateMHTMLBody("http://www.microsoft.com",
// CDO.CdoMHTMLFlags.cdoSuppressNone,
// "", "");
oMsg.Subject = "Test SMTP";

//TODO: Change the To and From address to reflect your information.
oMsg.From = "someone@example.com";
oMsg.To = "someone@example.com";
//ADD attachment.
//TODO: Change the path to the file that you want to attach.
oMsg.AddAttachment("C:\\Hello.txt", "", "");
oMsg.AddAttachment("C:\\Test.doc", "", "");
oMsg.Send();
}
catch (Exception e)
{
Console.WriteLine("{0} Exception caught.", e);
}
return;
}

Wednesday, May 26, 2010

PDF Writer

http://www.cutepdf.com/Products/CutePDF/writer.asp