January 22, 2009 at 9:13 am
I posted this topic in the wrong area yesterday so I am reposting here. I am growing extremely frustrated with myself for not being able to figure this out, hopefully someone can help.
I am currently working on a very large report for my company. I can not figure out how to loop through the data and show each row until there is no more related to that particular strategy number. For example:
Sample Table
KeyNum Strategy Strategy Cost
1 Do This Cost $0
1 Do That Cost $5
1 Do Something Cost $10
2 Do Something Else Cost $50
3 Do Testing Cost $5
3 Do Implementation Cost $0
I need to have the report display each strategy individually for the key number given and its corresponding info. Example of needed report if the Key Num= 1:
Strategy Cost
Do This Cost $0
Do That Cost $5
Do Something Cost $10
Total : $15
Instead I'm getting only the first line of yet I'm getting the correct total cost. Example:
Strategy Info
Do This Cost $0
Total: $15
Is there any way to display each row related or am I just making myself go crazy chasing something that doesn't exist.
Any help would be greatly appreciated. Thanks in advance.
January 22, 2009 at 9:26 am
Not sure why you're looping through the data... if you could be more clear on what you are doing perhaps we may be of a bit more help...
What I'd do is query the data to get you sample data.
In the report I'd add a Martix and have it show something like
KeyNum, strategy, Cost
Group bY Key num and add a total line to cost...
-Luke.
January 22, 2009 at 9:57 am
I attached a .pdf of the actually report I have, If you take a look you should notice under personnel amount needed the total is correct with $71,800.00 however there is only one personnel listed when in fact there is another one for the estimated salary of $40,9000.00. I hope this clears things up and just for your information there are some situations in which there are up to 9 different ones. How do I list each one, I can obviously get the correct total to show...
January 22, 2009 at 10:55 am
Is this something you are actually doing with Reporting Services or is this some other type of front end? It looks like you are not providing any space/fields etc, for additional records to be displayed. You'll need to code that portion of the form to be dynamic allowing for additional rows of data to be displayed.
January 22, 2009 at 11:12 am
I am designing them using Visual Studio 2005 for Reporting Services...my problem is when I add another field I don't know what the syntax would be to show the next field I can get it to display the last one and the first one only...
January 22, 2009 at 11:19 am
January 22, 2009 at 11:33 am
You are right I am using a simple textbox, sorry I probably should have stated that before. However, if I try to add a matrix or a listbox to the table it comes back with an error stating that you can not add a matrix or listbox to the table detail row. Also what expression would be used to display each, the expression I am currently using is simply:
Fields!sFieldName.Value
or to show the last
Last(Fields!sFieldName.Value)...
January 22, 2009 at 12:06 pm
OK so this is all in one big table with a mess of individual text boxes right?
The error you are getting is because you can't add a list to a detail row of a table.
you should however be able add a subreport. Basically you create a very simple report that contains the info you need in the body. Then you place a subreport in your report and point it at your newly created subreport.
More than likely though, the easiest way to complete this would be to break up your report into individual segments...
I'd probably start with Unit/Prog Name down through u/p goal and perhaps objective 2 as 1 list, depending on how many objectives you list per report if it's more than 1 it needs to be it's own section.
Then Immediately below that I'd add another list/table whatever for Number/Strategies etc, again if there's more than one if not, it could perhaps be put in the above group.
Below that would be a separate table for Personnel Amount Needed and the details of that information. You can use a total line to add you total up.
Below that would be another table for you other costs
Below that another for Equipment needed and so forth.
You could break up the report so that you only have information in the datasets that you need to complete each part.
-Luke.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply