Formula field function

4 posts, 0 answers
  1. siegfried
    siegfried avatar
    3 posts
    Member since:
    Oct 2018

    Posted 02 Aug Link to this post

    Hi, I am looking the possibilities of Telerik to make some "Formulas" (Standalone Report designer).

    I am not talking about to make a simple "Hello Mr John Smith", but some of my fields in my database need to be "decrypted".

    For example (stupid example just to be understandable) if I have a field CarDetails, and the field is made as the following :

    <CarModel>;<CarCountry>;<CarYearOfFabrication>...

    I need to use Splits, Count() etc... functions. In my case this is for some matrix, I need to know the dimension of the matrix, and make easy calculations between their fields.

    Is this kind of stuff possible in Telerik?I am used to Crystal Reports where I do it without problem, but I wish to change to Telerik, if this kind of job is possible

    Thanks in advance
  2. Silviya
    Admin
    Silviya avatar
    396 posts

    Posted 07 Aug Link to this post

    Hi Siegfried,

    When you write an expression, you have access to many built-in fields, collections, and functions that you can use alone or combine with other terms. You can add function calls, operators, constants, fields, parameters, items from the built-in collections to an expression. Built-in function calls include aggregation, commonly used utility functions, and conversion methods. For more information, please refer to Expressions Reference chapter, where you can find all built-in functions, etc.

    However, in some more specific scenarios like in your case, you can also add references to functions defined in your code. These functions are called user functions and allow you to extend the default behavior of the Telerik Reporting engine. Check the User Functions article to see how to utilize them.

    Best Regards, Silviya
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. siegfried
    siegfried avatar
    3 posts
    Member since:
    Oct 2018

    Posted 07 Aug in reply to Silviya Link to this post

    Hi, and thanks for answer.

    I am beginning with Telerik, and still trying to use it (demo version). Would you have some documentation how to make it "step by step"?

    Imeet the following problem :

    I read about your user functions (link you gave me), but I couldn't find in documentation a concrete example on how to achieve that. Is there somewhere some sample I could use for it? Concretely I created my function in my project as described on your documentation.
    But now, how can I create a report that uses it? Then is it necessary to create report from Visual Studio? Or can I create reports separately from VS, so my customers could create/edit themselves reports(buying a Telerik Report licence).

    Regards,

     

  4. Silviya
    Admin
    Silviya avatar
    396 posts

    Posted 12 Aug Link to this post

    Hi Siegfried,

    If I understood correctly, the requirement is to use custom user function in a Standalone Designer report.

    Basically, there is no difference when using custom user functions in Type (.CS) and Declarative (.TRDP) reports. Note that any public static method that resides in a loaded assembly can be invoked from an expression by its fully qualified name, including the full namespace and the name of the type it belongs to, and specifying the necessary parameters in the braces - check User Functions article.

    Note that in order the custom function to be accessible in Standalone Designer for design purposes, it will be necessary to copy the assembly into the directory where the standalone report designer EXE is and register the corresponding assembly in the designer's config file, as explained in the Extending Report Designer article. The custom functions will appear under Functions->Misc - check the attached screenshot for clarity.

    Best Regards,
    Silviya
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top