November 8, 2013 at 8:47 am
Hi,
Not sure where to put this...
Im working in SQL Report Builder (sorry dont know which version) and am having trouble with calculated fields.
Ive got 2 datasets - one with some tenancy information in it (DataSet1) and the other with address data in it (DataSet2)
Ive got a calculated field that ive called "DaysVoid" which is essentially one date subtracted by another.
I want to work out the total sum of all of the "DaysVoid" so have set up another calculated field which is called "TotalDaysVoid" //=sum(DaysVoid)\\ but when I run my query, I get the following error;
//The Value expression for the textrun ‘Textbox34.Paragraphs[0].TextRuns[0]’ contains an error: [BC30451] Name 'DaysVoid' is not declared.\\
Can anybody help?
November 10, 2013 at 8:04 pm
Try using the following expression in textbo34:
=sum(Fields!DaysVoid)
November 11, 2013 at 3:52 am
Thanks for your help - it worked! However....
It now brings back the value (in this case 111) as a weird format;
111.00:00:00
Ive formatted the number right, and the globalization settings are en-GB... is there something I have missed?
Thanks Again
November 11, 2013 at 5:13 am
is the text box property set to date time ?
November 18, 2013 at 7:58 am
Hi.
No, it is set to Number.
Also, the answer to my first question that I said it worked - actually didnt.
November 18, 2013 at 8:04 am
Possibly try CInt(sum(Fields!DaysVoid, "dataset_name") ) - assuming daysvoid is calculated as part of the query ?
November 18, 2013 at 8:06 am
No, it isnt - I think thats what the problem is.
In my dataset, i have "Start Date" and "End Date"
DaysVoid is a calculation of "End Date" subtract "Start Date"
November 18, 2013 at 8:29 am
try
DateDiff("dd",Fields!StartDate.Value,Fields!StartDate.Value) to get the days void
November 18, 2013 at 8:30 am
sorry that should read
DateDiff("dd",Fields!StartDate.Value,Fields!ENDDate.Value) to get the days void
November 18, 2013 at 8:33 am
Nope... afraid not. Just get #error
November 19, 2013 at 8:50 am
Hi Mark,
We need more information in order to help you. Will you post your query and also a print screen of your dataset?
Thanks,
Sarah
November 20, 2013 at 2:46 am
Here we go...
November 20, 2013 at 2:46 am
Oh.. scrap that - I have to upload the images to web prior to posting them on here... I'll have to do that at home!
Viewing 13 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic. Login to reply