Enhancement - limit

- Allow command line limit overrides.
This commit is contained in:
Paul Beckingham 2009-06-12 00:05:19 -04:00
parent d898f3f509
commit bc8aba26a9

View file

@ -454,16 +454,15 @@ std::string handleCustomReport (const std::string& report)
// Limit the number of rows according to the report definition. // Limit the number of rows according to the report definition.
int maximum = context.config.get (std::string ("report.") + report + ".limit", (int)0); int maximum = context.config.get (std::string ("report.") + report + ".limit", (int)0);
/*
// If the custom report has a defined limit, then allow an override, which // If the custom report has a defined limit, then allow an override, which
// will show up as a single ID sequence. // will show up as a single ID sequence.
// If the custom report has a defined limit, then allow a numeric override.
// This is an integer specified on the command line (task oldest 4), which is
// parsed as an ID.
if (context.config.get (std::string ("report.") + report + ".limit", (int)0) != 0) if (context.config.get (std::string ("report.") + report + ".limit", (int)0) != 0)
{ if (context.sequence.size () == 1)
std::vector <int> sequence = task.getAllIds (); maximum = context.sequence[0];
if (sequence.size () == 1)
maximum = sequence[0];
}
*/
std::stringstream out; std::stringstream out;
if (table.rowCount ()) if (table.rowCount ())