-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fields from HasMany Relationship #1
Comments
It's something that would be nice - for the moment, if you're wanting fields from a relationship, you need to create your own AdvancedReport (or DataObjectReport) subclass and manually add in the fields the user can select by
|
Thank you for your assistance. I've started building my own obeject. Everything looks good but when error_log(/var/log/silverstripe): failed to open stream: Is a directory I've modified permissions on /var/log/silverstripe to 777. I've also Can you advise what advanced report is trying to do here? Thank you. Steve Quoting nyeholt
|
The important bit is
Your report subclass needs to implement this method to return the actual data objects that will be displayed in the report. Check the DataObjectReport class for an example. |
K. That is fixed. Now my final issue. I'm trying to include fields from a hasmany table that relates to my primary table. I modified getReportableFields to reference one of my other tables. In the example code below I have a primary table "Family" and another table "Individual". The relationship that relates them is "Individuals". So here is the code: protected function getReportableFields() { The field is displayed but comes up blank when I generate the report. How do I get the report to pull the selected field value from a hasmany relationship? } |
Is it in tthe roadmap to add field values from the hasmany or manymany relationship?
The text was updated successfully, but these errors were encountered: