Hi Richard, we implemented something exactly like this. Take a look https://projects.optaros.com/trac/oforge/report/9
The code is in a plugin that offers support for multiple projects. http://code.optaros.com/trac/oforge/browser/trunk/plugins/oforgeplugin If you don't need all the functionality provided by this plugin you can take only the code that offers suport for variables. ReportVariableFiller(a request filter) - http://code.optaros.com/trac/oforge/browser/trunk/plugins/oforgeplugin/oforge/web_ui.py#L58 ReportVariableTemplateInjecter( a stream filter) - http://code.optaros.com/trac/oforge/browser/trunk/plugins/oforgeplugin/oforge/web_ui.py#L124 a template - http://code.optaros.com/trac/oforge/browser/trunk/plugins/oforgeplugin/oforge/templates/query-variables.html On Thu, May 29, 2008 at 11:36 AM, Christian Boos <[EMAIL PROTECTED]> wrote: > > Richard Liao wrote: >> Hi, >> >> To view a report for dynamic variables, for example: >> SELECT id AS ticket,summary FROM ticket WHERE priority=$PRIORITY >> >> We must define it as an argument in the report URL. >> http://trac.edgewall.org/reports/14?PRIORITY=high >> >> But ordinary users will not modify report URL as above. >> Is there an easy way to view a report with dynamic variables for them? >> > > See http://trac.edgewall.org/ticket/7135 >> If not, I think we should provide a plugin to do that: >> 1. Listen all report requests, search the report query string that >> contains dynamic variables. >> 2. If find, return a page that let user set the dynamic variables instead. >> 3. After user set all required dynamic variables, send report URL >> with these values. >> >> Is that feasible? >> > > That can be done on the report page itself, and shouldn't require a plugin. > > -- Christian > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
