SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


stacked columns in a report table?


stacked columns in a report table?

Author
Message
SQLDCH
SQLDCH
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2216 Visits: 3399
Is there a way to "stack" columns in a table on a report?

My example would be getting some info out of [msdb].[dbo].[sysjobhistory]. I'd like to see the name of the job (and _id), the step_id, step_name, run_date, run_time and run_duration on one "row", with the message on the next (see attached).

I can't create different datasets as there would be multiple rows per job_id and I'd like them to "meld".


select
j.name
,j.job_id
,jh.step_id
,jh.step_name
,jh.run_date
,jh.run_time
,jh.run_duration
,jh.message
from
sysjobs j inner join sysjobhistory jh on j.job_id = jh.job_id
where
jh.job_id = '<some job id>'



----------------------------------------------------------------------------
Sacramento SQL Server users group - http://sac.sqlpass.org
Follow me on Twitter - @SQLDCH
----------------------------------------------------------------------------

Yeah, well...The Dude abides.
Attachments
Untitled.png (7 views, 6.00 KB)
Mohamed I.
Mohamed I.
SSC-Enthusiastic
SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)

Group: General Forum Members
Points: 192 Visits: 348
Hi

Maybe you can create 2 new detail lines
Then join the text box on the first detail line to put the static text "Message"
and then do the same with the second detail line and put the field Message on it

w00t !!!GOOGLE IS YOUR BEST FRIEND!!! w00t
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search