Page 1 of 1
min and max functions in reports
Posted: Thu 14 Mar 2013 19:34
by fattbass
Hello everybody !
i want to do simple things in report, but ...
i have db, table, rows, columns, data etc , for example let`s take column_A and column_B
i want to have 3 fields,
x = max(column_A) and y = min(column_B) and z = x - y
in short i want subtract result ( ( max(column_A) - min(column_B) ) and put in another field (number 3). I hope you all understand my wishes
As far i known with calculated fields it cannot be done, because of syntax ? Because can`t subtract calculatedfield1-calculatedfield2 , and calculatedfield even can not show max and min values
Best Regards.
Thanks in advance.
Re: min and max functions in reports
Posted: Fri 15 Mar 2013 12:48
by alexa
This can be achieved as follows:
1. Select 'File -> New -> Data Report' from the main menu. The 'Data Report Wizard' window opens.
2. Click 'Next'.
3. Select the 'Custom Query' radio button.
4. Click 'Next'.
5. Insert the query below and complete the wizard:
SELECT MAX(column_A) as x, MIN(column_B) AS y, ( max(column_A) - min(column_B)) AS z FROM table
Re: min and max functions in reports
Posted: Fri 15 Mar 2013 15:22
by fattbass
alexa wrote:This can be achieved as follows:
1. Select 'File -> New -> Data Report' from the main menu. The 'Data Report Wizard' window opens.
2. Click 'Next'.
3. Select the 'Custom Query' radio button.
4. Click 'Next'.
5. Insert the query below and complete the wizard:
SELECT MAX(column_A) as x, MIN(column_B) AS y, ( max(column_A) - min(column_B)) AS z FROM table
thank you, it is working
is it possible to export report using command line ? for example, i make report and in command line i export that report, like from user GUI. I can not find anything about reports in command line in documentation.
Re: min and max functions in reports
Posted: Mon 18 Mar 2013 09:50
by alexa
This can be performed with the beta version of dbForge Studio for MySQL:
http://www.devart.com/dbforge/mysql/stu ... nload.html
Here is an example of the command line string:
dbforgemysql.com /datareport /reportfile:"D:\Report1.rdb" /format:PDF /result folder:"d:\"
You can find more examples by typing the following string in the command line prompt:
dbforgemysql.com /datareport /?
Re: min and max functions in reports
Posted: Mon 18 Mar 2013 13:51
by fattbass
alexa wrote:This can be performed with the beta version of dbForge Studio for MySQL:
http://www.devart.com/dbforge/mysql/stu ... nload.html
Here is an example of the command line string:
dbforgemysql.com /datareport /reportfile:"D:\Report1.rdb" /format:PDF /result folder:"d:\"
You can find more examples by typing the following string in the command line prompt:
dbforgemysql.com /datareport /?
big thank you ! you`re my GOD !
as far as i understand exporting reports with command line is only possible in BETA, and in 5.0 version it can not be done ?
Re: min and max functions in reports
Posted: Mon 18 Mar 2013 15:05
by alexa
You are right. Such functionality is present only in the new beta version 6.0.
Re: min and max functions in reports
Posted: Mon 18 Mar 2013 15:09
by fattbass
alexa wrote:You are right. Such functionality is present only in the new beta version 6.0.
thank you, no more questions
