gnue-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUe-dev] Proposal for specifying 'Sort-Order' in datasources


From: Jason Cater
Subject: Re: [GNUe-dev] Proposal for specifying 'Sort-Order' in datasources
Date: Mon, 3 Jan 2005 09:08:23 -0600
User-agent: KMail/1.7.1

Johannes, 

> Hi,
>
> I had a look at the current way to specify a sort-order for a given
> datasource which is done by defining an 'order_by'-string
> (comma-separated for multiple fields).
>
> Example:
> <datasource name="dtsFoo" table="foo" order_by="foo,bar" />
> <datasource name="dtsBar" table="bar" order_by="foo desc,bar" />

The order_by string has always been considered a temporary solution. We've 
wanted to add a <sorting> tag for a while, but haven't gotten around to it 
yet. 

Actually, this should also tie into GNUe-Report's support of "Sort Options". 
From my Reports dev notes: 

--------------

Sort Options

Many different "reports" are identical except in the manner in which they are 
sorted. GNUe-Reports can consolidate such reports into a single report by 
creating "sort options". Basically, sort options are "where clauses" that can 
be selected by the report client. Take for example: 

  <sortoptions>
      <sortoption id="byVendor" default="yes" name="Vendor ID Order">
          <sortcolumn>vendor</sortcolumn>
      </sortoption>
      <sortoption id="byName" name="Vendor Name Order">
          <sortcolumn>name</sortcolumn>
          <sortcolumn>vendor</sortcolumn>
      </sortoption>
      <sortoption id="byBalance" name="Balance Order">
          <sortcolumn>balance</sortcolumn>
          <sortcolumn>vendor</sortcolumn>
      </sortoption>
  </sortoptions>


This basically says that the report can be sorted three different ways, in 
"Vendor ID Order", "Vendor Name Order", or "Balance Order". The selected Sort 
Option will be combined with the query (explained below) to form the 
underlying "select" statement.
--------------

The above sortoption is from my original notes, and doesn't look like it 
supports multiple datasources. But I still need support for it considered 
when doing the <sorting> tag. 

To clarify, sort options would allow you do run a report as: 

  gnue-reports --sort-option byVendor myreport.grd
  gnue-reports --sort-option byBalance myreport.grd
  gnue-reports --sort-option byName myreport.grd



<snip>

> Ok, that's it (I think :). Please feel free to give me some feedback.

I think I'm ok with all the other suggestions in the rest of the email. It 
makes sense. 

> Thanks,
> Johannes

-- 
Jason Cater
GNU Enterprise




reply via email to

[Prev in Thread] Current Thread [Next in Thread]