Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating calculated fields

Status
Not open for further replies.

swhitten

Technical User
Sep 3, 2002
191
0
0
US
I'm really new to SRS and trying to grasp all the concepts here. I come from a strong Crystal background, so I'm trying to translate Crystal concepts to SRS and failing in some cases :(

Here's my current question. I want to create a calculated field so I can do other calculations on it. I don't seem to be able to calculations on expressions/text boxes.

First, I right click on the dataset on the left hand side of the Visual Studio window. Then I Add and add a calculated field. Let's say =min(Fields!CURRCOST.Value) to return the minimum cost. Then I put that on my report, and the rpeort won't run.

I'm trying to understand why not. I THINK - and this is in non-programmer language - that it can't do a calculation on an item in the dataset because it's a field in the dataset itself. Or maybe it's because it needs to do this calculation on every row in the dataset? I need to understand.


Alternatively, I tried doing that in a cell in the layout window. But then it is just a textbox, and I cannot do further calculations on it - example - subtotaling on it.


Thanks in advance if you can shed any light on this to help a non-progrmmer understand.
 
How you do it depends on what you need to do with the report

You are calculating a minimum value...is that to display as part of a summary or at the bottom of a list?

What further calc would you want to do on it and where does the calc need to be in the report?

as a btw, you can refer specifically to controls on the report using the ReportItems collection e.g.

=ReportItems!Textbox1.value

will return the value that is in "Textbox1"....




Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Geoff,
Thanks for your reply and help. I discovered the reportitems!field,value last night. Do you have a recommendation for a good book or website that will educate a new user? I obviously need to learn to write a little code to work successfully with SRS. I finally got my report running last night, but I had to do things in the data query window that I've never done before . . . Just faked my way through it.

Thanks again, and any resources you can direct me to will be appreciated.
 
if you are on YouTube - there are some videos on there... some simple and some a bit more advanced...

do a google search on free reporting services training and there are a boat load. Depends on what kind of learning is best for you... I am more of a visual person.

this place only had one (for example) but it was ok
 
Thanks jymm. Did you see my other post? I got my report working :) !!!!!!!
 
I can highly recommend the "Hitchhiker's guide to SQL Server Reporting Services" (Blackburn & Vaughn)

That's what I used to teach myself about it - loads of handy hints and tips

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Geoff,

I only see the recommended book for SQL 2000. Is it basic/similar enough that I would benefit from it, even though I am working in SQL 2005? I know SRS is rapidly evolving.

Thanks!
 
one more small btw - when I was starting out I found several training CD/DVD classes on Ebay for 'cheap'... ok, they had sold them to me, but it was a copy of a legit program... and I could not bring myself to keeping them... BUT then found out that company put them on Youtube anyway...


some other tricks were invaluable, but then I am a visual person and some of the books were just not doing it for me...
 
The book is for 2000 but the basics havn;t changed much - it won;t include how to use the newer features such as multi select dropdowns etc but is a very good basic how to guide...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top