Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Thursday, March 29, 2012

Adjust Parameter Dropdown control Size/Length

Dear Anyone,

Is there a way to adjust Parameter Dropdown control Size/Length of a report so that it would no longer display a scrollbar?

Thanks,
JosephSorry, this is not a customizable property.

-Danielsql

Adjust Parameter Dropdown control Size/Length

Dear Anyone,

Is there a way to adjust Parameter Dropdown control Size/Length of a report so that it would no longer display a scrollbar?

Thanks,
JosephSorry, this is not a customizable property.

-Daniel

Tuesday, March 27, 2012

Addtion / Sum of Parameter Array Values - SSRS

Hi All,
I want to Sum instead of Join Parameter arrays selected values and use
it within the report to display data based on total sum of all the
values selected. Join concatanates them with comma delimited values
but i want sum of all those values.
Example as below
Value DisplayText
1 - Current Month
2 - Previoius Year
4 - Half Year
8 - Year to date
so if
current month and half year
are selected then i want to read 1 + 4 = 5 and not 1,4 as currently i
get by join function.
Code = SUM(Parameters!dropdownbox.value)
Result = #Error
Code = Join(Parameters!dropdownbox.value,",")
Result = "1,4"
Code = SUM(Join(Parameters!dropdownbox.value,","))
Result = #Error
Code = Parameters!dropdownbox.count
Result = 4 (it gives me length of array)
Code = ?
Result = 5 (This is the result is want...but can make it work)
Any help greatly appreciated
Regards
Nirav Lulla
Yotta ConsultingOn May 14, 1:02 pm, nlulla <nirav.lu...@.gmail.com> wrote:
> Hi All,
> I want to Sum instead ofJoinParameterarrays selected values and use
> it within the report to display data based on total sum of all the
> values selected.Joinconcatanates them with comma delimited values
> but i want sum of all those values.
> Example as below
> Value DisplayText
> 1 - Current Month
> 2 - Previoius Year
> 4 - Half Year
> 8 - Year to date
> so if
> current month and half year
> are selected then i want to read 1 + 4 = 5 and not 1,4 as currently i
> get byjoinfunction.
> Code = SUM(Parameters!dropdownbox.value)
> Result = #Error
> Code =Join(Parameters!dropdownbox.value,",")
> Result = "1,4"
> Code = SUM(Join(Parameters!dropdownbox.value,","))
> Result = #Error
> Code = Parameters!dropdownbox.count
> Result = 4 (it gives me length of array)
> Code = ?
> Result = 5 (This is the result is want...but can make it work)
> Any help greatly appreciated
> Regards
> Nirav Lulla
> Yotta Consulting
I'm not sure how many items are in your dropdown list but this will
work if you only have a few...
=CInt(Parameters!site.Value(0)) + CInt(Parameters!site.Value(1))|||Hi James,
Thanks for posting your reply, you suggesstio would only work if i
have set fixed length of options, but i don't know how this is going
to work in case of unknown number of options.
For now , I have Created a .net class file DLL with following code and
referenced the dll in my .rdl file, it works for me, but would be good
if it can be done within SSRS itself. Any more suggesstions welcome
Nirav Lulla
Yotta Consulting
Public Class ClsCommon
Const bDisplayColumn As Boolean = False
Const bHideColumn As Boolean = True
Shared Function SumOfArrayString(ByVal ArrayString As String) As
Integer
Dim arylist As System.Array
Dim sum As Integer
Try
arylist = ArrayString.Split(",")
For Each item As Integer In arylist
sum += CInt(item)
Next
Catch ex As Exception
Return -1
Finally
Return sum
End Try
End Function
End Class

Address field problem.

I have a number of text boxes (one on top of the other) to display the addresses in my report. I have Address_name, Address1, Address2, Address_city, Address_State, Address_PostalCode - Each with its own text box except for the city, state, and postal code for which I just combined the fields. However, I have many who do not have any data for Address2 and don't want an empty line in the address. Is there an expression I can use to display the next line or move/shift up the remaining parts of the address? Would the iif and isnothing expressions be helpful, and if so, how do I write it correctly?

If it is ok to put them all into one textbox, you could do this:

=Fields!Address_name.Value
& chr(10) & Fields!Address1.Value
& IIf(Len(Fields!Address2.Value) > 0, chr(10) & Fields!Address2.Value, "")
& chr(10) & Fields!Address_city.Value & ", " & Fields!Address_State.Value & " " & Fields!Address_PostalCode.Value

If they have to have their own textbox and you just want to move it up if the Address2 is empty, then you could try something like this.

In the expression for the Address2 textbox:

=IIf(Len(Fields!Address2.Value) > 0, Fields!Address2.Value, Fields!Address_city.Value & ", " & Fields!Address_State.Value & " " & Fields!Address_PostalCode.Value)

Then, in the expression for the City/State/Postal Code:

=IIf(Len(Fields!Address2.Value) > 0, Fields!Address_city.Value & ", " & Fields!Address_State.Value & " " & Fields!Address_PostalCode.Value, "")

Hope this helps.

Jarret

|||

Thanks mate, I'll give it a try.!

What does "Len" do?

|||

Len gives you then length of the object you pass in. In this case, if the Address2 is NULL or an empty string, Len will return 0 and it will be skipped with the logic in the code.

Let me know if that fixes your issue.

Jarret

|||

I see, thanks for the info. I will try this in about an hour or so, I'll post back and give you an update.

Thanks again Jarret,

Bill

Tuesday, March 20, 2012

Adding subreport to report header?

Is it possible? Crystal allowed you to do it but RS doesn't seem to. I have
a number of reports that need to display same data (Org name, date etc.)
on the report header and I thought doing it as a subreport was a good idea.
Any workarounds?
Thanks in advance.Found report templates meet my needs better. Thanks anyway!
> Is it possible? Crystal allowed you to do it but RS doesn't seem to. I
> have a number of reports that need to display same data (Org name,
> date etc.) on the report header and I thought doing it as a subreport
> was a good idea.
> Any workarounds?
> Thanks in advance.
>sql

Saturday, February 25, 2012

Adding in a query

i want to add vales in a query

this is my scenario (how can i add the price column values and display as one record) ex. 222 17

table = table1

tep1 price (column)

222 5

222 2

222 10

SELECT SUM(price) FROM table1 WHERE tep1=222

Or

SELECT SUM(price) FROM table1 GROUP by tep1

The first will sum for just the 222 record, the second will sum for each unique tep1.

|||

SELECT tep1, SUM(price) AS "Total" FROM table1 GROUP BY tep1

Thursday, February 16, 2012

adding commas into integer

while selecting the field, I want it to be display with commas.
for example,
10000 become 10,000
without decimal placed at the end.
I have tried using smallmoney format but there is decimal places.Take a look at DECIMAL datatype
"dapdap" <dapdap@.discussions.microsoft.com> wrote in message
news:22FBBC46-4B9D-4377-A806-D4D79EE81013@.microsoft.com...
> while selecting the field, I want it to be display with commas.
> for example,
> 10000 become 10,000
> without decimal placed at the end.
> I have tried using smallmoney format but there is decimal places.|||Formatting is controlled by your client application, not by SQL Server. Ask
this question in a forum for the app or programming language you are using.
Certainly you could get SQL to return a string instead of a number but why
would you want to do that with the obvious divantages for performance,
complexity and special handling at the client?
David Portas
SQL Server MVP
--
"dapdap" wrote:

> while selecting the field, I want it to be display with commas.
> for example,
> 10000 become 10,000
> without decimal placed at the end.
> I have tried using smallmoney format but there is decimal places.|||>> selecting the field, I want it to be display with commas. <<
Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files. In a tiered architecture, the
display formatting is done in the front end and never in the database.
A good SQL programmer avoids proprietary datatypes.

Monday, February 13, 2012

Adding Color

Hi everyone, I am trying to get this to work, but I know its all screwed up. I want Fields!PERCENT_OF_STD.Value to display red if its less than 100% or greater than 200%. If its neither, then just be plain black. This is what I came up with:

=(Fields!PERCENT_OF_STD.Value >= 200%, "RED", (Fields!PERCENT_OF_STD.Value <= 99%, "RED"))

Thanks,

Abz

abz_26 wrote:

Hi everyone, I am trying to get this to work, but I know its all screwed up. I want Fields!PERCENT_OF_STD.Value to display red if its less than 100% or greater than 200%. If its neither, then just be plain black. This is what I came up with:

=(Fields!PERCENT_OF_STD.Value >= 200%, "RED", (Fields!PERCENT_OF_STD.Value <= 99%, "RED"))

Thanks,

Abz

Try this:

=(Fields!PERCENT_OF_STD.Value >= 200% OR Fields!PERCENT_OF_STD.Value <= 99% , "RED", "BLACK")

|||

Aren't you forgetting the function name? Also, I suspect the percentage values come back as decimal 1 or 2 and is then formatted as a %.

Such a comparisson does not make sense x = 200% because 200% is the formatted value. Try this:

If your percentages come back as 1 or 2 then:

=Iif(Fields!PERCENT_OF_STD.Value >= 2 OR Fields!PERCENT_OF_STD.Value < 1 , "RED", "BLACK")

If your percenatges come back as the actual umber i.e. 100 or 200 then:

=Iif(Fields!PERCENT_OF_STD.Value >= 200 OR Fields!PERCENT_OF_STD.Value < 100 , "RED", "BLACK")