Hi,
I am new to Command object usage.
I am using Crystal ver 10 and SQL Server database. I am having a report where I display values for a club for range of months selected, year selected and club selected. These are all parameters. I also need to display a summarized total of all clubs and for the club. For the club, I used summations. For 'ALL clubs' I thought of using SQL command object v/s using a subreport.
How do I code to use the parameters selected in the report for the SQL command. For eg.
select sum(estimated_ad_cost) as sum_estimated_cost from clubsummary a where a.club_id = (how do I code it here) and a.month = (???) and a.year = (???). I tried to use {?year} etc but I keep getting syntax error. And do I need linking the table with this command object?
Thanks!
I am new to Command object usage.
I am using Crystal ver 10 and SQL Server database. I am having a report where I display values for a club for range of months selected, year selected and club selected. These are all parameters. I also need to display a summarized total of all clubs and for the club. For the club, I used summations. For 'ALL clubs' I thought of using SQL command object v/s using a subreport.
How do I code to use the parameters selected in the report for the SQL command. For eg.
select sum(estimated_ad_cost) as sum_estimated_cost from clubsummary a where a.club_id = (how do I code it here) and a.month = (???) and a.year = (???). I tried to use {?year} etc but I keep getting syntax error. And do I need linking the table with this command object?
Thanks!