Page 4 of 4

Re: The problem of Components

Posted: Wed Jul 13, 2016 12:31 pm
by heqichao
how to use the drill down function in Stimulsoft Reports.Java ? I don't find this function in the web designer.

Re: The problem of Components

Posted: Wed Jul 13, 2016 7:47 pm
by Alex K.
Hello,

Please see the Interactive Reports category on our online Demo:
http://java.stimulsoft.com/?report=Dril ... OfProducts

Thank you.

Re: The problem of Components

Posted: Tue Jul 19, 2016 2:45 am
by heqichao
Hello,how to show my function on the list of "fx function"
Image

Re: The problem of Components

Posted: Tue Jul 19, 2016 1:56 pm
by Alex K.
Hello,

Unfortunately, it is not possible to add your own function in the dictionary.

You can use the additional code to add additional function in the report:

Code: Select all

public StiReport render(StiReport report) throws IOException, StiException {
           report.getCustomFunctions().add(new StiCustomFunction() {
            public Object invoke(List<Object> args) {
                return ((String) args.get(0)).substring(((Long) args.get(1)).intValue(), ((Long) args.get(2)).intValue());
            }

            @SuppressWarnings({ "rawtypes", "unchecked" })
            public List<Class> getParametersList() {
                return new ArrayList<Class>(Arrays.asList(String.class, Long.class, Long.class));
            }

            public String getFunctionName() {
                return "subStr";
            }
        });
        return super.render(report);
    }
viewtopic.php?f=19&t=40284
Thank you.