Sorting dbcross by grandtotal

Is it possible to sort a dbcross according to the grandtotal column?
Im using FR 3.24

Greetinx,

Jos

Comments

  • gpigpi
    edited 7:02PM
    No
  • edited 7:02PM
    If your dbcross is based on any database try this idea:

    Let the table MyTable contains data like this

    State, Month, NB (Newborn babies)

    AL, 1, 1000
    AL, 2, 1300
    AL, 3, 999
    NY, 1, 300
    NY, 2, 340
    NY, 3, 350
    CA, 2, 300
    CA, 3, 340

    Here is a query that is used in dbcross.
    I mean - rows show states, columns show newborn babies in months, grand total shows all newborn babies in the state

    select T.State, T.month, T.nb,
    (select sum(nb) from MyTable T2 where T2.State = T.State) as MyTotal
    from MyTable T
    order by MyTotal

    Use this query to construct dbcross with State, Month and NB only. Do not use MyTotal

    The last thing to do is to set sorting of State in dbcross to None :-)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.