A simple example… I hope this is clear.
I set up the report like this the first time. I use a dictionary for the parameters since each report/method needs different things.
Dim myDict As New Dictionary
myDict.Value("Method") = AddressOf myModule.Rpt123
myDict.Value("sql") = "SELECT a, b, c ..."
myDict.Value("other") = "foobar"
Call myModule.myMethod(myDict)
So far no problem. The dictionary has been passed through to the window displaying the report.
Later when I want to refresh the report, I need to call the method and pass it the dictionary containing the parameters. The Refresh button in the report window needs to do something like this::
Call myDict.Value("Method") (myDict) --> doesn't compile
I tried setting it up using a Delegate, but need something like this:
[code]Delegate MethodCaller(p As Dictionary)
Dim callMethod As MethodCaller
callMethod = AddressOf myDict.Value(“Method”) --> doesn’t compile[/code]