To all,
I have several queries built in A2K that can take different values for Time. I did this so that a user could choose to view reports in the following 3 categories:
Current Week
Month to Date
Year to Date
I obviously don't want to have 3 sets of the same queries. Rather, I would like to adjust the Time criteria directly in the SQL according to the report chosen. I have experimented with pulling in the CommandText, using Replace to change the Where statement and then updating the Command property on the catalog object. But, this is not as flexible as I need. Once I change the criteria, the Replace function will fail because I will no longer know what it is. I want to avoid nasty search functions to extract the text out of the Where statement.
So, is there any way to make a change to the Time criteria by adjusting a parameter?
Thanks,
Randy
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
I have several queries built in A2K that can take different values for Time. I did this so that a user could choose to view reports in the following 3 categories:
Current Week
Month to Date
Year to Date
I obviously don't want to have 3 sets of the same queries. Rather, I would like to adjust the Time criteria directly in the SQL according to the report chosen. I have experimented with pulling in the CommandText, using Replace to change the Where statement and then updating the Command property on the catalog object. But, this is not as flexible as I need. Once I change the criteria, the Replace function will fail because I will no longer know what it is. I want to avoid nasty search functions to extract the text out of the Where statement.
So, is there any way to make a change to the Time criteria by adjusting a parameter?
Thanks,
Randy
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)