GithubHelp home page GithubHelp logo

cuba-platform / reports Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 4.0 9.68 MB

CUBA Reports Addon

Home Page: https://www.cuba-platform.com/

License: Apache License 2.0

XSLT 4.86% Groovy 5.43% PLpgSQL 0.11% Java 89.60%
cuba-platform cuba-component reports enterprise yarg

reports's Introduction

CUBA Reports Add-on

license Build Status Documentation

The Reporting add-on is designed to simplify the report generation in CUBA applications. It enables creating report templates in most popular editors like Microsoft Office and Libre/Open Office and defining data sources at runtime, using CUBA data model, SQL, JPQL or scripts.

For more information see github.com/cuba-platform/cuba.

Build and install

In order to build the add-on from source, you need to install the following:

Let's assume that you have cloned sources into the following directories:

work/
    cuba/
    cuba-gradle-plugin/
    reports/

Open terminal in the work directory and run the following command to build and install the plugin into your local Maven repository (~/.m2):

cd cuba-gradle-plugin
gradlew install

After that, go to the cuba directory and build and install it with the same command:

cd ../cuba
gradlew install

Finally, go to the reports directory and build and install it with the same command:

cd ../reports
gradlew install

reports's People

Contributors

alex-haulmont avatar alexbudarov avatar andreysubbotin avatar comru avatar desire456 avatar dkz avatar dtaimanov avatar flaurite avatar gavrilov-ivan avatar gglcrash avatar glebfox avatar gorbunkov avatar ivanmalofeev avatar jreznot avatar kandalin-d avatar klaus7 avatar knstvk avatar nikitashchienko avatar plakhov avatar pribavkindenis avatar sergey-sw avatar sevdan avatar soraksh avatar sukhova avatar tinhol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

reports's Issues

Date from JSON is not printed when formatter is specified for the corresponding field

  1. In a project enable Reporting addon
  2. Create some entity with date, datetime and time properties
  3. Start the application and create several instances of the entity
  4. Using REST API get Json with the list of entities
  5. Using wizard create a report "for the list of entity" and select all the date attribs
    !image.png!
  6. change type of the dataset from list if entities to Json and specify the JSON with the list of entity instances
    !image2.png!
  7. launch the report. Check how the dates are written to the output document

AR : Dates from JSON are not printed when formatters are specified for date fields.
!image3.png!

!image4.png!


Original issue: https://youtrack.haulmont.com/issue/PL-9913

Simplify crosstab creation

Add new type of Report Band - Crosstab.

When user creates such band, system automatically creates 4 data sets for the band - StaticHeader, DynamicHeader, Master, Details, user can not remove them.
The Details query should have ability to refer to Main query results (example: id = ${Master.user_id})

On data load system automatically expand the data sets to bands. The bands should have the same names (StaticHeader , DynamicHeader, Master, Details). The bands should be organized to parent -> child structure. StaticHeader -> DynamicHeader, Master-> Details. Parents must be Horizontal, children must be Vertical.

The XLSX file should have the same named ranges on it.

Additionally, if user provides header_id in DynamicHeader and in Details data sets, system checks if the certain Details query selects enough data and fill the missing data. In this case system also sorts Details results to match the DynamicHeader order. If header_id is not provided - system generates the report as is.

🔗 Related links: {"relates to:": "https://youtrack.haulmont.com/issue/PL-10478"}


Original issue: https://youtrack.haulmont.com/issue/PL-9865

Design time reports declaration on Java or Groovy

To provide well-autotested product reports make possible to define them in the following way

@Report(
        name = "sample report",
        defaultTemplate = "path/to/resource.xlsx",
        ...
)
@ReportTemplates(...)
@ReportParameters(...)
@ReportValueFormats(...)
@ReportRoles(...)
@ReportScreens(...)
public class SampleReport implements YargReport {

    @ReportParameter
    private Customer customer;

    @ReportParameter(name = "order_param")
    private Order order;

    @ParameterTransformation(name = "customer")
    protected Customer trasformCustomer(Customer customer) {
        try (Transaction tx = persistence.createTransaction()) {
            EntityManager em = persistence.getEntityManager();
            return persistence.getEntityManager().reload(customer, "full-view");
        }
    }

    @ParameterValidation(name = "order_param")
    protected boolean validateOrder(Order order) {
        return order.getState().equales(OrderState.VALID);
    }

    @ReportBand(name = "header")
    public BandData headerBand(ParentBand parentBand) {
        return BandData.of("customer_name", customer.getName());
    }

    @ReportBand(name = "customer_details", parentBand = "header")
    public BandData detailsBand(ParentBand parentBand){
        parentBand.getBandData();
        ...
    }

}

Original issue: https://youtrack.haulmont.com/issue/PL-9860

Cannot print an XLSX report with pictures if the template was created by wizard

A simple test project could be found here https://github.com/IskandarovRost/pictureTest

Entity "PrintMe" has

link to sys$FileDescriptor
String field for storing a picture URL
byteArray

  1. Create an XLSX report (for single entity or a list of entities) by wizard
  2. Chose to print URL of the picture and byteArray

!image.png!

  1. Specify value formats for the attributes.
PrintMe.savedPicture :  ${bitmap:150x150}
PrintMe.unifiedLink     :   ${image:200x200}

!image2.png!

  1. Complete the report creation
  2. Run the report

AR: the exception occurs. But if to download the template, open it, save in Office and upload the file back - everything works.

com.haulmont.reports.exception.ReportingException: An error occurred while inserting bitmap to xlsx file Report name [Report for entity "Print Me" (2)]
org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart cannot be cast to org.docx4j.openpackaging.parts.DrawingML.Drawing
	at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:283)
	at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:166)
	at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:37)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:115)
	at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy211.createReport(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:95)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:146)
	at com.sun.proxy.$Proxy53.createReport(Unknown Source)
	at com.haulmont.reports.gui.ReportGuiManager.getReportResult(ReportGuiManager.java:207)
	at com.haulmont.reports.gui.ReportGuiManager.printReportSync(ReportGuiManager.java:191)
	at com.haulmont.reports.gui.ReportGuiManager.printReport(ReportGuiManager.java:177)
	at com.haulmont.reports.gui.report.run.InputParametersWindow.printReport(InputParametersWindow.java:62)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:92)
	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)
	at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
	at com.vaadin.ui.Button.fireClick(Button.java:377)
	at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54)
	at com.vaadin.ui.Button$1.click(Button.java:54)
	at sun.reflect.GeneratedMethodAccessor209.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:442)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:414)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
	at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.lambda$synchronizedHandleRequest$0(CubaVaadinServletService.java:314)
	at com.haulmont.cuba.web.sys.CubaVaadinServletService.withUserSession(CubaVaadinServletService.java:196)
	at com.haulmont.cuba.web.sys.CubaVaadinServletService$CubaUidlRequestHandler.synchronizedHandleRequest(CubaVaadinServletService.java:314)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:384)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:276)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:185)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)


Original issue: https://youtrack.haulmont.com/issue/PL-8742

Ability to use band hierarchy with the docx-template.

Ability to use temporary tables in heavy SQL reports

Многие отчеты, которые запрашивают заказчики, было бы очень удобно реализовывать с использованием временных таблиц.
Сначала грузим определенный срез данных во временную таблицу, а потом его обрабатываем по-всякому с группировками, оконными функциями и т.п. в разных бендах.

Сейчас такая возможность в кубовском репортинге отсутствует. SQL бенды обязательно должны возвращать результат, иначе будет ошибка выполнения отчета.

Единственный возможный вариант сейчас - создавать первый и последний груви-бенды, и в них писать создание и удаление временной таблицы в груви-коде.


Original issue: https://youtrack.haulmont.com/issue/PL-7348

Ability to use object fields in the report template

Now it's impossible to return an object from the band dataset and then use the object fields in the report template.
For instance, if I have an entity Contact with, say 20 fields, I cannot return just 'contact' from the dataset and then in the template to use placeholders like ${contact.name} or ${contact.email}. I have to build the map with all contact fields in the dataset (contactName, contactEmail, etc.).


Original issue: https://youtrack.haulmont.com/issue/PL-9078

Xlsx-report with image could not be printed when created by wizard

The exception is thrown in YARG XlsxFormetter, But it seems without the wizard user will not name the field in such format

  1. Create a project and switch on Reporting
  2. Create an entity Employee
  3. Add link (many_to_one association) to ''FileDescriptor''.
  4. Using wizard, create XLSX report for the ''Employee'' entity.
    Select the "fileDescriptor.id" attribute (enabled in PL-8754)
    Adjust ''imageFileId'' - output format for the field
  5. Try to print the report

AR: If the field reference is similar to ''Employee.fdLink.id'' the exception occurs. If to modify the template and report and specify the simple name of field it work correctly.

com.haulmont.reports.exception.ReportingException: An error occurred while inserting bitmap to xlsx file Report name [Report for entity "Employee" (3)]
org.docx4j.openpackaging.parts.SpreadsheetML.WorksheetPart cannot be cast to org.docx4j.openpackaging.parts.DrawingML.Drawing
	at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:288)
	at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:171)
	at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:38)
	at sun.reflect.GeneratedMethodAccessor407.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:115)
	at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:629)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:618)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy214.createReport(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor406.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:148)
	at com.sun.proxy.$Proxy53.createReport(Unknown Source)
	at com.haulmont.reports.gui.ReportGuiManager.getReportResult(ReportGuiManager.java:209)
	at com.haulmont.reports.gui.ReportGuiManager.printReportSync(ReportGuiManager.java:193)
	at com.haulmont.reports.gui.ReportGuiManager.printReport(ReportGuiManager.java:179)
	at com.haulmont.reports.gui.report.run.InputParametersWindow.printReport(InputParametersWindow.java:62)
	at sun.reflect.GeneratedMethodAccessor405.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform(DeclarativeAction.java:92)
	at com.haulmont.cuba.web.gui.components.WebButton.performAction(WebButton.java:44)
	at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1(WebButton.java:36)
	at sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163)
	at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:1037)
	at com.vaadin.ui.Button.fireClick(Button.java:377)
	at com.haulmont.cuba.web.toolkit.ui.CubaButton.fireClick(CubaButton.java:54)
	at com.vaadin.ui.Button$1.click(Button.java:54)
	at sun.reflect.GeneratedMethodAccessor210.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:119)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:444)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:409)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:274)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1422)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:385)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:278)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:187)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.handleNotFiltered(CubaHttpFilter.java:108)
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:95)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)


Original issue: https://youtrack.haulmont.com/issue/PL-9049

More convenient way to add additional image sources to reporting engine

В Такси сделаны свои логотипы, которые хранят в картинки в БД.

Потом они используются в отчетах примерно так:
{quote}
Использование в отчетах
Ссылки на картинки-логотипы задаются через спец. символ image://

row.put('logo', 'image://logo.png')
{quote}

Сейчас, чтобы иметь возможность использовать свои картинки в pdf-отчетах - приходится полностью переопределять com.haulmont.reports.libintegration.CubaHtmlFormatter#renderPdfDocument и
com.haulmont.taxi.core.app.reports.TaxiHtmlFormatter.TaxiResourcesITextUserAgentCallback#getImageResource

и копировать оттуда много кода.

см. https://svn.haulmont.com/taxi/app/stable/modules/app-core/src/com/haulmont/taxi/core/app/reports/TaxiHtmlFormatter.java
как это выглядит

Было бы неплохо дать удобные extension points: URI --> InputStream ресурса.


Original issue: https://youtrack.haulmont.com/issue/PL-7372

web:// resource path resolution logic uses property with "external url" meaning

Для формирования ссылок на ресурсы в "app" модуле - используется свойство GlobalConfig#getWebAppUrl

Из джавадоков - "Used for making external links to the application screens".

Т.е. там хранится внешний урл к системе: с доменным именем, возможно https префиксом, другим портом, если используется прокси-сервер.

Например в нашем корпоративном тезисе свойство принимает значение https://tezis.haulmont.com/app

Поэтому для разрешения ссылок на ресурсы придется либо задавать не подходящее по смыслу значение вида "http://localhost:8082/app", либо настраивать какие-то дополнительные правила на прокси-сервере (к которому может и не быть доступа).


Original issue: https://youtrack.haulmont.com/issue/PL-6223

Link is printed in the table report instead of selected fields of the related entity

  1. There are two related entities: ''Linker'' has a link to ''Linked''
  2. Using wizard, create the "for list of entities" report for ''Linker''
  3. Chose to display some ''Linker'' fields and some fields of the linked to it "Linked"
    !image.png!
  4. Adjust output type = table
    Print the report

AR: instead of fields of the related entity its instance name(the link attribute) is printed in the table

!image3.png!


Original issue: https://youtrack.haulmont.com/issue/PL-9742

Merge all image formatters into one

Implement one formatter for url, bytearray and fileDescriptor images in the following way:

${img:bytearray|url|file:WxH|rect(WxH)}

In the first way of size definition W or H, one at a time can be set to AUTO, then this dimension will be calculated automatically in the proportion the original ratio between sides. The second way explains that the image should be fit into the rectangle, in this case AUTO doesn't make sense.


Keep compatibility with the old formatters


Original issue: https://youtrack.haulmont.com/issue/PL-8623

Reporting query with a parameter and a macro doesn't work

For example:

select
e.tipoProdotto as "tipoProdotto",
e.numeroLotto as "numeroLotto",
fornitore.ragioneSociale as "fornitore.ragioneSociale",
e.riferimentoFattura as "riferimentoFattura",
e.motivazioneRifiuto as "motivazioneRifiuto",
e.data as "data",
e.firma as "firma"
from girasole$AnnotazioniIngressoProdotti e  
left join e.fornitore fornitore 
 where (e.prodottoAccettatoSiNo = ${prodottoAccettatoSiNo1} and @between ( e.data, now, now + 1, month))

leads to "Named and positional input parameters must not be mixed in a single query" error.

See https://gitter.im/cuba-platform/cuba?at=5921360405e3326c67f2a249


Original issue: https://youtrack.haulmont.com/issue/PL-9125

REST API for Reporting add-on

Add REST API for reporting module

Proposal for implementation:

  1. method to get a list of reports
  2. method to get Report Info (parameters, output file type and so on)
  3. method to launch a report and get the result
  4. method to return Swagger documentation

Implementation contains 3 methods:

  1. GET /report with no arguments, it returns JSON array with a list of reports
  2. GET /report/{id} with one string argument report id.
    It returns JSON object with information about the report: name, code, parameters with their types, list of contained templates.
  3. POST /run/{id} with one string argument report id. Post body contains report parameters and template code
  4. GET /docs/swagger.json documentation

Reports for REST API should have a special flag: Visible for REST API on Roles and Screens tab. Reports without this flag isn't visible for REST API

Tested locally on: http://localhost:8080/app/rest/reports/v1/


Original issue: https://youtrack.haulmont.com/issue/PL-8202

Warn a user when output type is changed to "table"

  1. Create some great report with HTML template for instance or with some another hardly created template

!image.png!

  1. Open the template editor and change Output type = Table/ Save the template

!image3.png!

  1. Reopen the template editor

AR: the great hardly created template file is lost. It seems some warning or confirmation dialog should be shown there.
!image4.png!


Original issue: https://youtrack.haulmont.com/issue/PL-9914

Add ability to use dynamic attributes in entity datasets

  1. create some entity
  2. enable reporting in the project
  3. start the application
  4. create several dynamic attributes for the entity
  5. using wizard create a report for the entity chose "for list of entities" or "for single entity"
  6. try to add dynamic fields to output

AR: there is no simple way to print dynamic attributes in report
It is suggested to add an ability to include also dynamic attributes to the report


Original issue: https://youtrack.haulmont.com/issue/PL-9749

List of the enumeration types in the report parameters should include only enumerations defined in the global modules

Refapp

  1. Create a new report
  2. Create a new report parameter
  3. Select Enumeration type
  4. Select Day (Day) from the drop-down list of enumeration
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at org.apache.commons.lang.ClassUtils.getClass(ClassUtils.java:757)
	at org.apache.commons.lang.ClassUtils.getClass(ClassUtils.java:790)
	at com.haulmont.cuba.core.sys.serialization.StandardSerialization$1.resolveClass(StandardSerialization.java:65)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1826)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1713)
	at java.io.ObjectInputStream.readClass(ObjectInputStream.java:1678)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1518)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
	at com.haulmont.cuba.core.sys.serialization.StandardSerialization.deserialize(StandardSerialization.java:69)
	at com.haulmont.cuba.core.sys.serialization.StandardSerialization.deserialize(StandardSerialization.java:90)
	at com.haulmont.cuba.core.sys.serialization.SerializationSupport.deserialize(SerializationSupport.java:64)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:76)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:148)
	at com.sun.proxy.$Proxy69.convertFromString(Unknown Source)
	at com.haulmont.reports.gui.parameter.edit.ParameterEditor.initDefaultValueField(ParameterEditor.java:187)
	at com.haulmont.reports.gui.parameter.edit.ParameterEditor.lambda$initListeners$1(ParameterEditor.java:139)
	at com.haulmont.bali.events.EventRouter.fireEvent(EventRouter.java:45)
	at com.haulmont.cuba.gui.data.impl.AbstractDatasource$ItemListener.propertyChanged(AbstractDatasource.java:307)
	at com.haulmont.chile.core.model.impl.AbstractInstance.propertyChanged(AbstractInstance.java:51)
	at com.haulmont.reports.entity.ReportInputParameter.setEnumerationClass(ReportInputParameter.java:127)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)```


---
Original issue: https://youtrack.haulmont.com/issue/PL-9744

Detailed perf stats for report generation

Currently we have only perfstats measuring the whole report execution:

Reporting#New Driver Reporting                      181544.0      181544      181544         0.0           1
Reporting#Average Survey Report by KPI              154124.0      154124      154124         0.0           1
Reporting#Driver Pay Sheet New                         327.0         327         327         0.0           1

But sometimes it is necessary to have detailed information about each generation step.
Example: XLSX document with more than 50000 rows. Generating a xlsx document can take longer than loading SQL bands data from database.

It would be useful to have detailed performance information about report execution steps.


Original issue: https://youtrack.haulmont.com/issue/PL-8800

System attributes of linked entity are always shown selected in dataset with "entity" or "list of entities" type

  1. Create a pair of entities in one add link to another
  2. Using wizard create a report for the "owning side" entity or list of entities
  3. When choosing fields of linked entity, chose some utility fields
  4. Complete report creation
  5. Check which attribs are selected in the dataset

AR: system attributes of the linked entity are shown

!image.png!


Original issue: https://youtrack.haulmont.com/issue/PL-9625

PDF Reports in Jelastic could be printed only on English as there are no fonts installed

See https://www.cuba-platform.ru/support/topic/jelastic-pdf.

  1. Enable the Russian language in the application
  2. Add reporting to the project
  3. Deploy the application to Jelastic Cloud
  4. Login Using Russian locale
  5. Using wizard, create a report for some entity. With DOCX template and output type = PDF
  6. Try to print the report
    AR
    !Image.png!

We need to fix it somehow or probably describe the workaround in the documentation.
Or maybe ask Jelastic to add some fonts to CUBA environments.


Original issue: https://youtrack.haulmont.com/issue/PL-9713

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.