VBS: request for information
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
GenoPro Support Forum
Home        Members    Who's On
Welcome Guest ( Login | Register )
        



VBS: request for information Expand / Collapse
Author
Message
Post #20942 Posted 3/3/2008 8:43:14 AM


Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: Today @ 11:23:19 AM
GenoPro Version: 2.0.1.6
Posts: 424, Visits: 1,124
Hello everyone,

Not a bug but related to the Rep Gene.
I'm presently trying a bit of VBS programming and I'm struggling with DATES:
1) On your help site page http://www.genopro.com/sdk\Class/GenoDate/ , it is shown an 'Anniversary' function. It doesn't seem to work with me?
2) I saw, for example, in the MS VBS ref site http://msdn2.microsoft.com/en-us/library/3ca8tfek.aspx, a 'DatePart' function. I tried it but again it doesn't seem to work/be supported (despite I've got .NET Framework 3.0 installed).
Question: I'd like to know if these sample problems are due to the shortage of my programming skill or if it is due to another reason?
3) Regarding the SortByKey() function, I kindly suggest Genopro to expand on the subject (in adding 'examples') as presently we, users, don't have a clue about the accepted supported arguments.
Thank you for your time,
JC

Post #20943 Posted 3/3/2008 10:57:40 AM


IT Director GenoPro

IT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoProIT Director GenoPro  

Group: Customers
Last Login: Today @ 11:59:50 AM
GenoPro Version: 2.0.1.6
Posts: 434, Visits: 5,738
There is an example of the SortByKey() in the object repertory.

http://www.genopro.com/sdk/Class/ObjectRepertory/

If the example seems to be broken or is not doing what you expected, feel free to drop us a line about what you need as a developper.


If the facts don't fit the theory, change the facts.
-- Albert Einstein

Jean-Claude Morin
Information Technology Director, GenoPro.
http://www.genopro.com

Post #20955 Posted 3/4/2008 6:12:19 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 6:34:28 PM
GenoPro Version: 2.0.1.5
Posts: 1,048, Visits: 4,776
I too found that the GenoDate object property Anniversary was not recognized. There is a Birthday property for an Individual (i.Birthday) but that does not help for anniversaries of other dates e.g. marriage.

It is important not to confuse GenoPro dates i.e. GenoDate objects and its associated methods and properties with a VBscript 'date expression'. the VBScript function DatePart requires a 'date expression'. GenoPro date objects can be converted to 'date expressions' using the GenoDate ToString method e.g. DatePart("q", i.Birth.Date.ToString("d-MMM-yyyy") Note that the 'date expression' must be valid and not empty. You can check this using the VBScript function IsDate e.g. IsDate(i.Birth.Date.ToString("d-MMM-yyyy"))

You can download a Help file on Windows Scripting (VBScript & JScript) from here.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Post #20971 Posted 3/7/2008 8:36:30 AM


Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: Today @ 11:23:19 AM
GenoPro Version: 2.0.1.6
Posts: 424, Visits: 1,124
Thank you both.
I was actually trying to group an Ind collection with a Fam one into a repertory and had problem reading, extracting and manipulating the Birth and marriage dates.
I however succeeded after many trial & errors, almost code line after code line.
I attached my revised version of the Birthday '& Anniversary' listing.
I tested it with my own tree and everything seems fine.
I changed the programming language from Jscript to VBscript as I thought it would be easier. So before running it, change lines 2 & 3 of the associated config.xml file to:

<Skin Name="Birthday & Anniversary Listing">
<ReportGenerator ScriptLanguage="VBScript" >

Pity it's not Language portable yet!
JC

  Post Attachments 
default.htm (5 views, 5.89 KB)

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: GenoProSupport, JcMorin, Ron

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 10:51 PM

Copyright 1998-2008 GenoPro. All rights reserved. GenoPro and the GenoPro logo are trademarks.