Why is it summing? =SUM(Fields!ID.Value)

Jennacat

Registered User.
Local time
Today, 06:28
Joined
Mar 19, 2008
Messages
58
Why in the world is SSRS trying to Sum my Id field? Am I missing something? I know how to link a subreport to the main report now, but I need to do it on the ID field and it keeps wanting to sum that field and then it gets mad because it can't link! I'm thinking SSRS may not be the solution I'm looking for................ Any ideas on what I'm doing wrong? Again, I am VERY inexperienced at this and I need to learn it quickly. Thanks!
 
Is there "group by" in your query or report?
 
Nope. No grouping in that field. I have it grouped by Product Code and then Test type. The ID field is what links the two tables. what I have now is a main report (Product code, Test Type, Specie & Duration). I also have a subrpt with the results and values on it. I want to add the subrpt to the main report. I guess to link them together you have to use a parameter and when I do this (rt click on the subrpt, parameters) and then scroll through the list it lists the ID field as:
=Sum(Fields!tblAquaticResults_ID.value). Then when I preview my report I get an error saying the subrpt can't be shown. I Know it has to do with how I have things set up. I am so clueless but I really don't have the time to sit and putz with this any more. I need to find a solution to our reporting problem. Any suggestions on how to set it up? Thanks! Oh, and here is a screenshot of what I have. It's not pretty.
 

Attachments

  • screenshotSSRS1.JPG
    screenshotSSRS1.JPG
    70.3 KB · Views: 263
Yeah. What would it being a shared source have to do with it trying to sum my ID's and values? I tried creating a new report (same datasource) with no parameters and it still wanted to sum the ID's and values.
 
Have you created a column on your main report which has contains the ID field? You should be dragging your subreport into this field and then they should link properly.

If this isn't the problem then please post the query text for both subreport and main report.

p.s. does your sub report run on its own?
 
Ok, both reports work fine on their own. I'm not sure I understand you right though. I inserted the ID field into it's own column and then dragged the sbrpt into the same column. I was able to choose Fields!ID.value, but when I ran the report it caused an error - An error occured during local report processing. An internal error occured on the report server. When I remove the sbrpt the main rpt works fine again. The queries are just plain select queries:

select * from tblAquaticRptInfo for the main report and select * from tblAquaticResults for the sbrpt.
 
Hi again

Ok we seem to be getting somewhere now :)

I'm glad you can now see the correct parameter, but your query text is incorrect for the subreport, you have no parameter in your query text.

Your subreport query should look like this:



select * from tblAquaticResults where id = @id
 
Last edited:
Ok................I feel like we're making progress. But, I'm using an ODBC (MS ACCESS) and it doesn't like named parameters. I got around this by typing Where Id = ?. The only thing is, I have no idea what any of the Id's are for the studies. Access made them up and are not shown anythere except in the tables themselves. Is this going to be a problem? Also, when I try to run the main report with the subreport in it I get the same error as last time. THank you so much for your help!
 
Still no luck with the subreports. The two reports work fine when ran individually, but when I insert the subreport it gives me an error. I must be missing something, but I have no idea what............................
 
Hmm if the parameters are all linked up properly, then I really dont know what the problem is.

Have a look through this article, which will tell you how to look through the log files and get a proper error message

http://msdn.microsoft.com/en-us/library/ms165307.aspx

So when the sub-report runs, it prompts you for parameter?
 
Yep, when I preview my subreport it asks for a parameter. I changed it so that it will accept a blank value and nothing comes up. But if I put in a number, it works. The only problem is that I have NO IDEA what the ID values are for the studies. Access figures those out and there is no need for anybody to know them. The ID field just links the two tables. I looked at that website, but I didn't see the error message I was getting:

"An error occured during local report processing. An internal error occured on the report server. See error log for more details."

plus, when I look at my error list there's nothing to see. It's blank. I'm begining to think SSRS is not the way to go for our reports.....................
 
I'm still not getting anywhere with these dang reports. Is there anybody out there that has worked with SSRS and an Access DB? I just can't seem to figure out what I'm doing wrong................
 
What error list are you looking at? I cant believe there is nothing in it.....

maybe you need to service pack your Visual Studio? what service pack does it have now?
 
Last edited:
I have no idea. I bought the thing about a month ago so it's new. How do I find out what service pack I have, if any? I was looking at the Error List and it was empty. I found the error logs, but have no idea how to read them.
 
Hi Jennacat!

I am a c# developer who was "given" an SSRS project and have learned quite a bit so far. One thing that you might want to look at... When you put your sub-report into the main report, you can see that your sub-report is just a grey box. If you look at the properties of that sub-report, there is a property called "Merge Transactions" which is set to false by default. Make sure that is set to "True" to get the data to merge. Also, about the SUM issue... Let it put whatever it wants for that value. Once you have something in the value that looks like =Sum(Fields!someFieldName.value, "dataSetName"), you can just delete all that extra crap so that it reads =Fields!someFieldName.value. It does that to me too and that's how I fix that. Hope this helps! =)
 

Users who are viewing this thread

Back
Top Bottom