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

Wednesday, March 21, 2012

Displayong "Empty string" to a textbox on the report

Hi All!

I was checking the value of a field and if it is empty sending empty string to the textbox if not only the first few values and it is working but on the empty field something like "#Error" is being displayed.

here is the code:

=Iif(Fields!Lname.Value <>””, Fields!Lname.Value.ToString().Substring(0,10),"")

What I want to acheve is : If it is not zero to take the first 10 characters and if not to send an epmity string to the textbox.

Any help plz?

Thank you in advance!

In your expression, you are making the assumption that the string will be at least 10 characters. If it isn't 10 characters you will get an error. I am not sure what you are trying to accomplish but see the expression below. It will truncate the field if it is over 10 characters.

=Iif(Fields!Lname.Value.ToString().Length() > 10, Fields!Lname.Value.ToString().Substring(0,10), Fields!Lname.Value)

|||

here is the code:

=Iif(Fields!Lname.Value <>””, Fields!Lname.Value.ToString().Substring(0,10),"")

What I want to acheve is : If it is not zero to take the first 10 characters and if not to send an epmity string to the textbox

Thank you.The one that you send to me is not doing what i was looking for. Thank you very much.

|||

My expression does the exact same thing as yours except when there are less than 10 characters it will not attempt to truncate.

Input and output for my expression:

"" -> "" "foo" -> "foo" "bar" -> "bar" "SomeReallyLongString" -> "SomeReally"

Input and output for your expression

"" -> "" "foo" -> "#Error" "bar" -> "#Error" "SomeReallyLongString" -> "SomeReally"

|||

If I am getting it right, the problem I think is that when that field is empty or NULL, it returns an error:

So in your code actually, the first line for input and output would be:

"" --> #Error

I dunno how to resolve this in RS as I tried various things and they didn't work (like length = 0 etc.), only thing I can think of for now is to modify your query itself to return the substring instead of the field and then use this new field..

e,g,

select .....,..,.., substring(ISNULL(OldFieldName,''), 0, 10) as NewFieldName
from TableName

Ryan Ackley MSFT wrote:

My expression does the exact same thing as yours except when there are less than 10 characters it will not attempt to truncate.

Input and output for my expression:

"" -> "" "foo" -> "foo" "bar" -> "bar" "SomeReallyLongString" -> "SomeReally"

Input and output for your expression

"" -> "" "foo" -> "#Error" "bar" -> "#Error" "SomeReallyLongString" -> "SomeReally"

|||

Thank you very much. This is exactly what the problem that I am facing now let me try to see some other things and I will do as you suggest. Thank you.If you find anything new plz let me know.

Ephi

Displaying values of a textbox

Use
textbox2.value: =ReportItems!textbox1.value
"Sanjeev" <sanjeev@.microsoft.com> wrote in message
news:<uafhla3qEHA.3700@.TK2MSFTNGP15.phx.gbl>...
> Hi,
>
> I want to display the value of one textbox in another textbox.
> Does anyone know the syntax for this expression.
> Both Textboxes are in a matrix which hopefully does not complicate
matters.
>
> T.I.A.
> Sanjeev
>
>
>
>
>Thanks. That works perfectly for textboxes that are rows or columns of the
matrix
Now i have another problem.
What if the textbox i wish to refer to is the actual subtotal textbox of the
matrix. The syntax below does not work.
Is there any syntax for this type of situation.
This is the error i get : "Report item expressions can only refer to other
report items within the same grouping scope or a containing grouping scope.
"
"Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
news:%23CNBCj3qEHA.3848@.TK2MSFTNGP14.phx.gbl...
> Use
> textbox2.value: =ReportItems!textbox1.value
> "Sanjeev" <sanjeev@.microsoft.com> wrote in message
> news:<uafhla3qEHA.3700@.TK2MSFTNGP15.phx.gbl>...
>> Hi,
>> I want to display the value of one textbox in another textbox.
>> Does anyone know the syntax for this expression.
>> Both Textboxes are in a matrix which hopefully does not complicate
> matters.
>> T.I.A.
>> Sanjeev
>>
>>
>|||I haven't played with this, but perhaps you could look into the more
extensive functionality of reporting services by using the Code Pane or even
a custom assembly
"Sanjeev" <sanjeev@.microsoft.com> wrote in message
news:u%23hX493qEHA.2588@.TK2MSFTNGP12.phx.gbl...
> Thanks. That works perfectly for textboxes that are rows or columns of the
> matrix
> Now i have another problem.
> What if the textbox i wish to refer to is the actual subtotal textbox of
the
> matrix. The syntax below does not work.
> Is there any syntax for this type of situation.
> This is the error i get : "Report item expressions can only refer to other
> report items within the same grouping scope or a containing grouping
scope.
> "
> "Ponnurangam" <ponnurangam@.trellisys.net> wrote in message
> news:%23CNBCj3qEHA.3848@.TK2MSFTNGP14.phx.gbl...
> > Use
> >
> > textbox2.value: =ReportItems!textbox1.value
> >
> > "Sanjeev" <sanjeev@.microsoft.com> wrote in message
> > news:<uafhla3qEHA.3700@.TK2MSFTNGP15.phx.gbl>...
> >
> >> Hi,
> >
> >>
> >
> >> I want to display the value of one textbox in another textbox.
> >
> >> Does anyone know the syntax for this expression.
> >
> >> Both Textboxes are in a matrix which hopefully does not complicate
> > matters.
> >
> >>
> >
> >> T.I.A.
> >
> >> Sanjeev
> >
> >>
> >
> >>
> >
> >>
> >
> >>
> >
> >>
> >
> >
>

Monday, March 19, 2012

Displaying RowCount from DataSet in Report TextBox

What is the expression for displaying the rowcount from a dataset in a textbox report item?

On a related note, if how can I access the error code I am sending back from Stored Proc using Return statement, to show up in a text box on report?

.. uspSomeStoredProc...

If error occured

Return -1

elseif some other error

Return 1

else

Return 0

End

Is there a way to display that? In general, how can the values that are returned by stored procs such as RowsAffected or some err code using RETURN or Output Variable be accessed in report? I don't see any properties exposed by datasets in the expression window for doing that.

Any input on this will be appreciated.

Thanks.

|||Any one? Any suggestions or input on this?

displaying report parameter names and values in a textbox

I'm trying to return the parameters used in a report in the report footer. Where it is no problem getting back the values I would also like to display the actual parameter name. However I haven't found a way to do that yet.
My hunch is this needs to be done with embedded code. If anyone has got the answer to this I'd be very glad if you could share it.
thanks a lot
Axe
From http://www.developmentnow.com/g/115_2004_7_0_21_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comUse Parameters!ParamName.Label
"Axel" wrote:
> I'm trying to return the parameters used in a report in the report footer. Where it is no problem getting back the values I would also like to display the actual parameter name. However I haven't found a way to do that yet.
> My hunch is this needs to be done with embedded code. If anyone has got the answer to this I'd be very glad if you could share it.
> thanks a lot
> Axel
> From http://www.developmentnow.com/g/115_2004_7_0_21_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>

Sunday, March 11, 2012

Displaying parameter list in report header

I'm trying to display a parameter list of items to a textbox in the header.
Somehow it never evaluates anything after the first item in the array. 1st
below is the expression... 2nd is the custom code. I don't know what I'm
doing wrong...
1.
=code.ParameterList(Parameters!ProgCatCode.value(0))
2.
Public Function ParameterList(ByVal Parameter as Object) as String
Dim sParamItem as Object
Dim sParamVal as String = " "
For Each sParamItem in Parameter
If sParamItem Is Nothing then Exit For
sParamVal &= sParamItem & ", "
Next
Return sParamVal
End FunctionFigured it out..
"gdjoshua" wrote:
> I'm trying to display a parameter list of items to a textbox in the header.
> Somehow it never evaluates anything after the first item in the array. 1st
> below is the expression... 2nd is the custom code. I don't know what I'm
> doing wrong...
> 1.
> =code.ParameterList(Parameters!ProgCatCode.value(0))
> 2.
> Public Function ParameterList(ByVal Parameter as Object) as String
> Dim sParamItem as Object
> Dim sParamVal as String = " "
> For Each sParamItem in Parameter
> If sParamItem Is Nothing then Exit For
> sParamVal &= sParamItem & ", "
> Next
> Return sParamVal
> End Function
>|||What was it that you figured out. Share it with us.
EROK
"gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> Figured it out..
> "gdjoshua" wrote:
>> I'm trying to display a parameter list of items to a textbox in the
>> header.
>> Somehow it never evaluates anything after the first item in the array.
>> 1st
>> below is the expression... 2nd is the custom code. I don't know what
>> I'm
>> doing wrong...
>> 1.
>> =code.ParameterList(Parameters!ProgCatCode.value(0))
>> 2.
>> Public Function ParameterList(ByVal Parameter as Object) as String
>> Dim sParamItem as Object
>> Dim sParamVal as String = " "
>> For Each sParamItem in Parameter
>> If sParamItem Is Nothing then Exit For
>> sParamVal &= sParamItem & ", "
>> Next
>> Return sParamVal
>> End Function|||I had a similar issue, so I can tell you the things I tried.
1. His primary issue with the custom code was what he was passing into the
function. Parameters!ProgCatCode.value(0) will only give the value at index
0, but Parameters!ProgCatCode.value without the parentethis will pass in the
entire array
2. One way around having to write custom code is to use the Join function.
Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
which might be better in some cases. Your Value might be numeric data and
meaningless to the user, but the Lable you made to display in your drop down
list might be what the user really wants to see.
"Erok" wrote:
> What was it that you figured out. Share it with us.
> EROK
> "gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
> news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> > Figured it out..
> >
> > "gdjoshua" wrote:
> >
> >> I'm trying to display a parameter list of items to a textbox in the
> >> header.
> >> Somehow it never evaluates anything after the first item in the array.
> >> 1st
> >> below is the expression... 2nd is the custom code. I don't know what
> >> I'm
> >> doing wrong...
> >>
> >> 1.
> >> =code.ParameterList(Parameters!ProgCatCode.value(0))
> >>
> >> 2.
> >>
> >> Public Function ParameterList(ByVal Parameter as Object) as String
> >> Dim sParamItem as Object
> >> Dim sParamVal as String = " "
> >> For Each sParamItem in Parameter
> >> If sParamItem Is Nothing then Exit For
> >> sParamVal &= sParamItem & ", "
> >> Next
> >> Return sParamVal
> >> End Function
> >>
>
>|||Rob,
sicne the others did not thank you, I'll say it for them.
THANKS!
"Rob 'Spike' Stevens" wrote:
> I had a similar issue, so I can tell you the things I tried.
> 1. His primary issue with the custom code was what he was passing into the
> function. Parameters!ProgCatCode.value(0) will only give the value at index
> 0, but Parameters!ProgCatCode.value without the parentethis will pass in the
> entire array
> 2. One way around having to write custom code is to use the Join function.
> Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
> Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
> which might be better in some cases. Your Value might be numeric data and
> meaningless to the user, but the Lable you made to display in your drop down
> list might be what the user really wants to see.

Friday, March 9, 2012

displaying error message - no rows returned

Hello,

I have a seach on UserID enetred in a textbox by user.

When the user types a userID which has no data in the database can I display an error msg instead of the chart and table that is displayed on entering a valid userID.

Thanks,

Kiran.

Hi,

For the table there is a property 'NoRows',in this propert you can write the message that is to be displayed when UserID is not matched.

Hope this helps

|||

yes,

Thant worked fine mahima,

appreciate the help..

displaying error message - no rows returned

Hello,

I have a seach on UserID enetred in a textbox by user.

When the user types a userID which has no data in the database can I display an error msg instead of the chart and table that is displayed on entering a valid userID.

Thanks,

Kiran.

Hi,

For the table there is a property 'NoRows',in this propert you can write the message that is to be displayed when UserID is not matched.

Hope this helps

|||

yes,

Thant worked fine mahima,

appreciate the help..

Wednesday, March 7, 2012

Displaying 'ALL' - Multivalue Parameter

Now that the Select All feature is working, I need to be able to display the
text ALL when the end user checks select all (in a textbox that is designed
to show values chosen for the parameter). Is this possible?
I am able to do this when I add an all value to the drop down selection, but
that gives you a value of ALL and a value of Select All. I am certain that
this will confuse the end user.
We need to be able to turn the Select All off.
Thanks!
--
blesrptdevOn Mar 8, 2:02 pm, blesrptdev <blesrpt...@.discussions.microsoft.com>
wrote:
> Now that the Select All feature is working, I need to be able to display the
> text ALL when the end user checks select all (in a textbox that is designed
> to show values chosen for the parameter). Is this possible?
> I am able to do this when I add an all value to the drop down selection, but
> that gives you a value of ALL and a value of Select All. I am certain that
> this will confuse the end user.
> We need to be able to turn the Select All off.
> Thanks!
> --
> blesrptdev
I don't believe that turning 'Select All' off is possible; however,
you can either take a count of the options selected by the user and
compare it to the total possible options in the query and return a
separate field to the report showing that 'Select All' was selected.
Or if you know that the total options will not exceed a certain
quantity, you could use something like the following:
=iif(Parameters!ParameterName.Count > 20, "Select All",
"SomeDefaultText")
Where 20, in this example, is the maximum number of options to select
in the drop-down list box. Sorry I could not be of more assistance.
Regards,
Enrique Martinez
Sr. SQL Server Developer|||Thanks Enrique! This creatively worked.
--
blesrptdev
"EMartinez" wrote:
> On Mar 8, 2:02 pm, blesrptdev <blesrpt...@.discussions.microsoft.com>
> wrote:
> > Now that the Select All feature is working, I need to be able to display the
> > text ALL when the end user checks select all (in a textbox that is designed
> > to show values chosen for the parameter). Is this possible?
> >
> > I am able to do this when I add an all value to the drop down selection, but
> > that gives you a value of ALL and a value of Select All. I am certain that
> > this will confuse the end user.
> >
> > We need to be able to turn the Select All off.
> >
> > Thanks!
> > --
> > blesrptdev
> I don't believe that turning 'Select All' off is possible; however,
> you can either take a count of the options selected by the user and
> compare it to the total possible options in the query and return a
> separate field to the report showing that 'Select All' was selected.
> Or if you know that the total options will not exceed a certain
> quantity, you could use something like the following:
> =iif(Parameters!ParameterName.Count > 20, "Select All",
> "SomeDefaultText")
> Where 20, in this example, is the maximum number of options to select
> in the drop-down list box. Sorry I could not be of more assistance.
> Regards,
> Enrique Martinez
> Sr. SQL Server Developer
>
>

Saturday, February 25, 2012

Display X number of records per page

Hi
I have a report which displays skills per staff, I have placed staff details
in the textbox with a list and also I have placed a table of skills for
grouped by staffid. Basically I need to print out certificates like :
Staff X
--
then skills listed
1.skill A
2.skill B
--
footer which has a signature.
I have got everything working except if any staff has more than 10 skills it
just blows out of the page size and everything goes crazy. My question is how
can I display only 5 skills per page with header and footer and if the skills
exceed more than 5 then create a new page with header and footer and the
remaining skills.
I have used this function in the visibility of the skills table
=iif(rownumber(nothing)>5,False,True) but it just stops displaying anyskills
if the skills exceed more than 5 skills.
Please any advice or direction be most appreciated.
CheersCreate a grouping on the list as follows:
=Ceiling(RowNumber(nothing)/5)
and designate a page break after the group.
This will split the list into 5 per page.
--C17
"shahab" <shahab@.discussions.microsoft.com> wrote in message
news:4C9E5928-5BA9-49D0-B0C7-0F85EF42B927@.microsoft.com...
> Hi
> I have a report which displays skills per staff, I have placed staff
> details
> in the textbox with a list and also I have placed a table of skills for
> grouped by staffid. Basically I need to print out certificates like :
> Staff X
> --
> then skills listed
> 1.skill A
> 2.skill B
> --
> footer which has a signature.
> I have got everything working except if any staff has more than 10 skills
> it
> just blows out of the page size and everything goes crazy. My question is
> how
> can I display only 5 skills per page with header and footer and if the
> skills
> exceed more than 5 then create a new page with header and footer and the
> remaining skills.
> I have used this function in the visibility of the skills table
> =iif(rownumber(nothing)>5,False,True) but it just stops displaying
> anyskills
> if the skills exceed more than 5 skills.
> Please any advice or direction be most appreciated.
> Cheers|||Thank you very much it worked.
merry xmas
"C17" wrote:
> Create a grouping on the list as follows:
> =Ceiling(RowNumber(nothing)/5)
> and designate a page break after the group.
> This will split the list into 5 per page.
> --C17
>
> "shahab" <shahab@.discussions.microsoft.com> wrote in message
> news:4C9E5928-5BA9-49D0-B0C7-0F85EF42B927@.microsoft.com...
> > Hi
> > I have a report which displays skills per staff, I have placed staff
> > details
> > in the textbox with a list and also I have placed a table of skills for
> > grouped by staffid. Basically I need to print out certificates like :
> > Staff X
> > --
> > then skills listed
> > 1.skill A
> > 2.skill B
> > --
> > footer which has a signature.
> > I have got everything working except if any staff has more than 10 skills
> > it
> > just blows out of the page size and everything goes crazy. My question is
> > how
> > can I display only 5 skills per page with header and footer and if the
> > skills
> > exceed more than 5 then create a new page with header and footer and the
> > remaining skills.
> >
> > I have used this function in the visibility of the skills table
> > =iif(rownumber(nothing)>5,False,True) but it just stops displaying
> > anyskills
> > if the skills exceed more than 5 skills.
> > Please any advice or direction be most appreciated.
> > Cheers
>
>

Display textbox on each page of the report

Hi,
I have created a multi-page report. I want to display a text box on each
page of the report. How to do so?
Note that I cannot make the text box as a part of data region (like list).
Its a kind of header information that need to be outputed in each page.
I cannot place the text box in header of the page since it takes value from
a database field. The header doesn't accept database fields.
regards,
Sachin.I think this is a difficult thing to do. One approach is to ensure that a
database field in a textbox is on each page of the report body. You may
then reference the textbox in the headder or footer with the ReportItems!
collection. We have reports that extend multiple pages when exported to PDF
format. I tried making a really tall and narrow textbox and this would work
for the first two pages, but when the matrix at the bottom of the report
grew onto a third page, the third page would not have a textbox and the
reference would be empty.
We took another approach, we passed in the ReportItems collection to a
custom assembly and kept a 'last known good' reference to it. We would then
call this method on each page and retrieve the last known good. I had to
pass in the whole ReportItems collection because passing in just the report
item would result in an #Error for pages that didn't contain the hidden text
box. From what I can tell all references in an expression are resolved
which is why I passed the collection. I think this would also work in code
behind without the custom assembly, but haven't tried it.
Hidden textbox in report body:
txtSchoolNameHidden
=First(Fields!OrganizationName.Value, "GetOrgInfo")
Expression in footer:
=Code.loc.SchoolName(ReportItems)
Code in Custom Assembly (because we are using a property, had to create an
instance, rather than static method)
private string _SchoolName;
public string
SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
input)
{
string ReturnVal = null;
try
{
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
rptItemSchoolNameHidden = null;
rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
if (rptItemSchoolNameHidden != null)
{
_SchoolName = rptItemSchoolNameHidden.Value.ToString();
}
}
catch
{
//ignore report item not found error.
}
return _SchoolName;
}
Seems like a lot of work for something simple. Any other ideas would be
appreciated.
Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF only
the first page has my database field in the footer.
Steve MunLeeuw
"Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
> Hi,
> I have created a multi-page report. I want to display a text box on each
> page of the report. How to do so?
> Note that I cannot make the text box as a part of data region (like list).
> Its a kind of header information that need to be outputed in each page.
> I cannot place the text box in header of the page since it takes value
> from
> a database field. The header doesn't accept database fields.
> regards,
> Sachin.
>|||A text box can't take a database field directly in the header or footer, but
it can take a report parameter. That parameter in turn can be filled with
the value of a field in a dataset.
"Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
> Hi,
> I have created a multi-page report. I want to display a text box on each
> page of the report. How to do so?
> Note that I cannot make the text box as a part of data region (like list).
> Its a kind of header information that need to be outputed in each page.
> I cannot place the text box in header of the page since it takes value
> from
> a database field. The header doesn't accept database fields.
> regards,
> Sachin.
>|||I put a call to a custom assembly in a textbox expression in the footer.
When I appendend a counter for each call I was suprised to find the first
page expression was getting called 6 times, then one additional time for
each page when exported to PDF. I didn't go back and do the comparison for
the browser view with interactive height, and therefore different number of
pages as pdf.
The following code works.
static string _SchoolName;
public string
SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
input)
{
string ReturnVal = null;
try
{
Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
rptItemSchoolNameHidden = null;
rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
if (rptItemSchoolNameHidden != null)
{
if (rptItemSchoolNameHidden.Value.ToString().Length > 0)
{
_SchoolName = rptItemSchoolNameHidden.Value.ToString();
}
}
}
catch
{
//ignore report item not found error.
}
return _SchoolName;
}
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:ORGfb5LNGHA.2300@.TK2MSFTNGP15.phx.gbl...
>I think this is a difficult thing to do. One approach is to ensure that a
>database field in a textbox is on each page of the report body. You may
>then reference the textbox in the headder or footer with the ReportItems!
>collection. We have reports that extend multiple pages when exported to
>PDF format. I tried making a really tall and narrow textbox and this would
>work for the first two pages, but when the matrix at the bottom of the
>report grew onto a third page, the third page would not have a textbox and
>the reference would be empty.
> We took another approach, we passed in the ReportItems collection to a
> custom assembly and kept a 'last known good' reference to it. We would
> then call this method on each page and retrieve the last known good. I
> had to pass in the whole ReportItems collection because passing in just
> the report item would result in an #Error for pages that didn't contain
> the hidden text box. From what I can tell all references in an expression
> are resolved which is why I passed the collection. I think this would
> also work in code behind without the custom assembly, but haven't tried
> it.
> Hidden textbox in report body:
> txtSchoolNameHidden
> =First(Fields!OrganizationName.Value, "GetOrgInfo")
> Expression in footer:
> =Code.loc.SchoolName(ReportItems)
>
> Code in Custom Assembly (because we are using a property, had to create an
> instance, rather than static method)
> private string _SchoolName;
> public string
> SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
> input)
> {
> string ReturnVal = null;
> try
> {
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
> rptItemSchoolNameHidden = null;
> rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
> if (rptItemSchoolNameHidden != null)
> {
> _SchoolName = rptItemSchoolNameHidden.Value.ToString();
> }
> }
> catch
> {
> //ignore report item not found error.
> }
> return _SchoolName;
> }
>
> Seems like a lot of work for something simple. Any other ideas would be
> appreciated.
> Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF
> only the first page has my database field in the footer.
>
>
> Steve MunLeeuw
>
>
> "Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
> news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
>> Hi,
>> I have created a multi-page report. I want to display a text box on each
>> page of the report. How to do so?
>> Note that I cannot make the text box as a part of data region (like
>> list).
>> Its a kind of header information that need to be outputed in each page.
>> I cannot place the text box in header of the page since it takes value
>> from
>> a database field. The header doesn't accept database fields.
>> regards,
>> Sachin.
>|||The parameter technique is better, I will use that.
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:ORGfb5LNGHA.2300@.TK2MSFTNGP15.phx.gbl...
>I think this is a difficult thing to do. One approach is to ensure that a
>database field in a textbox is on each page of the report body. You may
>then reference the textbox in the headder or footer with the ReportItems!
>collection. We have reports that extend multiple pages when exported to
>PDF format. I tried making a really tall and narrow textbox and this would
>work for the first two pages, but when the matrix at the bottom of the
>report grew onto a third page, the third page would not have a textbox and
>the reference would be empty.
> We took another approach, we passed in the ReportItems collection to a
> custom assembly and kept a 'last known good' reference to it. We would
> then call this method on each page and retrieve the last known good. I
> had to pass in the whole ReportItems collection because passing in just
> the report item would result in an #Error for pages that didn't contain
> the hidden text box. From what I can tell all references in an expression
> are resolved which is why I passed the collection. I think this would
> also work in code behind without the custom assembly, but haven't tried
> it.
> Hidden textbox in report body:
> txtSchoolNameHidden
> =First(Fields!OrganizationName.Value, "GetOrgInfo")
> Expression in footer:
> =Code.loc.SchoolName(ReportItems)
>
> Code in Custom Assembly (because we are using a property, had to create an
> instance, rather than static method)
> private string _SchoolName;
> public string
> SchoolName(Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItems
> input)
> {
> string ReturnVal = null;
> try
> {
> Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.ReportItem
> rptItemSchoolNameHidden = null;
> rptItemSchoolNameHidden = input["txtSchoolNameHidden"];
> if (rptItemSchoolNameHidden != null)
> {
> _SchoolName = rptItemSchoolNameHidden.Value.ToString();
> }
> }
> catch
> {
> //ignore report item not found error.
> }
> return _SchoolName;
> }
>
> Seems like a lot of work for something simple. Any other ideas would be
> appreciated.
> Aaarrrghhh! Runs fine in SSRS2005 web window, when I export it to PDF
> only the first page has my database field in the footer.
>
>
> Steve MunLeeuw
>
>
> "Sachin Laddha" <SachinLaddha@.discussions.microsoft.com> wrote in message
> news:6866232F-21F1-42BB-A593-FCD33A2BE344@.microsoft.com...
>> Hi,
>> I have created a multi-page report. I want to display a text box on each
>> page of the report. How to do so?
>> Note that I cannot make the text box as a part of data region (like
>> list).
>> Its a kind of header information that need to be outputed in each page.
>> I cannot place the text box in header of the page since it takes value
>> from
>> a database field. The header doesn't accept database fields.
>> regards,
>> Sachin.
>

Friday, February 24, 2012

Display selected multivalue parameters

I would like to display the selections made for a parameter in a multi select dropdown.

If i do as following for a textbox..doesnt work.

=Parameters!STORELOCATION.Label.ToString

I would like the labels to be displayed as below.

Report is for the following stores: abc, xyz

Pls help!

Use this expression...

=Join(Parameters!Storelocation.label, ", ")

|||Thank you !! This works..

Display selected multivalue parameters

I would like to display the selections made for a parameter in a multi select dropdown.

If i do as following for a textbox..doesnt work.

=Parameters!STORELOCATION.Label.ToString

I would like the labels to be displayed as below.

Report is for the following stores: abc, xyz

Pls help!

Use this expression...

=Join(Parameters!Storelocation.label, ", ")

|||Thank you !! This works..

Display return value from sqldatasource in textbox

Hi,


I wonder is there anyway I can put the returned value from SELECT statement from sqldatasource into a textbox.

I have a simple select statement in a sqldatasource:


SELECT X, Y, Z FROM tablexyz


So, I want the value from X, Y, Z to be displayed in 3 different textboxes. How do I do it? I am able to do it using datareader from code-behind, but I just want to know how to make use of the sqldatasource to make the whole things work.


Thanks

You could use either a gridview or a detailveiw to do that, and strip out all of the headers and footers.

I would have thought it would be easier to just use the datareader and some text boxes, I guess it depends on what you are trying to achieve.

HTH

Sunday, February 19, 2012

Display Report AUTHOR and DESCRIPTION

What is the syntax to display the report property
fields within a textbox on the report header ?These properties are not exposed in the Report Object Model (which is
accessible from expressions within a report).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> What is the syntax to display the report property
> fields within a textbox on the report header ?|||"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> These properties are not exposed in the Report Object Model (which is
> accessible from expressions within a report).
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Dave" <davidldoyle@.yahoo.com> wrote in message
> news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > What is the syntax to display the report property
> > fields within a textbox on the report header ?
I did not understand your reply in parenthesis....Do you mean
properties are not available, or that they are within expressions
within a report.
Thank you.|||The author and description properties are not available to textboxes. Your
choices are to either hard code the values into a textbox(es) or to add the
information to a table and pull it into the report using a dataset.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.|||I meant that expressions in reports can only access information and metadata
that is exposed in the Report Object Model. This object model contains the
following collections: Fields, Reportitems, Parameters, Globals, User.
The properties for Author and Description are not exposed there. So you
cannot access them.
BTW: these properties are exposed in the Rendering Object Model, but you
would need to write your own custom rendering extension to take advantage of
that and it would still be very hard to solve your initial problem (show
these properties in header / footer).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.

Display Parameters/Global variables

I am trying to display this in TextBox in the Footer:
This is Page =Globals!PageNumber
However, it doesn't work. It only works if I remove the "This is Page". Is
there any way so that I can use one text box to display both my text and the
variable?
Thanks.You have to use string concatenation:
="This is Page " & Globals!PageNumber
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Zean Smith" <nospam@.nospamaaamail.com> wrote in message
news:ZvOdneXAJd3bEqTeRVn-iw@.rogers.com...
>I am trying to display this in TextBox in the Footer:
> This is Page =Globals!PageNumber
> However, it doesn't work. It only works if I remove the "This is Page".
> Is
> there any way so that I can use one text box to display both my text and
> the
> variable?
> Thanks.
>
>

Friday, February 17, 2012

display multi value parameters in textbox

Hello,

I have the following problem.

i have a report where you need to fill in a few parameters

start date, end date and subject selection.

the subject selection is a multivalue paramter (select all, param1, param2, param3)

the multivalue parameter is based on another dataset with paramid as value field and paramdescription as value label.

in my report i want to display something like this :

from startdate to enddate

summary for campaign(s) : selected parameters.

in the selected parameters is can display a =join(Parameter!campaig.value) but this only returns the 32bit guid.

instead i would like it to display the parameterdescription label.

anybody has some ideas ?

greetings

vince

Hi Vince,

I think using the expression =Join(Parameters!campaign.Label) should give you the desired result.

-Aayush

display HTML from a text datatype textbox

I have a textbox in a report defined with a text field from our database that
has HTML in it.
How can I get this to display in HTML format in the report?
StephanieOn Dec 12, 11:29 am, Stephanie <Stepha...@.discussions.microsoft.com>
wrote:
> I have a textbox in a report defined with a text field from our database that
> has HTML in it.
> How can I get this to display in HTML format in the report?
> Stephanie
Can't be done with vanilla Reporting Services 2005. The report
renderer converts all Field data to > and < commands.
You will either have to design your own Custom Control, find one to
purchase out there (I haven't had luck), or go towards ASP or ASP.NET
to dump the query's results into the HTML stream.
-- Scott

Tuesday, February 14, 2012

Display first record occurance in textbox in RB

Dear Anyone,

I would like to display the first occurance of a record as a text box outside that of the report. I would like to do this in Report Builder. Is this possible?

Thanks,
Joseph

Try:

Use an expression like

= First(Fields!FieldName.Value, "DataSet1")

where field name = the mane of your record field; and DataSet1 is your dataset name.|||

It doesnt seem to work. I'm using this on a new textbox in RB. Am I doing it wrong?

|||Heres the error that gets displayed:

The Value expression for the textbox ‘textbox’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set. (rsInvalidAggregateScope)|||If you just want the dataset scope, leave out the second parameter:

= First(Fields!FieldName.Value)

RB doesn't expose the RDL field names directly, so you'll have to guess that part. It's usually equal to or a predictable variant of the text in the column header.

Display first record occurance in textbox in RB

Dear Anyone,

I would like to display the first occurance of a record as a text box outside that of the report. I would like to do this in Report Builder. Is this possible?

Thanks,
Joseph

Try:

Use an expression like

= First(Fields!FieldName.Value, "DataSet1")

where field name = the mane of your record field; and DataSet1 is your dataset name.|||

It doesnt seem to work. I'm using this on a new textbox in RB. Am I doing it wrong?

|||Heres the error that gets displayed:

The Value expression for the textbox ‘textbox’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set. (rsInvalidAggregateScope)|||If you just want the dataset scope, leave out the second parameter:

= First(Fields!FieldName.Value)

RB doesn't expose the RDL field names directly, so you'll have to guess that part. It's usually equal to or a predictable variant of the text in the column header.

display error

in the report desingner textbox cant display the value like this. what is the error. those are multivalues.

=CStr(Parameters!BU.Value)

A mutli-valued parameter is represented as an array of values, so if you want the first value:

=CStr(Parameters!BU.Value(0))|||result is [acc code].[bu].&[1] but i need to get the real value like bu1, bu2 etc:
|||

From the sounds of it you are using reporting services - If so I think you need to use:

Parameters!BU.Label

No need fo cstr either

HTH

|||that give some error.
|||

How about:

Parameters!BU.Label(0)

|||found the answer: JOIN(Parameters!BU.Label,",")