on 10-19-2007 10:39 AM
Hi Experts,
I want to show only the result line of the Query. Is this possible in query Designer ?
In BeX Workbook, I can hide the rows but they grow or shrink dynamically and hence it is unpredictable how many rows to suppress.
If you have any solutions/workarounds, please reply !
Rekha
VBA coding can be used to display just the Result rows.
Somthing like this - modify as needed.
This scans the range of query results looking to find the last row, then checks those rows to see if the word Result is found or not, deleting (or you could just hide) the detail rows. There is also a LEAF option in BEx Boolean options that returns a 1 or 0 depending on whether a row is a detail or result that could also be used to hide rows rather than looking for the presence of "Result" in a particular column
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
For rownum = 17 To 64000 Step 1
' col 2 is the Total Result, col 3 is the User Group result
If Cells(rownum, 2) = "" And Cells(rownum, 3) = "" Then
lastrow = rownum - 1
Exit For
End If
Next
For rownum = lastrow To 17 Step -1
If Cells(rownum, 2) = "Result" Or Cells(rownum, 3) = "Result" Then
Rows(rownum).Hidden = False
Else
' Rows(rownum).Hidden = True
Rows(rownum).EntireRow.Delete
End If
Next
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vaidyanathan
If you have just one characteristic for which there is only the result you want (perhaps Comp Code) it's the best way to achieve this.
Alternatively, in Excel run your query on Sheet B, have your query properties set to display the Results rows on top of the report, theis means the results will always be on for instance row 20. Then on Sheet A - use Excel formula to bring your results into the other sheet.
Regards
Gill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.