Joined: 05 Mar 2013
Online Status: Offline
Posts: 10
Topic: Using Parameters in SQL expressions Posted: 28 Mar 2013 at 8:58am
Hi all.
I am trying to write an SQL expression that uses date parameters that are used for the data on the main report.
A subreport will not work because my report is grouped and I need the values returned to be based on the group in the group footer section.
So..I tried this..
(Select sum(pledge_amt) from aa_pledge_detail Where
pledge_date >= '{?DateMin}’ and pledge_date <= '{?DateHigh}' and designation_key = "AA_GIFT_DETAIL.DESIGNATION_KEY")
I get a lovely error saying that my date year can not be 0. I tried added the to_date function to my parameters but I get the same error.
UPDATE So I guess I can't use parameters in SQL expressions. So I tried a command object which does what I want it too. but when I run the report I have to enter the date parameters twice. Once for the main report and again for the command object. Is there anyway around this?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum