The problem of Components

Stimulsoft Reports.JAVA discussion
heqichao
Posts: 113
Joined: Fri Mar 04, 2016 9:02 am

Re: The problem of Components

Post by heqichao »

how to use the drill down function in Stimulsoft Reports.Java ? I don't find this function in the web designer.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: The problem of Components

Post by Alex K. »

Hello,

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

Thank you.
Attachments
Capture.PNG
Capture.PNG (82.34 KiB) Viewed 2376 times
heqichao
Posts: 113
Joined: Fri Mar 04, 2016 9:02 am

Re: The problem of Components

Post by heqichao »

Hello,how to show my function on the list of "fx function"
Image
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: The problem of Components

Post 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.
Post Reply