Forums › Forums › SIMPOL Programming › Drilldown
Tagged: Drilldown
- This topic has 7 replies, 2 voices, and was last updated 6 years, 10 months ago by Michael.
- AuthorPosts
- September 7, 2017 at 4:28 pm #3536JD KromkowskiParticipant
I used drilldown quite a bit, but a minor aesthetic issue and a question.
1. WHAT is the relationship between the SUM of the colwidths[] values and the width?
For example, in the code below colwidths[] sum is 350 (275+75). What value for “width” will display the both columns entirely but will not cause there to be a horizontal scroll.
2. How would I use setfilterhandler? Say in this partial example, I’d only like to display records where FeeAmount > 100.00. How would I do that?
**********************partial code example********************************
dispflds[1] =@ app.tables.issueb!BillingIssue
dispflds[2] =@ app.tables.issueb!FeeAmountcolwidths =@ array.new()
colwidths[1] = 275
colwidths[2] = 75e = 0
r =@ drilldown(appw.w, 475, 400, idx, 10, 1, “Select a Billing Issue”, “Issue list”, \
dispflds=dispflds, colwidths=colwidths, defboolean=dispfmt.defboolean, \
definteger=dispfmt.definteger, defnumber=dispfmt.defnumber, \
defdate=dispfmt.defdate, deftime=dispfmt.deftime, \
defdatetime=dispfmt.defdatetime, datelocale=app.SBLlocale.datelocale, \
numlocale=app.SBLlocale.numlocale, caseinsensitive = .true, \
startvalue = “%”, error=e)September 12, 2017 at 5:32 pm #3539MichaelKeymasterHi John,
Question 1 is a bit complicated. It seems like you are looking for the maximum width of the grid content before it displays a horizontal scrollbar. This not always easy to sort out, and may depend on the font and font size in use. I tend to experiment myself until I find something I am happy with. The tablesearch actually contains a feature to let you display the column widths so you can figure it out interactively during the development phase, then you turn it off for production.
As for question 2, you pass a setfilterhandler=myfilterhandler with an optional reference. The function receives either just the string of chars that have been entered or that plus the optional reference. The return value of the function is expected to be a valid whereclause entry for a report.
function myfilter(string s) string where where = "BillingIssue LIKE '" + s + "' AND FeeAmount > 100" end function where
Ciao, Neil
September 16, 2017 at 2:56 pm #3541JD KromkowskiParticipant“The tablesearch actually contains a feature to let you display the column widths so you can figure it out interactively during the development phase, then you turn it off for production.”
So I see boolean showcolwidths. What’s the best way to go about this. Do I go into the dd project, change to .true and then rebuild the the whole drilldown.sml library as something new like drilldowntest.sml, include drilldowntest.sml and remove drilldown.sml. Then get proper values, fix code, then go back and remove drilldowntest and include original drilldown.sml.
Or is there a simpler way to do this? like getting tsinfo and setting showcolwidths?
September 18, 2017 at 12:36 pm #3544MichaelKeymasterYou just pass .true for the showcolwidths parameter and .true for the allowcolwidthsdrag parameter.
Ciao, Neil
September 18, 2017 at 3:03 pm #3547JD KromkowskiParticipantI get passing those parameters but drilldown() doesn’t have those parameters to pass. They resident in tablesearch(), which is called within the drilldown.sml.
I thought as a general rule we shouldn’t alter the .sml libraries. So while I can see how I would change parameters in tablesearch within the drilldown project, I obviously then would need to rebuild and thus change the sml.
So what I was asking not clearly enough: Is there a way to set these parameters WITHOUT changing the drilldown.sml?
September 19, 2017 at 4:11 pm #3548MichaelKeymasterNo, what I was suggesting was that you temporarily use a tablesearch() during development, just to establish the required colwidths, then pass those colwidths to drilldown().
October 13, 2017 at 3:30 pm #3551JD KromkowskiParticipantI have finally understood what you were telling me.
Use tablesearch() temporarily INSTEAD of drilldown(). I didn’t understand until a recent email with Ian, that you could call tablesearch directly!
I get it now. And wishing you speedy recovery.
JDK
October 21, 2017 at 1:17 pm #3552MichaelKeymasterHi John,
I’m glad you got it and thank you to Ian for pointing you in the right direction.
As for me, there have been a few bumps along the way, but we are still on course :).
Ciao, Neil
- AuthorPosts
- You must be logged in to reply to this topic.