cuba-platform / reports

CUBA Reports Addon
https://www.cuba-platform.com/
Apache License 2.0
9 stars 4 forks source link

Table reports not showing all table column without band template for the entity with an associative attributes #244

Closed MikhailSilk closed 4 years ago

MikhailSilk commented 4 years ago

Environment

Description of the bug or enhancement

  1. Create a new entity with an associative attribute

  2. Run the project

  3. Create a new instance for the entity

  4. Start to create a new Report for the created entity

  5. Select a table template type and click Next

  6. Add any associative attributes and save the report изображение

  7. Open the report template

  8. Delete the band and save changes

  9. Run the report

com.haulmont.reports.exception.ReportingException: Cannot fetch instance name for entity class com.haulmont.cuba.security.entity.User. Please add all attributes used at instance name to report configuration. Report name [Report for entity "Space"]
null
    at com.haulmont.reports.ReportingBean.createReportDocumentInternal(ReportingBean.java:407)
    at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:330)
    at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:214)
    at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:46)
    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:344)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
    at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:90)
    at sun.reflect.GeneratedMethodAccessor112.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:644)
    at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
    at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
    at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
andreysubbotin commented 4 years ago

Not a bug. Add all user attributes that is required for instance name