Skip to content
Advertisement

DB2 Crystal Reports Declare/Set Variable

I am using Crystal Reports to pull data from DB2 10.5. I need to calculate a specific date and then use this calculated date as a filter. Here is an example of how I am currently achieving this.

This way works but is extremely slow( I am assuming that the DATES.FIRST_MONDAY_OF_CURRENT_MONTH field is being recalculated for every row in the table I am filtering).

When I simply remove the use of the DATES.FIRST_MONDAY_OF_CURRENT_MONTH and put in a specific date, the code runs very quickly.

Is there a way I can simply declare a variable that holds the value of the calculated date without using the with statement?

Advertisement

Answer

Is there a way I can simply declare a variable that holds the value of the calculated date without using the with statement?

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement