Forums › Forums › OroPlatform › OroPlatform – Programming Questions › How to show custom entities on Reports?
This topic contains 7 replies, has 2 voices, and was last updated by Rodolfo 9 years, 1 month ago.
Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.
- CreatorTopic
- February 20, 2015 at 9:27 pm #33783
Hello!
I used migrations to create custom entities. How can I show it up on Reports Management?
- CreatorTopic
- AuthorReplies
- February 23, 2015 at 3:45 am #33784
Hi, @rbandeira.
Custom entities should be available in report manager automatically.
Can you provide your migration script to try to reproduce your case?
February 23, 2015 at 7:50 am #33785Hi @yurio,
I belive they will be available on report manager only if I use extended entities. But I created a custom entity from scratch using Migration\Installation.
12345678910111213141516171819202122232425262728293031323334353637383940<?phpnamespace Acme\Bundle\AcmeMyBundle\Migrations\Schema\v1_0;use Doctrine\DBAL\Schema\Schema;use Oro\Bundle\MigrationBundle\Migration\Installation;use Oro\Bundle\MigrationBundle\Migration\QueryBag;class CreateMyBundleEntityMigration implements Installation{/*** {@inheritdoc}*/public function getMigrationVersion(){return 'v1_0';}public function up(Schema $schema, QueryBag $queries){$this->createAcmeMyAccountsTable($schema);......}/*** Create acme_mybundle_accounts table** @param Schema $schema*/protected function createAcmeMyAccountsTable(Schema $schema){$table = $schema->createTable('acme_mybundle_accounts');$table->addColumn('id', 'integer', ['autoincrement' => true]);$table->addColumn('customer', 'string', ['length' => 32]);$table->addColumn('company', 'string', ['length' => 100]);......February 23, 2015 at 8:53 am #33786February 23, 2015 at 10:09 am #33787Meanwhile I’ll try to implement this and check if my entity will show up on Report Management:
February 23, 2015 at 12:18 pm #33788Found the answer.
Maybe could be useful to someone. To add custom entities into Report Management it’s necessary follow these steps. In my case I used @Config annotation.Thanks!
February 25, 2015 at 8:59 am #33789Hi, @rbandeira.
You are correct, in your case, your entity should contain Config annotation.
But small additional comment. In your migration example, will be created ‘system’ entity, not ‘custom’.
February 25, 2015 at 10:10 am #33790Hi @yurio,
Thank you my friend!
- AuthorReplies
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.