postheadericon Crystal Report with ASP.Net in Visual Studio 2010

Recently I was working on a project. It was an ASP.Net project. And it requires some reports that I decided to create using Crystal Report. But the process was not so easy. I faced few problems to show the report. But in the end I was able to show it. So here are the procedures to create and show the report. I am gonna show the Employees data from Northwind database for this tutorial.

Create an empty website in Visual Studio. Then we need to create a DataSet. For this right click on the project name in Solution Explorer and click Add New Item. This will pop up the Add New Item window. Select DataSet from the list of items. Give its name dsEmployees and click Add.

More...

postheadericon Auto Complete TextBox in VB6

Today I'm gonna tell you how to create an auto complete textbox in VB6. For this project we need a Form and a Class Module. Set the Name of the Class Module as clsAutoText and save it. Now paste the following code in the code editor of clsAutoText.

   1: Private col As Collection
   2: Private WithEvents txt As TextBox
   3: Private bEnabled As Boolean
   4: Private bLastKeyDel As Boolean
   5:  
   6: Public Property Get Enabled() As Boolean
   7:     Enabled = bEnabled
   8: End Property
   9:  
  10: Public Property Let Enabled(bNew As Boolean)
  11:     Debug.Assert bNew And Not (col Is Nothing)
  12:     Debug.Assert bNew And Not (txt Is Nothing)
  13:     bEnabled = bNew
  14: End Property
  15:  
  16: Public Property Get TextBox() As TextBox
  17:     Set TextBox = txt
  18: End Property
  19:  
  20: Public Property Set TextBox(txtNew As TextBox)
  21:     Set txt = txtNew
  22: End Property
  23:  
  24: Public Property Get Collection() As Collection
  25:     Set Collection = col
  26: End Property
  27:  
  28: Public Property Set Collection(colNew As Collection)
  29:     Set col = colNew
  30: End Property
  31:  
  32: Public Sub ResortCollection()
  33:     Debug.Assert Not (col Is Nothing)
  34:     If col.Count <= 1 Then Exit Sub
  35:     Dim i As Long
  36:     Dim j As Long
  37:     Dim nGap As Long
  38:     Dim bResult As Boolean
  39:     Dim tmp
  40:     Dim tmp2
  41:     nGap = col.Count / 2
  42:     Do While nGap > 0
  43:         For i = nGap To col.Count - 1
  44:             tmp = col(i + 1)
  45:             j = i
  46:             bResult = (StrComp(tmp, col(j - nGap + 1), vbBinaryCompare) = -1)
  47:             Do While j >= nGap And bResult
  48:                 tmp2 = col(j - nGap + 1)
  49:                 col.Remove j + 1
  50:                 If j + 1 > col.Count Then
  51:                     col.Add tmp2
  52:                 Else
  53:                     col.Add tmp2, , j + 1
  54:                 End If
  55:                 j = j - nGap
  56:                 If j >= nGap Then
  57:                     bResult = (StrComp(tmp, col(j - nGap + 1), vbBinaryCompare) = -1)
  58:                 End If
  59:             Loop
  60:             col.Remove j + 1
  61:             If j + 1 > col.Count Then
  62:                 col.Add tmp
  63:             Else
  64:                 col.Add tmp, , j + 1
  65:             End If
  66:         Next
  67:         nGap = nGap / 2
  68:     Loop
  69: End Sub
  70:  
  71: Private Sub txt_Change()
  72:     If Not bEnabled Or bLastKeyDel Then
  73:         Exit Sub
  74:     End If
  75:     If txt.SelStart <> Len(txt.Text) Then
  76:         Exit Sub
  77:     End If
  78:     If txt.Text = "" Then
  79:         Exit Sub
  80:     End If
  81:     Dim vItem As Variant
  82:     Dim sContain As String
  83:     sContain = LCase(txt.Text)
  84:     For Each vItem In col
  85:         If Mid(LCase(vItem), 1, Len(sContain)) = sContain Then
  86:             txt = txt & Mid(vItem, Len(sContain) + 1)
  87:             txt.SelStart = Len(sContain)
  88:             txt.SelLength = Len(txt) - Len(sContain)
  89:             Exit For
  90:         End If
  91:     Next
  92: End Sub
  93:  
  94: Private Sub txt_KeyDown(KeyCode As Integer, Shift As Integer)
  95:     If Not bEnabled Then
  96:         Exit Sub
  97:     End If
  98:     If KeyCode = vbKeyBack Or KeyCode = vbKeyDelete Then
  99:         bLastKeyDel = True
 100:     Else
 101:         bLastKeyDel = False
 102:     End If
 103: End Sub

More...

postheadericon SLAX - The pocket OS

SLAX is a small, live Linux distro. It aims to be light, friendly and useful. It's meant to fit onto antique USB flash drives and run well on old hardware. It features the beautiful KDE desktop. Plus there's a revolutionary modules management. SLAX boots quickly into a beautiful, well-laid desktop. It founds the Windows machines without any issues. The NTFS drives are mounted without any problems. I could both read from and write to it. It can play mp3 files without any codec to install. It can even play my .mkv movies smoothly without any problem. More...

postheadericon Microsoft Security Essentials

After a short three-month beta program, Microsoft has officially released Microsoft Security Essentials (MSE). Its free, real-time consumer antimalware solution for fighting viruses, spyware, rootkits, and trojans. Microsoft Security Essentials is available for Windows XP 32-bit (8.61MB), Windows Vista/7 32-bit (4.28MB), and Windows Vista/7 64-bit (4.71MB). The final build number is 1.0.1611.0. Microsoft warns that MSE should not be installed alongside any other antimalware application. It builds upon Windows Defender by offering both real-time protection and on-demand scanning for all types of malware. More...

postheadericon Win7shell for Winamp

Today I’m going to tell you about a very tiny plugin for Winamp. Its name is Win7shell. Win7shell is a simple plugin that integrates it with the new taskbar of Windows 7. As you may know the features of the taskbar of Windows7 were designed to improve the convenience of the user, adding visible information and shortcuts where you need it, but Winamp doesn't take advantage of these. But now you can utilize the full power of the taskbar features with Win7shell. The coolest feature of all is the jump list. Once you have installed the plugin, and pinned Winamp to the taskbar, the jump list should immediately start tracking your recently played media files. You can pin the recent songs to the list easily, but to pin a playlist you'll need to actually drag the .m3u file onto the taskbar button. More...

postheadericon 3-2-1-Go

At last my first blog post on my own site. YapppieeeeeeDancing. A very warmhearted welcome to all. Basically I will post here tips n tricks, software reviews and of course tutorials. Some of them will be in video. So keep in touch. You can subscribe to my RSS feed. But first I have to set a slogan for my blog. So guys please suggest me some good slogans. Your commnets are most welcome. And again keep in touch. Because lots of things are still to come......

RecentPosts
RecentComments
Comment RSS
web counter