How to use Property Constraints during developing Reporting components | Community
Skip to main content
rohan_bhaumik
October 16, 2015
Solved

How to use Property Constraints during developing Reporting components

  • October 16, 2015
  • 4 replies
  • 1039 views

I'm working on creating a custom report report page on my CQ 5.6.1 instance. I've got my reportbase and columnbase components set up correctly, by following the steps listed here. I am able to, for instance, pick up all the pages that are available, by setting the property nodeTypes to cq:Page

I want to add a constraint to it, say for example pick up pages which have the title "test".  I created a node under querybuilder called propertyConstraints and added my constraints in the form of nodes below it, as described here. Property added to the node was jcr:title and the value was test.  However, this does not work for me at all. The output I get is "No rows to display"

What is the correct way to add constraints to the querybuildernode?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Your settings looks right to me. Not sure what you are missing. Make sure to take care of below

  • Hope you defined at baseroot and not at column. An example of audit report attached. [img]Report.png[/img]
  • Not sure how you are loading data because once report fetches it will serve from memory rather than reading disk every time.

4 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Your settings looks right to me. Not sure what you are missing. Make sure to take care of below

  • Hope you defined at baseroot and not at column. An example of audit report attached. [img]Report.png[/img]
  • Not sure how you are loading data because once report fetches it will serve from memory rather than reading disk every time.
rohan_bhaumik
October 16, 2015

thanks for your reply! it works now. I had defined my properties in propertyConstraints node incorrectly.


A final followup question :-

I need to fetch only certain pages that were created/modified "x" number of days from current system date. I was thinking of adding this check at the column component (have a column component which extracts jcr:created for each row, compare with system date and so forth.)  How can I get the system date? Should I use a pre-processor for this? I'm not able to find an OOTB example that does something like this, so I'm not sure how to proceed.

 

October 16, 2015

Hi Rohan

Could you solve the constraints?

I am trying a similar Query but I was not able to solve it.

I can add a preprocessing node with datedelta property.

But I don't know it how to apply a filter on it.

If you were able to solve this, can you share it?

 

Thanks

Sham_HC
Level 10
October 16, 2015

Rohan Bhaumik wrote...

thanks for your reply! it works now. I had defined my properties in propertyConstraints node incorrectly.


A final followup question :-

I need to fetch only certain pages that were created/modified "x" number of days from current system date. I was thinking of adding this check at the column component (have a column component which extracts jcr:created for each row, compare with system date and so forth.)  How can I get the system date? Should I use a pre-processor for this? I'm not able to find an OOTB example that does something like this, so I'm not sure how to proceed.

 

yes pre processor is right way. I am sure you have OOB example  auditreport with time column.