I have a report in crystal that takes over 15 minutes to run so i need to create a stored procedure. What takes up the time is I have week to date data in the main report then in two sub reports, I have month to date and year to date data. The following are the formulas in Report Select Expert
week to date - Date({sp_WTD_MTD_YTD_AllProducts.Post_Date})
in Date(Year({?EndDate}),Month({?
EndDate}),01) to {?EndDate}
month to date - Date({Transaction_History.Post_Date}) in
Date(Year({?EndDate}),Month({?EndDate}),01)
to {?EndDate}
year to date - date({Transaction_History.Post_Date}) in date
(year({?EndDate}),01,01) to {?EndDate}
to clarify: the user is prompted and puts in a month start and end date ie, 7/1/02 to 7/31/02.
the week to date days take the year of the end data and the month of the end date and always give me the first day of that month through the last date the user put in,
the month to date is in the 1st sub report and looks at the end date the same way
the year to date is the 2nd sub reports and is saying always give me january 1 of what ever year the user puts in to the last date the user puts in.
I do not know how to put that in a stored procedure.
Any help would be appreciated.
week to date - Date({sp_WTD_MTD_YTD_AllProducts.Post_Date})
in Date(Year({?EndDate}),Month({?
EndDate}),01) to {?EndDate}
month to date - Date({Transaction_History.Post_Date}) in
Date(Year({?EndDate}),Month({?EndDate}),01)
to {?EndDate}
year to date - date({Transaction_History.Post_Date}) in date
(year({?EndDate}),01,01) to {?EndDate}
to clarify: the user is prompted and puts in a month start and end date ie, 7/1/02 to 7/31/02.
the week to date days take the year of the end data and the month of the end date and always give me the first day of that month through the last date the user put in,
the month to date is in the 1st sub report and looks at the end date the same way
the year to date is the 2nd sub reports and is saying always give me january 1 of what ever year the user puts in to the last date the user puts in.
I do not know how to put that in a stored procedure.
Any help would be appreciated.