Showing results for 
Search instead for 
Did you mean: 

Diference between SQL and Expert Register Assistance

Former Member
0 Kudos

Hi experts,

I want to performance my reports.

I have a "Command" with SQL. ( select * from table)

And I have a Formula in the Expert Register Assistance that is :

{Comando.ANYO_CASO} = {?Año de Selección} or

{Comando.ANYO_CASO} = {?Año de Selección}-1 or

{Comando.ANYO_CASO} = {?Año de Selección}-2 or

{Comando.ANYO_CIERRE} = {?Año de Selección} or

{Comando.ANYO_CIERRE} = {?Año de Selección}-1 or

{Comando.ANYO_CIERRE} = {?Año de Selección}-2 or

What is the diference of the performance to put the Filter in the SQL or in the Expert Selection???? Because all the report is doing ...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Because you are using a command adding filters to the select expert will not get parsed to the Database.

Go to Show SQl and you will see only the command.

Thus all data from the command is brought back and then filtered locally in report and can be slow if using a large recordset.

Either add your filters to the command or create a command with parameters then any additional user filters will get parsed to database.


Former Member
0 Kudos

Ok. thank you very much.

the problem is that I have a user entry parameters in the report: Year and Month.

If I change the expert selection and I put the filters in the SQL Command, I have to change all the formulas in the report because all the formula reference the Year and the Month.

Is there a way to connect the paramteres of the SQL command and the parameters of the report??? It will be super!

do you understand me?

Pd: May be in the expert selection I have to reference the YEAR = SQL Command YEAR?

Edited by: Markus C. on Jul 28, 2010 2:12 PM

Former Member
0 Kudos

Hello Markus,

When you create any parameter in SQL command, the same parameter is also visble under Parameter Fields in the crystal report.

E.g If you create your SQL command as "select * from USA_TABLE where USA_CLIENT_ID={?client_id}" then you will find that after running the report, client_id is considered as a report parameter under Parameter fields in the report.


Chinmay Athavale

Answers (0)