logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
yavuzs  
#1 Posted : Wednesday, September 12, 2018 7:42:08 AM(UTC)
yavuzs

Rank: Newbie

Groups: Registered
Joined: 8/13/2018(UTC)
Posts: 6
Turkey
Location: Ankara

Thanks: 2 times
Hi,

We've started to use SealReport with PostgreSQL.
We are stuck at displaying total price per month.

For example we have sales table.
Structure:
sale
id int,
...
sale_ts timestamp,
price double precision


Trying to do, total price per month
In model we are casting date_part('month',sale_ts) with custom sql.


Example chart:
Month Sum(price)
1 10776,53
2 13421,65
...

If I use enum, it uses enum for order too. And this is same if I use join on database
Month Sum(price)
February 13421,65
January 10776,53
...

What I want to see
Month Sum(price)
January 10776,53
February 13421,65
...

So I just want to split display values and order values.
I would be happy if someone help me.

epf  
#2 Posted : Wednesday, September 12, 2018 8:40:17 AM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
This is a classic issue.
You have an option to sort the enum by yourself....
Select your enum and set 'Use defined position to sort in reports' to true.
Set your enum as not dynamic.
Then edit your enum values list and sort it with the Ip and Bottow Arrows.

Good luck.
thanks 1 user thanked epf for this useful post.
yavuzs on 9/13/2018(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.