Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Keyword Report (Read 2639 times)
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Keyword Report
Reply #15 - Oct 22nd, 2006 at 1:11pm
Print Post Print Post  
Post it to the Programming Examples Board?  Smiley
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Keyword Report
Reply #16 - Oct 22nd, 2006 at 7:56pm
Print Post Print Post  
Thanks for your words Spencer.  I don't think there's enough for Programming Examples.

Most of the credit for Spencer's report goes to Ray who provided 95% of the code.  Spencer had created a report modified from the sample Keyword Report provided by Ray.    This particular report was done using the Report "Keyword Report" vs. the "Button Report" I have referred to earlier.  Spencer added about 10 more columns to the sample report based on the instructions I provided above.

My contribution was to do an autopsy on Ray's code to see how he did it, and to add just few more lines.

The KeyWords in column1 had values like 1 - Morning, 3 - Afternoon, 5 - Evening for purposes of sorting by time of day, using the number for sorting. 

I modified the code, adding two string variables vThisKeyWord and vLastKeyWord.
The code was then modified to compare these values to see when the KeyWord value changed.
If the value did not change, the cell value becomes " " vs. repeating.
When the KeyWord was to be printed, then we then used @MID to strip off the sorting value to end up with just the Time of Day names, Morning, Noon, Afternoon, Evening, etc.

The only things that required change were a few lines of code in Out-OnPrint section.
Here is what changed, under the 2nd While loop:

           Edited:
While vListLoop <= vListCnt {
           vData = @AccessStringArray(vList,vListLoop)
           vOut = vOut + "<TR>"
             vOut = vOut + "<TD>"

               //Process first column data
              vThisKeyWord = Split(vData,"|")
              If vThisKeyword <> vLastKeyword Then {      
                 vOut += @Mid(vThisKeyWord,5,100)
                 } Else {
                 vOut += " "
                 }

           vOut = vOut + "</TD>"


And then udated the vLastKeyWord value at the end of updating all of the addition column elements, near the end of the code:
Edited:
           vLastKeyWord = vThisKeyWord
            vListLoop = vListLoop + 1
           }
     vOut = vOut + "</TABLE>"
     Out = vOut
     }


« Last Edit: Oct 23rd, 2006 at 6:19am by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Keyword Report
Reply #17 - Nov 1st, 2006 at 9:55pm
Print Post Print Post  
I would also like to get a copy of the sample Keyword Report.
  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Keyword Report
Reply #18 - Nov 1st, 2006 at 10:05pm
Print Post Print Post  
Hello obfusc88,

You should have an e-mail shortly at your Yahoo account with the sample files as attachments.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
obfusc88
Full Member
***
Offline


No personal text

Posts: 194
Joined: Dec 17th, 2005
Re: Keyword Report
Reply #19 - Nov 3rd, 2006 at 4:09am
Print Post Print Post  
Thank you for sending the sample report files.  I opened them in my email today.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print