January 22, 2010 at 8:59 am
Task comments are stored
Job No comment
1 Comment1
1 Comment2
1 Comment3
2 Comment1
3 Comment1
3 Comment1
4 Comment1
My report layout
Job No Description Some other information .........
Task Comments
My problem is that a job with more than one comment is creating more than one row in the report.
1 all the information
Comment1
1 all the same information as above
Comment2
How can I gather the comments and return them as one record so that the duplication does not happen.
I tired grouping but the only choice is Job Comment which creates unique individual records which is what is causing the problem in the first place
Can someone help. Would a procedure with a cursor work? Can someone guide me thru that I am just learnign T-SQL
Thanks
Barb
January 22, 2010 at 9:16 am
You could try putting the data into a table and grouping the table by job number.
January 22, 2010 at 10:01 am
Do you mean I would create a temporary table. The information is in the Task Comments Table how would I tell it to form one record by job number in the temp table. When I run a query
Select job, comments from task table
I cannot group by job because it errors saying comments also have to be grouped and then the group fails. Sorry if I am sounding dumb but I just can seem to get my arms around this concept
Thanks
January 22, 2010 at 10:04 am
Sorry I should be clearer. leave the query as it is but display the data in a reporting services table, you can then use the job number a s a group and display the coments records individualy, enabling you to display common data only once per group. hope this makes it a bit clearer
January 22, 2010 at 10:09 am
I think I got it. I will do that and get back to you if I need additional assistance. Thank you so much.
Barb
January 22, 2010 at 10:24 am
OK great I now have the recored all in one place. How then do I display them together with the basic record
I need:-)
Job information detail line
Job task comments lines
Job information detail line
Job task comments lines
Job information detail line
Job task comments lines
What I have is :crazy:
Job information detail line
Job information detail line
Job information detail line
Job task comments lines
Job task comments lines
Job task comments lines
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply