Showing posts with label textbox. Show all posts
Showing posts with label textbox. Show all posts

Friday, March 30, 2012

Multivalue parameter textbox size

Hi,

In my report,I have multivalue parameter for this parameter the Available values are from the Dataset.Suppose the dataset contains Names like this:

'AL - Alabama Center (Tuscaloosa)',

'AL - Regional Control Center (Birmingham)',

'AR - Arkansas & Rock)',

'Arizona Department of Health'

But my problem is the Multivalue parameter TextBox is of fixed size.Now i want the size of the text box to the size of the name which is of length long in the Name.

Whether it is possible or not.

How to achieve this.

The size of the parameter area is not configurable. You can modify some of the style properties of the report viewer by following the instructions here: http://msdn2.microsoft.com/en-us/library/ms345247.aspx, there is just no way to set the size of the input boxes.|||

Sorry for high jacking this post but I can’t find any other reference to this issue.

I heard a rumour that this would be fixer in SQL Server 2005 SP2, is this the case?This issue is a real thorn in my side with constant user moaning.

Multivalue parameter textbox size

Hi,

In my report,I have multivalue parameter for this parameter the Available values are from the Dataset.Suppose the dataset contains Names like this:

'AL - Alabama Center (Tuscaloosa)',

'AL - Regional Control Center (Birmingham)',

'AR - Arkansas & Rock)',

'Arizona Department of Health'

But my problem is the Multivalue parameter TextBox is of fixed size.Now i want the size of the text box to the size of the name which is of length long in the Name.

Whether it is possible or not.

How to achieve this.

The size of the parameter area is not configurable. You can modify some of the style properties of the report viewer by following the instructions here: http://msdn2.microsoft.com/en-us/library/ms345247.aspx, there is just no way to set the size of the input boxes.|||

Sorry for high jacking this post but I can’t find any other reference to this issue.

I heard a rumour that this would be fixer in SQL Server 2005 SP2, is this the case?This issue is a real thorn in my side with constant user moaning.

Monday, March 26, 2012

Multi-record wrapping textbox?

I know that the subject is badly expressed, but hopefully I can get the
point across...
I'm a total newbie at MS Reporting services and I have a question. I
have a dataset something like this:
Customer Box Item Qty
A 1 X1 50
A 1 X2 50
A 2 X3 75
A 2 X4 25
A 3 X5 15
B 1 X1 35
B 1 X2 65
B 2 X2 10
B 2 X3 10
etc... you get the idea. Each box holds 100 mixed items; each customer
has one or more boxes.
The output report I want should look something like this:
Customer Box Contents
A 001 X1 50 * X2 50
002 X3 75 * X4 25
003 X5 15
Total for customer A: 3 boxes, 215 pieces
B 001 X1 35 * X2 65
002 X2 10 * X3 10 * X4 20 * X5 10 * X6
5
X7 5 * X8 40
003 X9 50
Total for customer B: 3 boxes, 250 pieces
I set it up as a report with two grouping levels. The tricky part is
the "contents" column. I want it to be a textbox that can be up to a
certain width, wrapping if necessary, and containing a string of data
from records. Any way to do that with Reporting Svcs?
If it helps, when I did this with MS Access, I made the wrapping
textbox part as a subreport with columns. I can try that with RS but
it seems like it might be possible another way?
I should also mention that I'm using SQL Server 2000, VB.NET 2003 as my
designer, so perhaps I don't have access to the newest features of 2005.I wrote:
> The tricky part is
> the "contents" column. I want it to be a textbox that can be up to a
> certain width, wrapping if necessary, and containing a string of data
> from records. Any way to do that with Reporting Svcs?
Never mind; I found this blog entry
http://blogs.msdn.com/chrishays/archive/2004/07/23/HorizontalTables.aspx
that gives a quite serviceable method for getting what I want.

Wednesday, March 21, 2012

Multiple values int textbox...

Hi,
I need to display the result set in a textbox,
if there are multiple rows i need to show them as comma separated..
Can anyone give me idea of how it can be achieved..
Thanks in advance,I can't think of an easy way.
You need to get the resultset concatanating, not do it in report layout.
You could use a cursor (effectively a loop) in the SQL query - get the
result set and concatanate the rows into a variable and output the
variable as the result set. Cursors are quite slow though.
You could do the same thing in VB code using ADO if that's your thing.
Chris
CCP wrote:
> Hi,
> I need to display the result set in a textbox,
> if there are multiple rows i need to show them as comma separated..
> Can anyone give me idea of how it can be achieved..
> Thanks in advance,sql

multiple values inside textbox

Hi,
I have created a function that will accept multiple values for a parameter.
I have added a textbox to the body where I want to display the values of the
parameter but for some reason it only shows the first value.
Why and how can I resolve it?
Thanksim also facing the same prob...
Did u get any solution for this...
Thanks,
"collie" wrote:
> Hi,
> I have created a function that will accept multiple values for a parameter.
> I have added a textbox to the body where I want to display the values of the
> parameter but for some reason it only shows the first value.
> Why and how can I resolve it?
> Thanks|||What kind of function is it? Are you storing comma separated values for that
parameter?
"Chandra" wrote:
> im also facing the same prob...
> Did u get any solution for this...
> Thanks,
>
> "collie" wrote:
> > Hi,
> >
> > I have created a function that will accept multiple values for a parameter.
> > I have added a textbox to the body where I want to display the values of the
> > parameter but for some reason it only shows the first value.
> > Why and how can I resolve it?
> >
> > Thanks|||Thanks for the response. Below is the function I am using.
CREATE FUNCTION dbo.UDF_CharCommaSeparatedListToTable
(
@.CommaSeparatedList VARCHAR(8000)
)
RETURNS @.ParsedTableValue TABLE (TableValue VARCHAR(1000))
AS
BEGIN
DECLARE @.TableValue VARCHAR(1000)
DECLARE @.Pos INT
SET @.CommaSeparatedList = LTRIM(RTRIM(@.CommaSeparatedList))+ ','
SET @.Pos = CHARINDEX(',', @.CommaSeparatedList, 1)
IF REPLACE(@.CommaSeparatedList, ',', '') <> ''
BEGIN
WHILE @.Pos > 0
BEGIN
SET @.TableValue = LTRIM(RTRIM(LEFT(@.CommaSeparatedList, @.Pos - 1)))
IF @.TableValue <> ''
BEGIN
INSERT INTO @.ParsedTableValue (TableValue)
VALUES (RTRIM(@.TableValue))
END
SET @.CommaSeparatedList = RIGHT(@.CommaSeparatedList,
LEN(@.CommaSeparatedList) - @.Pos)
SET @.Pos = CHARINDEX(',', @.CommaSeparatedList, 1)
END
END
RETURN
END
In the sp I am using it as follows:
--
where
(@.Paramregion IS NULL OR t.region in (Select stringval from dbo.CSVTABLE
(@.Paramregion)))
"Vipul Shah" wrote:
> What kind of function is it? Are you storing comma separated values for that
> parameter?
> "Chandra" wrote:
> > im also facing the same prob...
> > Did u get any solution for this...
> > Thanks,
> >
> >
> > "collie" wrote:
> >
> > > Hi,
> > >
> > > I have created a function that will accept multiple values for a parameter.
> > > I have added a textbox to the body where I want to display the values of the
> > > parameter but for some reason it only shows the first value.
> > > Why and how can I resolve it?
> > >
> > > Thanks|||Didn't find a solution. Did u?
"Chandra" wrote:
> im also facing the same prob...
> Did u get any solution for this...
> Thanks,
>
> "collie" wrote:
> > Hi,
> >
> > I have created a function that will accept multiple values for a parameter.
> > I have added a textbox to the body where I want to display the values of the
> > parameter but for some reason it only shows the first value.
> > Why and how can I resolve it?
> >
> > Thanks

Multiple Value TextBox

Hi Folks,

I'm trying to assign multiple values to a textbox and I'm receiving an error. The error says, "The value expression for the textbox AcctName contains an error." The first value is account number and the second value is account name. An example follows:

1234 - SPC Travel Agency

My expression for the textbox contains the following:

=Fields!AcctNum.Value + ' - ' + Fields!AcctName.Value

Please help.

Hello,

Try this:

=cStr(Fields!AcctNum.Value) + " - " + Fields!AcctName.Value

Hope this helps.

Jarret

|||

Hello:

Jarret thanks for responding however, I figured it out by doing the following:

=Fields!AcctNum.Value & " - " & Fields!AcctName.Value

Best regards

|||

Yes, that does the same as what I posted, except without the cast for string. Since you didn't include the field type on AcctNum, I went ahead and included the cStr(), just in case it was a numeric field.

Jarret

|||

Jarret wrote:

Yes, that does the same as what I posted, except without the cast for string. Since you didn't include the field type on AcctNum, I went ahead and included the cStr(), just in case it was a numeric field.

Jarret

He used & for string concat, while you used + for integer concat/sum though

I do that all the time in SSRS, using + (in T-SQL) instead of & (in VB)

|||

Hello Jerry,

That is true, but the '+' and '&' behave the same when working with strings. Since I casted the field as string, they work the same. The other problem with the expression in his first post was that he was trying to use a single quote (') instead of a double quote (") on the literal string (the dash between the AcctNum and AcctName).

The & does an implicit convert to string on the operators. So, where I did the cast using cStr(), the & handled that itself.

=Fields!AcctNum.Value & " - " & Fields!AcctName.Value

=cStr(Fields!AcctNum.Value) + " - " + Fields!AcctName.Value

Jarret

|||

Jarret wrote:

Hello Jerry,

That is true, but the '+' and '&' behave the same when working with strings. Since I casted the field as string, they work the same. The other problem with the expression in his first post was that he was trying to use a single quote (') instead of a double quote (") on the literal string (the dash between the AcctNum and AcctName).

The & does an implicit convert to string on the operators. So, where I did the cast using cStr(), the & handled that itself.

=Fields!AcctNum.Value & " - " & Fields!AcctName.Value

=cStr(Fields!AcctNum.Value) + " - " + Fields!AcctName.Value

Jarret

Thanks Jarret

That's nice to know that it knows how to interpret the + concat as well