Monday, February 6, 2012

ssToExcel2

Enhancements (February 16, 2012):

Created two new sections called fonts and colors.  This is where you can control further the fonts (in addition to _ExtraFonts which will be the default font for columns if used) and colors of data cells:




 

Enhancements (February 13, 2012):

Added new properties to make it more flexible.  Here is a complete listing of those plus showing below is how to instruct ssToExcel2 on its click event:

Sample Click Event:

CREATE CURSOR junk (fld1 c(30), fld2 d, fld3 I, fld4 i)
INSERT INTO junk VALUES ('Jun Tangunan',DATE(),40,26)
INSERT INTO junk VALUES ('Sandstorm36',DATE()-5,40,26)
INSERT INTO junk VALUES ('Celyn Tangunan',DATE()+8,27,17)

* Change the field name to proper ones using AS clause.  To create more than one word in excel, use underscore



SELECT fld1  as Name, fld2 as date, fld3 as Age, fld4 as Age_Met FROM junk INTO CURSOR junk2 NOFILTER

This._cursorname = 'junk2'  && Bind to cursor

***** hardcoded instruction to say that these fields must be totalled
this._totalfields = 'Age,Age_Met'

***** hardcoded instruction to control the width of a field (wordwrap enabled)
this._wrapfields = 'Name-35' 


***** For Titles.  You can create as many rows you like as long as it is delimited with '|'
this._headings = 'My Sample Heading|As of '+DMY(DATE())+'|Generated by Bizcore


**** For type of output. 1 is also the default value, just to show you how to control it on first run
this._nreptype = 1 

***** changes the backcolor of popup (optional)
this._cbackcolor = RGB(255,255,255) 


***** changes destination folder other than the default temp folder
this._cfolder = 'c:\MyNewTarget'  


***** Want to specify a filename instead of random filename?  Still can be changed inside popup
this._filename = 'Specific'

**** Show excel after conversion or not?  Default value is .T.
this._lwithoutput = .T.

**** Give user the ability to change showing of excel or not (ssChkBox Visibility)?  Default is .F.
this._lhideshow = .F.

**** Hardcoded Instruction on cell border on initial run, default value is 1
this._ncellborder = 2

**** Hardcoded instruction on header colors, default is 2.  Can still be changed inside.
this._nheadercolor = 6

**** Additional control over other fonts on other columns
**** In case of MK Sharma, you can set here the font for barcoded column like Free 3 of 9
this._extrafonts = 'Name:Tempus Sans ITC-12,Age:Tahoma-14'  


***** After any of the above is set, you should issue this in the end
DoDefault()



======

This is actually about the latest sub-class under ssClasses, an improvement (of course) over ssToExcel under Sandstorm36 class.   But allow me also to write here the other enhancements I made on other objects so I don't have to go back and edit my original posts on those:

New:

ssFonts - a class which gives you spinners for Font Name and Sizes.  Just drag it into your form and you will have that font selection capability.  Default font is Tahoma

Enhancements:

ssOptSwitch - created Theme 5

ssContainer2 & 3:
a.  created positions 12 & 13 where  title covers the entire width of the container and caption centered
b.  Added the ability to change titlebar color of your own choosing (cBarColor)

Back to ssToExcel2:
  • Made dropdown section instead of Popup form.  Removed the need for ssXlsGui.prg
  • Implemented other ssClasses objects such as ssOptSwitch (Theme 5), ssChkBox, ssFonts and ssButton4
  • added Dot Style in Data Cell Borders
  • Gave the user additional control to exclude/include back fields
  • Gave the user the ability to reposition fields
  • Added the ability to specify 3 Font Name and Sizes
    •    f1.  For first row of Headings
    •    f2.  For second row of Headings
    •    f3.  For the rest
  • Allowed user to control FontBolds
  • Gave the user the ability to change backcolor to an RGB() of their choosing than the default
  • Created new icons and embedded those inside so what you see in the below images is what you get
 It is easier and better looking than ssToExcel, see for yourself.






Looks cooler huh?


2 comments:

  1. Dear Jun

    Can i download your classes ??? if yes can u send to me via pmkucing7@gmail.com Sir ?



    BR


    DAVID KURNIAWAN

    ReplyDelete
  2. Hello David, you can get it here: https://vfpx.codeplex.com/releases/view/99045

    ReplyDelete