This is dedicated in assisting others on developing and non-developing matters. It is also the official home of ssUltimate Library.
Friday, October 5, 2012
ssExcelPivot Fixes & Enhancements
Fixed scrolling problem. Originally, when you click on the scrollbar, the class automatically assumes you are planning to do a drag and drop and repositions your mouse pointer into the topmost portion of the grid. So scrolling can only be done before via clicking on the grid and using the mouse scroll. Fixed that now.
Improved drag and drop.
Applied recent themes on ssSwitches. Removed ssChkBox and replaced it with ssSwitch to give it a better look as well (theme 15). Gave the popup for creating impromptu pivot reports a new, cleaner and better look.
I will update the subscribers when I come back from SouthWest Fox Convention with hopefully some more adjustments/enhancements. Cheers!
Tuesday, October 2, 2012
ssClasses New Features
ssExcelPivot Class
Added backward compatibility tested using Excel 2000 for ssExcelPivot class.
Added Multi-Column values tested under Excel 2007.
For 2000, it will be shown row-wise:
ssSwitch and ssOptSwitch:
Four new exciting themes (Number 13 to 16)
Cheers!
Added backward compatibility tested using Excel 2000 for ssExcelPivot class.
Added Multi-Column values tested under Excel 2007.
For 2000, it will be shown row-wise:
ssSwitch and ssOptSwitch:
Four new exciting themes (Number 13 to 16)
Cheers!
Thursday, September 13, 2012
Proper Fonts for dot-matrix printers
I have been wrestling with finding a proper font for quite a while now for my dot-matrix printing needs utilizing a POS printer which I decided to use for our Trip Ticket and Fuel Voucher issuances. The usage of a POS printer appeals to me because it saves money, paper, ink and time because there is never a need to cut a paper into several portions anymore, but the fonts I used to print those do not appeal to me.
Here is the output using Tahoma:
While the output is clear, simply looking at the colons you can immediately notice the alignment is not proper, and that is because Tahoma is a graphical font. Not to mention that it prints slower because it has more DPIs (Dots Per Inch) than the DOS fonts.
Thursday, September 6, 2012
ssExcelPivot Enhancements
ssExcelPivot class is among my underrated or maybe I can say the most underrated class of _ssClasses library. But this is in fact one of the best and useful class I have created so far. After I created this class, creating top managerial reports has never been soooo easy for me. What does this class do?
ssExcelPivot class is that simple small insignificant looking button as shown below (ssButton4) that can create instant pivot reports in excel with ease. Its power lies with creating these reports with just a few switch, which is what you cannot do with any crosstab utilities or even when designing reports via .frx way. Shown is the sample form given to subscribers, data coming from VFP Samples directory:
It creates 12 sample pivot reports in Excel (in my sample) just to show how things can be easily done. However, you can create more than that, even hundreds of different format, styles, etc. At the very bottom is Create Your Own Report which allows user the ability to create a pivot report in excel of their own choosing.
I said it is easy to use this. So I will show below codes inside the sample form I give to subscribers. First of all, create a cursor to serve as its recordsource:
ssExcelPivot class is that simple small insignificant looking button as shown below (ssButton4) that can create instant pivot reports in excel with ease. Its power lies with creating these reports with just a few switch, which is what you cannot do with any crosstab utilities or even when designing reports via .frx way. Shown is the sample form given to subscribers, data coming from VFP Samples directory:
It creates 12 sample pivot reports in Excel (in my sample) just to show how things can be easily done. However, you can create more than that, even hundreds of different format, styles, etc. At the very bottom is Create Your Own Report which allows user the ability to create a pivot report in excel of their own choosing.
I said it is easy to use this. So I will show below codes inside the sample form I give to subscribers. First of all, create a cursor to serve as its recordsource:
Tuesday, September 4, 2012
Capture Portion of Image from Webcam
Are you interested in having something like a small application that captures an image from a webcam? Just like when we get our driver's license where we simply stand on one side then the operator says "hold still..." then later gives a thumbs up sign? When the driver's license card is presented to us, we see that our face is snapped and cropped so it fits properly on said license.
Is this hard to do with VFP? Not if you know where to look for tools already shared to us by others.
Wednesday, August 29, 2012
ListBox Trick # 1 - Files with Filtering
This again is based on a query inside Foxite. The question goes:
While GetFile() is yet another easy way to get a fullpath(), it is not flexible on the filename part; only on the extension part where you can use wild characters. You cannot do this:
thisform.text1.value=getfile("month*.dbf")
As the asterisk there will be construed by VFP as part of the filename, and not as a wildcard. Same goes with LOCFILE() and PUTFILE() where you cannot also use a wild character on the filename.
Ordinarilly, the immediate thinking goes to these steps:
However, while that is one of the best ways to do those, there is yet simpler way which is using the highly unutilized feature of listbox known as RowSourceType = 7. It involves less coding and actually is very easy to use. For the sake of this example, I will simply filter the list of files with all dbf:
I need to get tables only have or start names as month1,month2.....
thisform.text1.value=getfile("month.dbf")
thisform.text1.value=getfile("month*.dbf")
As the asterisk there will be construed by VFP as part of the filename, and not as a wildcard. Same goes with LOCFILE() and PUTFILE() where you cannot also use a wild character on the filename.
Ordinarilly, the immediate thinking goes to these steps:
- Use ADIR() to gather filenames starting with the word "Month" and with extension "dbf":
- Create a cursor to hold the result and perform INSERT INTO .. FROM ARRAY laMyFiles
- Create a grid to show the result, then put some more codes either on AfterRowColChange or Click events to transfer the result into the textbox
However, while that is one of the best ways to do those, there is yet simpler way which is using the highly unutilized feature of listbox known as RowSourceType = 7. It involves less coding and actually is very easy to use. For the sake of this example, I will simply filter the list of files with all dbf:
Saturday, August 25, 2012
Combobox Tricks - Part I
I actually posted this or some of this in the defunct www.junblogs.com and has intentionally did not forwarded it in this blog thinking it is already read before by most of my followers, so they know this now. But several times I am still seeing some quires regarding comboboxes that I decided to revive this plus add some more tutorials in the near future.
So let us start again on combobox tutorials with this trick, hiding columns and some other things.
The way some developers do to hide let us say the 2nd column from view is to change that 2nd column's width to zero. While it is good, there will still be a space alloted and shown for that zero-width column:
loTest = Createobject("frmCombo")
loTest.Show(1)
Define Class frmCombo As Form
AutoCenter
=
.T.
Add Object combo1 As ComboBox With ;
RowSourceType= 6,;
RowSource = 'junkcbo',;
Value = 0,;
BoundColumn = 2,;
BoundTo =.T.,;
Style = 2,;
top = 50,;
left = 10,;
Width = 200,;
ListIndex = 1,;
ColumnCount = 2,;
ColumnWidths = '200,0'
Procedure Load
Create
Cursor junkcbo (xName c(30), xCurrency c(3))
Insert Into junkcbo Values ('Philippines','PHP')
Insert Into junkcbo Values ('Papua New
Guinea','PGK')
Insert Into junkcbo Values ('Australia','AUD')
Insert Into junkcbo Values ('United
States','USD')
Insert Into junkcbo Values ('Indonesia','IDR')
Insert Into junkcbo Values ('India','INR')
Endproc
Enddefine
So to fix that problem, you have to hide the column lines to make it appear that column1 and column2 are just one. Under combo1 settings, you have to add this line:
Subscribe to:
Posts (Atom)





