Merging Cells (horizontally) Depending On The Row
Apr 14, 2008
Is it possible to merge cells within several columns depending on the row number?
e.g.
colA colB colC colD
1 x a b c
2 y -------------------------
3 z -------------------------
for row # 2, #3, colB colC colD are merged.
View 7 Replies
ADVERTISEMENT
Feb 11, 2011
Is that possible to merge adjacent cells conditionally in SSRS 2008?
For Example
Col A ColB
Col C ColD ColE ColF
If condtion is true
ColC and Col D to be under Col A and ColE and Colf to be under Col B
Or Col C to be under Col ColA and Cold to ColF to be undercol B
View 6 Replies
View Related
Oct 5, 2015
I am new in SSRS 2012.I have created a rdl,in this rdl, am having a row group.In this report, other two columns has multiple rows and some rows having data and some other rows doesn't have data.So I want to create rows when the row of that particular column has any data or need to merge vertically with the row having data and row don't have data of particular column along with the Common Row Group Data
View 5 Replies
View Related
Feb 1, 2007
I have a report with a column which contains either a string such as "N/A" or a number such as 12. A user exports the report to Excel. In Excel the numbers are formatted as text.
I already tried to set the value as CDbl which returns error for the cells containing a string.
The requirement is to export the column to Excel with the numbers formatted as numbers and the strings such as "N/A' in the same column as string.
Any suggestions?
View 1 Replies
View Related
Feb 22, 2008
Is there a way to display my querry horizontally?
View 2 Replies
View Related
Feb 7, 2008
In sql server, multiple instances of data default to a row display or vertical. I need a set of data in sql2005 to view horizontally so I can us it in a crystal report. Here is my issue.
gift.HonorKey, gift.HonorName, gift.HonorId
1211 Smith 1222
1244 Owens 4155
I need for the data to read like this:
HonorKey1, HonorKey2, HonorName1, HonorName2, HonorId1, Honorid2
1211 1244 Smith Owens 1222 4155
the table name is gift_view
I would like to be able to create a view in sql analyzer, then save as an SQL View
My direct email is jackfam@comcast.net
View 3 Replies
View Related
Feb 6, 2003
I have a table where the ID column is a forign key as shown below:
select * from Joel_Table
IDID_Value
1One
2Two
3Three
1Four
2Five
3Six
1Seven
2Eight
3Nine
1Ten
Now, I order the result set based on the ID column:
select ID, ID_Value from Joel_Table
group by ID, ID_Value
order by ID, ID_Value
IDID_Value
1Four
1One
1Seven
1Ten
2Eight
2Five
2Two
3Nine
3Six
3Three
I want though to order the result set as one ID per row:
ID ID_Value ID_Value ID_Value ID_Value
1 Four One SevenTen
2 Eight Five Two
3 Nine Six Three
What is the best way of accomplishing this task?
Thank you much in advance -
View 2 Replies
View Related
Apr 1, 2014
I would like for each of the queries to have all of the selected fields shown horizontally in one table.
For example,
Commercial Created | Commercial Closed | Commercial UserId | Residential Created | Residential Closed | Residential UserId | Other Created | Other Closed | Other UserId.
Here is what I have now and it is displaying the fields as I would like them to. In the code below, each Views is acting as an individual table and then joined together to make another table when the query is executed.
WITH t1 AS (
SELECT vSalesReportProcessDetail.[RequestId]
,vSalesReportProcessDetail.Process
,vSalesReportProcessDetail.Entered
,vSalesReportProcessDetail.Closed
/*ROW_NUMBER() over (ORDER BY vSalesReportProcessDetail.[RequestId]) rn*/
FROM[Sales].[dbo].[vSalesReportProcessDetail]
WHERE Process = 'Commercial' ),
[code]....
View 1 Replies
View Related
Nov 11, 2005
My project is to automate testing of Stored Proceduresof type SELECT (at least for now).I want to create a table where each stored procedure'sinput parameter values are entered and in another tablethe expected result value(s) are entered when executedagainst a sample database containing manually enteredand verified data.My current problem is that the stored procedures' inputparameters range from none to 50 parameters (ok nowthat I think of it maybe this SP with 50 parameters is anINSERT SP; regardless let's assume I have SPs thatrequire 10-20-30+ parameters).My other problem is each stored procedures' returnedresult could fall into any of these four categories:- 1 row, 1 column- 1 row, many columns- many rows, 1 column- many rows, many columnsSo far I thought about 3 ways of storing the data:1- 1 large table with 50 columns that can hold variousnumber of input parameter values. Similar type of table forholding the output result for the four categories above.2- 1 small table holding one value per row. All kinds of joinswith other tables to indicate which SP and which column thevalue belongs to...3- 1 individual table per stored procedure, this way the numberof columns in the table would match exactly the number of inputparameters.Obviously the above 3 categories could apply both for the inputand output data.Now I'm still in research mode and I haven't decided on any choiceyet. And I know each approach has serious consequences; let's justsay they are all with some limitations.Has anyone dealt with this scenario before? This is the first time Ineed a table to hold various types of returned data.Just to give some numbers: possibly a few thousand SPs and verylikely each SP would have more than one test scenario.What would you suggest?Thank you
View 2 Replies
View Related
Jul 8, 2006
sample results: <MRNID=10002><VesselCode=VSL1>
wherein MRNID and VesselCode are primary keys of the table.
View 3 Replies
View Related
Aug 5, 2007
Is it possible to combine the following tables:
Table1:
id
1
2
3
Table2:
licenses
3
2
1
To one table, like this:
id licenses
1 3
2 2
3 1
-There is always the same number of rows in both tables.
Thanks a lot!
View 9 Replies
View Related
Nov 4, 2015
I'm trying to append rows horizontally - I'm using the "xml path" approach
SELECT
E.[USER_NAME] As 'User Name',
(
SELECT ',' + C.[PERMISSION_NAME]
FOR XML PATH('')
) As [Associated Groups]
FROM TABLEA As A
JOIN TABLEB AS B ON A.PK_OBJ_ID = B.FK_APP_OBJECT_REF
JOIN TABLEC AS C ON C.PK_PERMISSION_ID = B.FK_PERMISSION_REF
JOIN TABLED AS D ON D.FK_PERMISSION_REF = C.PK_PERMISSION_ID
JOIN TABLEE AS E ON E.PK_PERSONNEL_ID = D.FK_PERSONNEL_REF
WHERE A.[OBJECT_NAME] = 'MyObjectName'
It's not working. I'm getting:
User nameAssociated Groups
A. SmithG1
A. SmithG2
A. SmithG3
etc...
What I'm looking for is:
User NameAssociated Groups
A. SmithG1, G2, G3
etc...
View 3 Replies
View Related
Mar 26, 2007
Hello,
I have a very wide report that uses a table control. I would like to "freeze" the two leftmost columns so that they remain visible when the user is scrolling horizontally (sideways). Is this possibe?
Thanks,
BCB
View 8 Replies
View Related
Jan 13, 2008
Hi,
I have a client with the following table structure:
ItemNumber, Name, Description
containing the following Data (example):
ItemNumber
Name
Value
6473764
SDRAM
4GB
6473764
Xeon
2300 Mhz
6473764
Video
256 MB
6473764
Bus
1300 Mhz
6473759
SDRAM
2GB
6473759
Xeon
2000 Mhz
6473759
Video
128 MB
6473759
Bus
1066 Mhz
I am trying to use PIVOT to convert this into Columns:
Item Number
SDRAM
Xeon
Video
Bus
6473764
4GB
2300 Mhz
256 MB
1300 Mhz
6473759
2 GB
2000 Mhz
128 MB
1066 Mhz
The problem is that I do not know the names of the columns before I run the query. I retrieve them based on a a list of Item Numbers:
SELECT DISTINCT Name FROM TableName WHERE ItemNumber IN (...)
What I was trying to do is the following, but I am not exactly sure what is wrong:
WITH ProductLines (ItemNumber, ItemName, ItemValue)
AS
(
SELECT ItemNumber, Name, Value FROM ProductItems WHERE ItemNumber IN (...)
)
SELECT * FROM ProductLines -- Don't know the column names
PIVOT
(
... -- Not sure what should come here
FOR ItemNumber IN (...)
)
Thanks a lot,
Aric Levin
View 3 Replies
View Related
Aug 23, 2007
Is it possible in the SSRS Report Designer to rotate a textbox to run vertically, or simply to rotate the text in a textbox ? I have only seen this done within axes lables of charts, but not text boxes.
Thanks in advance,
Kenny
View 1 Replies
View Related
Sep 8, 2012
I have the following table:
Policy Sequence LossDate Description Amt
123 1 9-1-2012 property 100
123 2 10-1-2012 property 200
345 1 9-1-2012 property 100
345 2 10-1-2012 property 100
678 1 9-1-2012 property 100
I want to select the data as follows:
Policy LossDate1 Description1 Amt1 LossDate2 Description2 Amt2
123 9-1-2012 property 100 10-1-2012 property 200
345 9-1-2012 property 100 10-1-2012 property 100
678 9-1-2012 property 100 NULL NULL NULL
Is there a way to do this using T-SQL?
The max sequence number can vary, so far the max has been 12, but may be higher in the future.
View 2 Replies
View Related
Oct 8, 2015
I'm using the SQL indicated below:
SELECT
DISTINCT C.Field1 As 'Group',
A.Field2 As 'Security Object'
E.Field3 As 'User'
FROM TableA AS A
[code]...
However I'm having difficulties concatenating the user field in the horizontal form indicated.
View 3 Replies
View Related
Jan 10, 2008
I have an interesting problem to report that I'm hoping someone will be able to assist in solving.
I have a report that contains a table inside of a list. When I view this report on my local machine via Visual Studio, everything appears normal, the columns are all the correct size. However, as soon as I publish this report to the report server and attempt to view it via Report Manager, one of the columns expands horizontally!
From all of the documentation I have read, I understand that Reporting Services does not provide the ability for columns to expand horizontally, only vertically. Can anyone help explain why this is happening or a possible solution to turn this automatic expanding off?
Many thanks,
canuck81
View 4 Replies
View Related
Aug 23, 2004
How do i do a loop to insert excel records to new excel worksheet as i onli want a certain of the columns from the existince excel. For the existince excel mi got record of column A - M then i just need to copy data of A - L then copy from the same existince column H data to the new excel worksheet. For those who know pls put up codes for me so tat i can have a better understanding over it . THankz
View 2 Replies
View Related
Apr 3, 2008
When I get the results from my query, some of the columns labels are too short and look like this "ran....". How do I extend the cells??
Thanks
US Navy - We are fueled, armed, and go for launch.
View 2 Replies
View Related
Jun 28, 2005
Hi
i need to sum the values in different cells of an excel sheet which im getting from data base and which is in a loop and the number of entries depends on the user.Please help me out
im adding the code please check it out:
<%
Response.ContentType = "application/vnd.ms-excel"
%>
<html>
<body>
<%
dim objConn
set objConn=server.CreateObject("ADODB.Connection")
objConn.open "provider=SQLOLEDB;data source=10.100.17.107;initial catalog=RUT;user id=test;password=test;"
iMonth = Request.QueryString ("month")
iyear = Request.QueryString ("year")
intpid = Request.QueryString ("project")
inteid = Request.QueryString ("eid")
dim fDate
DIM fmonth
Dim fi
if iMonth = "February" and iYear mod 4 <> 0 then
iTo = 28
elseif iMonth = "February" and iYear mod 4 = 0 then
iTo = 29
end if
if (iMonth = "April" or iMonth = "June" or iMonth = "September" or iMonth = "November") then iTo = 30 end if
if (iMonth = "January" or iMonth = "March" or iMonth = "May" or iMonth = "July" or iMonth = "August" or iMonth = "October" or iMonth = "December") then iTo = 31 end if
dim rsobj1,rsobj2,rsobj5,rsobj9
sql1 = "select first_name from tblUserMaster where emp_id='"&inteid&"'"
set rsobj1 = objConn.Execute (sql1)
sql2 = "select distinct activity_id from tblTimeSheet where month='"&iMonth&"' and year='"&iyear&"' and project_id='"&intpid&"' and emp_id='"&inteid&"' and bill_non = ''"
set rsobj2 = objConn.Execute (sql2)
%>
<b>Employee Name:<%=rsobj1("first_name")%></b>
<TABLE BORDER=1>
<TR>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></td>
<TD ><%=imonth%></TD>
<TD ></td>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ><%=imonth%>
</TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ><%=imonth%></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ><%=imonth%></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
<TD ></TD>
</TR>
<TR bgcolor="#ffffff" style="FONT-FAMILY: fantasy; BACKGROUND-COLOR: powderblue">
<td ><b>Client/Assignment</b> </td>
<td ><b>ProjectName</b> </td>
<td ><b>Remarks</b></td>
<td><b>Total Hrs</b></td>
<%for i = 1 to iTo
fmonth=imonth
fi =i
fDate = fi & "/" & fMonth & "/" & iYear
Response.Write "<td align=center><b>" & i & "</p>" & weekdayname(weekday(fdate)) & "</b></td>"
next%>
</TR>
<%'===============================================d efault activity============================%>
<% do until rsobj2.EOF%>
<tr>
<%
dim intactid,rsobj3
intactid = rsobj2("activity_id")
sql3 = "select activity_name from tblActivityMaster where activity_id = '"&intactid&"'"
set rsobj3 = objConn.Execute (sql3)
sql4 = "select no_of_hrs,remarks,date from tblTimeSheet where month='"&iMonth&"' and year='"&iyear&"' and project_id='"&intpid&"' and emp_id='"&inteid&"' and activity_id='"&intactid&"'"
set rsobj4 = objConn.Execute (sql4)
%>
<td><%=rsobj3("activity_name")%></td>
<td></td>
<td><%=rsobj4("remarks")%></td>
<td></td>
<%do until rsobj4.eof%>
<%if (rsobj4("no_of_hrs") < 8 ) then%>
<td><%=rsobj4("no_of_hrs")%></td>// I need to add the values i get in this td and display in the td with red colour and the number of values may change according to the user
<%else%>
<td>8</td>
<%end if%>
<%
rsobj4.movenext
loop
%>
</tr>
<%
rsobj2.movenext
loop
%>
Thanks
ajith
View 1 Replies
View Related
Feb 11, 2008
I am trying to import Data from an Excel file to a SQL DB table. there are around 106 rows and 2 columns.
By default, the ssis is selecting around 200 columns and over 2000 rows. But all cells except for the 2 columns and 106 rows are empty. While I can specify that I need to read only 2 columns, I could not figure out a way to specify the rows. Any help?
View 3 Replies
View Related
Apr 19, 2007
Good day all
Does anyone know if there is such a quary that can be written which would add up(or any math functions) a line of cells (on different rows) similar to that of working with a excel document?
If so please steer me towards the correct syntax for this.
Regards
Rob
View 1 Replies
View Related
Apr 7, 2007
How can I make the values for certain cells in a table in a database show the day a folder was created?
On the same note, How can I make other values in other cells change (say the values 101 through 200 had to change to 1-100)?
View 5 Replies
View Related
Jul 26, 2007
Hi all,
I would to take a value of a cells in my matrix to load an other. Like we usually do in Excel
A2 = A1 * 100 for Example...
An idea ?
Regards,
Erwan, France
View 3 Replies
View Related
Jun 18, 2008
I have two questions. I am somewhat of a novice at this but would really appreciate some help.
Table = svc
There are multiple columns but I just need adjustments in the first 2.
Current Table:
code name svctype
CTS0003CT Abd Ltd 51608
CTS0005CT Abd W Cont 51608
CTS0011CT Abd WWO Cont 51608
CTS0013CT Abd WO Cont 51608
CTS0023CT Abd-Ltd Pel W Cont51608
CTS0025CT Abd-Ltd Pel WO Cont51608
What I want it update it to:
code name svctype
RCT0003AR CT Abd Ltd 19254
RCT0005AR CT Abd W Cont 19254
RCT0013AR CT Abd WO Cont 19254
RCT0011AR CT Abd WWO Cont 19254
RCT0023AR CT Abd-Ltd Pel W Cont19254
RCT0025AR CT Abd-Ltd Pel WO Cont19254
QUESTION #1:
So I am trying to figure out if I could write a statement that basically updates the CODE column’s first three letters in each cell from CTS to RCT and retains the numbers afterwards.
QUESTION #2
The NAME column in Table 1 would also need a little adjustment.
I need to add AR in front (almost like a prefix) of all of the descriptions (so that it looks like Table #2). How do I insert something into the description?
I greatly appreciate anyone's help in this. It would save me counltess hours.
-T.C.
View 2 Replies
View Related
Oct 8, 2007
Hello,
I am very new to SQL and ran into a problem using Access. I hope you can help me here.
The question is the following:
I have to tables:
Table 4x4: CommodityCode(string)/NeedofBU(high,low)
Table ASDBComplete: CommodityCode/Manufacturer/Rating(red,green,yellow)
What I want to get as a result is to display all ComodityCodes that have a 'red' rating and a 'high' NeedOfBU. So far no problem. But now there usually is more than one manufacturer for one CommodityCode. What I need now is that the CommodityCode is not displayed if there actually exist a Manufacturer with 'green' or 'yellow' rating.
How would you do that?
What I have so far is:
SELECT [4x4].[CommodityCode], [4x4].NeedofBU, ASDBComplete.CommodityCode, ASDBComplete.Rating, ASDBComplete.Manufacturer
FROM 4x4 LEFT JOIN ASDBComplete ON [4x4].[CommodityCode] = ASDBComplete.CommodityCode
WHERE ((([4x4].NeedofBU)="high") AND ((ASDBComplete.Rating)="red"));
But this gives me all the Commodities with red ratings. Even if there is a supplier with a green or yellow rating.
I would need somting like:
if exists 'commodityCode.XY with 'manufacuturer rating = green OR yellow' do not display commodityCode.xy
I really appreciate your help
View 8 Replies
View Related
Jul 20, 2005
Hello.I have one serious problem with COUNT in TSQL.I use MS SQL Server 2000.I would like to count rows depending on data in it.What I meat is:I have fields like:region | month | year | some_count |-------|-------|------|-------------|LA | 1 | 2003| 4 |LA | 2 | 2003| 2 |LA | 3 | 2003| 1 |LA | 4 | 2003| 6 |VV | 1 | 2003| 3 |VV | 2 | 2003| 7 |VV | 4 | 2003| 20 |VV | 6 | 2003| 3 |BB | 2 | 2002| 1 |etc...And what I would like to get from it is:region | jan2003 | feb2003 | mar2003 | apr2003 | may2003 | june2003 | etc...-------|----------|---------|-----------|----------|----------|-----------|--LA | 4 | 2 | 1 | 6 |0 | 0 | 0VV | 3 | 7 | 0 | 20 | 0| 3 | 0BB | 0 | 1 | 0 | 0 |0 | 0 | 0etc...Is it possible to do it in views? if yes then how?I could use temp tables for each month but it is not solution when I have 3yearsand more later then it will be round 40 temporary tables.Thanks for any response.Regards,Casper
View 3 Replies
View Related
Jan 3, 2007
Any way to merge cells vertically in SSRS 2005? I know w can do it horizontally by right clik, then select "merge cells". How about vertically? Thanks.
View 3 Replies
View Related
Jan 11, 2007
hello All,
I am trying to now access the data (if any) in the current cell of a table. I want to know if this cell has been populated, and if so to move on...if not then I want to populate with a zero.
I am using the following:
ReportItems!textbox9.Value inside of an if statement but it tells me that I am unable to do so as, and I quote:
"The Value expression for the textbox 'textbox 9' contains a direct or indirect reference to itself. Loops in expressions are not allowed."
Any ideas guys?
View 5 Replies
View Related
Oct 24, 2007
In a matrix, is it possible to have the cell dynamically size itself horizontally (like a horizontal scroll bar)? The numbers are wrapping to the next line if they're too large to fit in the cell and it is too complicated for me to balance at compile time how large these numbers will be with the number of columns that are on the report.
View 1 Replies
View Related
May 15, 2007
Hi
I'm trying to eliminate merged cells when exporting a report to Excel. My problem being my report textbox above my table.
I've searched and found that making the textbox the same width as the first column eliminates the merging. Perfect, it does. But when the report is viewed in the report viewer, the textbox can only expand vertically. So the title looks terrible because column one is not wide.
I've read that expand horizontally is not an option
I don't seem to be able to tell it not to output that text box, which would be an option if there is no other answer
I can't have the text box the size I want it, due it creating merged cells
I don't want to export it as a CSV
Are there any other options available or am missing something?
Cheers
View 5 Replies
View Related
Oct 16, 2007
Is there a reason why a single cell in a table with the CanGrow property set to true will grow down, and merged cells grow right, and is there any way around it?
I have a report that I have to display comments, so I merged 2 cells put the comment field in it, and when it is displayed in the browser, it expands off the page.
When it prints, it seems to be fine, but the majority of my users will be viewing online in a browser.
Any ideas? just an HTML thing I am thinking, and nothing can be done about it.
Thanks
BobP
View 3 Replies
View Related