Skip to main content
ShaggySPFLD
Level 2
Sep 29, 2023 5:58 PM UTC
Solved

ACS AEM Common Report Builder: Add report column with value of "NOW"

Anyone know how to add a column to the output of a ACS AEM Commons Report where the value of the output column is based off the current date, not off the returned data.  The reason why i need this is I'm using the report excel output as input to a SQL database and I plan on running this report monthly and want to be able to distinguish between runs so adding a "Report Date" field to the output would be the easiest way.  I know i could add it during the ingest, but it would take more work then just adding it to the default output from AEM.

 

I tried adding a "Report Date Column" with:

Heading: Report Date

Property: now()

Date Format: dd-MM-yyyy

 

But that just resulted in an empty column.  I also tried another suggestion of "Property = currentPage/jcr:createDate" with the same result.  Any help would be greatly appreciated

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Saravanan_Dharmaraj
Saravanan_DharmarajAccepted solution
Community Advisor
Oct 2, 2023 10:46 PM UTC

@shaggyspfld It looks like you need to write the custom code to extend the report column functionality.

please check this documentation for adding new column(Creating a Report Column)

https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/extending.html 

 

Example given in code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/6e88e55789ed72cd8433f7482343812f85a35cf1/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/report-builder/columns/containing-page/results.jsp

 

in the result.jsp, you can print the current date and it should be shown in column.

 

2 replies

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
Oct 2, 2023 10:46 PM UTC

@shaggyspfld It looks like you need to write the custom code to extend the report column functionality.

please check this documentation for adding new column(Creating a Report Column)

https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/extending.html 

 

Example given in code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/6e88e55789ed72cd8433f7482343812f85a35cf1/ui.apps/src/main/content/jcr_root/apps/acs-commons/components/utilities/report-builder/columns/containing-page/results.jsp

 

in the result.jsp, you can print the current date and it should be shown in column.

 

Translate
shikhasoni1
Level 3
Mar 19, 2025 6:46 PM UTC

Hi  @saravanan_dharmaraj 

 

How can I add this custom field to the csv as well. Could you please guide. I am not able to see this in the downloaded csv. 

Translate