Showing posts with label footer. Show all posts
Showing posts with label footer. Show all posts

Monday, March 26, 2012

ReportViewer -- how to translate header values

Hi Everyone,

Can anyone tell me how to use my resx files to translate the header and footer values in a ReportViewer Report (rdlc file)? I'm missing something here!

Thanks,

jekerry

Hi, jekerry:

Do you need to localize the Reports in the Reporting service. If so, i just recommend you to use this following tech to achieve this:

As localization is not a built-in feature for Reporting Services, people have tried a a variety of techniques for localizing reports. One technique is to use the LocID propertie to create a version of the RDL in each language. Another approach is to have a single report and create a custom assembly to load the strings for each label. Here is an relatively easy technique for providing localized reports using hidden parameters.

First, you will need to create a table to hold the translations. The following T-SQL will create the table and add a few labels for translating the Product Line Sales sample that is included with the product.

http://blogs.msdn.com/bwelcker/archive/2007/07/11/laser-guided-missiles-report-localization-through-parameters.aspx

http://blogs.msdn.com/bimusings/archive/2007/01/11/happiness-is-automatic-sql-reporting-services-localization.aspx


If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

|||

Thank you so much! How depressing!!! Why would they add a new control without localization support?? I am very depressed. That is a very ugly work around. Maybe I will look into Crystal Reports.

thanks,

jekerry

|||

Woo hoo! I found a way to use my resx files!!!!!!!!!!!!!!!!!! I can now change the column headers automatically to any language. Very cool. Just add a second datatable, fill it with the header values, and reference them.

One problem solved!

jekerry

Friday, March 9, 2012

ReportItems!

Is there any documentation on the reportitems! collection?
Something with some examples?
I am trying to total group totals in a table/group footer and it is
saying it needs to be in the right datasource.
Thanks, Leohttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSRDL/htm/rsp_ref_rdl_elements_ae_4ak3.asp
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
<cte25117@.centurytel.net> schrieb im Newsbeitrag
news:uPGdnfM9NOkyt_DfRVn-rQ@.centurytel.net...
> Is there any documentation on the reportitems! collection?
> Something with some examples?
> I am trying to total group totals in a table/group footer and it is saying
> it needs to be in the right datasource.
> Thanks, Leo|||Jens Süßmeyer wrote:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSRDL/htm/rsp_ref_rdl_elements_ae_4ak3.asp
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> <cte25117@.centurytel.net> schrieb im Newsbeitrag
> news:uPGdnfM9NOkyt_DfRVn-rQ@.centurytel.net...
>>Is there any documentation on the reportitems! collection?
>>Jens,
Thank you for your response. I have read this but this documentation is
not very good. I need some examples.
I am trying to total values that are totaled in a group header.
This is what I use in the header to get the total:
=Sum(CDEC(IIF( IIF( Fields!QuotedPrice.Value > 0.00,
Fields!QuotedPrice.Value, Fields!DesignPrice.Value) > 0.00,IIF(
Fields!QuotedPrice.Value > 0.00, Fields!QuotedPrice.Value,
Fields!DesignPrice.Value)
,0.00)))
But If I use the in the table footer I get double or even triple values.
I need to sum the values in the text box.
Thanks, Leo
>>Something with some examples?
>>I am trying to total group totals in a table/group footer and it is saying
>>it needs to be in the right datasource.
>>Thanks, Leo
>
>|||Jens Süßmeyer wrote:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSRDL/htm/rsp_ref_rdl_elements_ae_4ak3.asp
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> <cte25117@.centurytel.net> schrieb im Newsbeitrag
> news:uPGdnfM9NOkyt_DfRVn-rQ@.centurytel.net...
>>Is there any documentation on the reportitems! collection?
>>Jens,
Thank you for your response. I have read this but this documentation is
not very good. I need some examples.
I am trying to total values that are totaled in a group header.
This is what I use in the header to get the total:
=Sum(CDEC(IIF( IIF( Fields!QuotedPrice.Value > 0.00,
Fields!QuotedPrice.Value, Fields!DesignPrice.Value) > 0.00,IIF(
Fields!QuotedPrice.Value > 0.00, Fields!QuotedPrice.Value,
Fields!DesignPrice.Value)
,0.00)))
But If I use the in the table footer I get double or even triple values.
I need to sum the values in the text box.
Thanks, Leo
>>Something with some examples?
>>I am trying to total group totals in a table/group footer and it is saying
>>it needs to be in the right datasource.
>>Thanks, Leo
>
>|||Jens Süßmeyer wrote:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSRDL/htm/rsp_ref_rdl_elements_ae_4ak3.asp
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> <cte25117@.centurytel.net> schrieb im Newsbeitrag
> news:uPGdnfM9NOkyt_DfRVn-rQ@.centurytel.net...
>>Is there any documentation on the reportitems! collection?
>>Jens,
Thank you for your response. I have read this but this documentation is
not very good. I need some examples.
I am trying to total values that are totaled in a group header.
This is what I use in the header to get the total:
=Sum(CDEC(IIF( IIF( Fields!QuotedPrice.Value > 0.00,
Fields!QuotedPrice.Value, Fields!DesignPrice.Value) > 0.00,IIF(
Fields!QuotedPrice.Value > 0.00, Fields!QuotedPrice.Value,
Fields!DesignPrice.Value)
,0.00)))
But If I use the in the table footer I get double or even triple values.
I need to sum the values in the text box.
Thanks, Leo
>>Something with some examples?
>>I am trying to total group totals in a table/group footer and it is saying
>>it needs to be in the right datasource.
>>Thanks, Leo
>
>|||Jens Süßmeyer wrote:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSRDL/htm/rsp_ref_rdl_elements_ae_4ak3.asp
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> <cte25117@.centurytel.net> schrieb im Newsbeitrag
> news:uPGdnfM9NOkyt_DfRVn-rQ@.centurytel.net...
>>Is there any documentation on the reportitems! collection?
>>Jens,
Thank you for your response. I have read this but this documentation is
not very good. I need some examples.
I am trying to total values that are totaled in a group header.
This is what I use in the header to get the total:
=Sum(CDEC(IIF( IIF( Fields!QuotedPrice.Value > 0.00,
Fields!QuotedPrice.Value, Fields!DesignPrice.Value) > 0.00,IIF(
Fields!QuotedPrice.Value > 0.00, Fields!QuotedPrice.Value,
Fields!DesignPrice.Value)
,0.00)))
But If I use the in the table footer I get double or even triple values.
I need to sum the values in the text box.
Thanks, Leo
>>Something with some examples?
>>I am trying to total group totals in a table/group footer and it is saying
>>it needs to be in the right datasource.
>>Thanks, Leo
>
>

ReportItems in Page Footer

I have several text boxes in the page footer of my report, which reference
various ReportItems. The values are displayed correctly when previewing the
report. However, when I print the report the values are not printed. All of
the other textboxes which contain static information is printing correctly,
so it has something to do with the ReportItems.
Has anyone seen this problem before?Rendering extensions treat report items in the header and footer
differently. The HTML rendering extension seems to have no problem at all
with exposing values in textboxes that somehow reference values in a
dataset. I've had similar problems with PDF rendered reports where the data
showed up in the HTML rendered report but didn't show up in the PDF rendered
version. As a rule, stay away from placing databound data in the header or
footer. You can work around this through diligent use of rectangles and
repeating sections in the body of the report.
-Tim
"Jen Torres" <Jen Torres@.discussions.microsoft.com> wrote in message
news:7B2B4BF4-99F5-42E9-B2B5-9090174290EC@.microsoft.com...
>I have several text boxes in the page footer of my report, which reference
> various ReportItems. The values are displayed correctly when previewing
> the
> report. However, when I print the report the values are not printed. All
> of
> the other textboxes which contain static information is printing
> correctly,
> so it has something to do with the ReportItems.
> Has anyone seen this problem before?

ReportItems in my footer

I am having a problem viewing my footer on all pages of my report. I have created a page footer that reads
="The " & ReportItems("textbox213").Value
I am getting the value on the first page only and then only getting "The" on the rest.
My "PrintOnFirstPage" and "PrintOnLastPage" are both marked True in the Page Footer properties. I am completely confused. This is not the only textbox in my footer I have two others both which print on all pages, but neither of them use the ReportItems.

Can anyone help on this?

Thanks....Cin

You could try storing the value in a global variable, and then retrieving from the variable...

in the code, something like:

global mystr as string

public function setvar()

mystr = ReportItems("textbox213").Value

end function

public function getvar() as string

return mystr

end function

In the top of the report after textbox213 is populated, dump a hidden textbox with this value.

=Code.setvar()

And then in the footer...

="The " & Code.getvar()

Have not tested this but a used something similar when I had to get a list of values and retrieve them in a different part of the report.

cheers,

Andrew

|||

I used your example to the "T" and I am receiving some errors. When I use the line
mystr = ReportItems("textbox213").Value

the report cannot build, throwing the errors as follows:

[rsCompilerErrorInCode] There is an error on line 2 of custom code: [BC42021] Function without an 'As' clause; return type of Object assumed.
[rsCompilerErrorInCode] There is an error on line 7 of custom code: [BC30469] Reference to a non-shared member requires an object reference.
Build complete -- 1 errors, 1 warnings


It doesn't look like ReportItems is the right method call, and I can't find any documentation for the available objects and/or methods from the code window. Can you supply your exact code for me to look at and/or a link to a good reference for objects to use? (Something with code examples would be super... as Wrox's Pro SQL Server 2005 Reporting Services only has simple code that doesn't reference the object model.)

If you can think of anything that would help that would be great!

Thanks-Cin

|||

Hi there,

Apologies... I pulled that code out of my head. Guess I am a bit rusty.

The errors above would indicate you need to specify "public shared function setvar() as object" and public shared function getvar() as string.

You may need to pass in the ReportItems to the setvar function... something like...

public shared function setvar(byval passedinreportitem as string) as object

mystr = passedinreportitem

end function

public shared function getvar() as string

return mystr

end function

In the top of the report after textbox213 is populated, dump a hidden textbox with this value.

=Code.setvar(ReportItems("textbox213").Value)

And then in the footer...

="The " & Code.getvar()

Here are some additional references to code behind that I could find...

http://www.odetocode.com/Articles/130.aspx

and here

http://www.deeptraining.com/litwin/Litwin_SQLReportingSrvcs.pdf

and here

http://blogs.msdn.com/swisowaty/attachment/661446.ashx - lots of goodies.

Lots of examples searching the forums for =Code too.

Hope this helps.

cheers,

Andrew

ReportItems in Header/Footer

Hi there,
probably the most common problem with srs: how to insert data fields in page
header or footer?
The described workaround to reference ReportItems in the body does not work
for me, don´t know why.
Here is what I did:
I have a footer that must display fields from a query.
I placed a textbox named textbox1 in the body with a value of
=First(Fields!Field123.Value
I added a textbox in the footer with a value of =ReportItems!textbox1
When I render the report the textbox in the body contains the data as
expected, but the textbox in the footer is just empty. No Errors, no
warnings!
I use SQL2000 SP4 with Reporting Services SP2.
Any suggestions are highly appreciated :)
greetinx,
Joerg KrummTry:
=ReportItems!textbox1.value
"Jörg Krumm" <jeykey-news@.justmail.de> wrote in message
news:e5MI%23WiCHHA.4016@.TK2MSFTNGP02.phx.gbl...
> Hi there,
> probably the most common problem with srs: how to insert data fields in
> page header or footer?
> The described workaround to reference ReportItems in the body does not
> work for me, don´t know why.
> Here is what I did:
> I have a footer that must display fields from a query.
> I placed a textbox named textbox1 in the body with a value of
> =First(Fields!Field123.Value
> I added a textbox in the footer with a value of =ReportItems!textbox1
> When I render the report the textbox in the body contains the data as
> expected, but the textbox in the footer is just empty. No Errors, no
> warnings!
> I use SQL2000 SP4 with Reporting Services SP2.
> Any suggestions are highly appreciated :)
> greetinx,
> Joerg Krumm
>|||Hi Chris,
thanks for your hint. I do have a value of =ReportItems!textbox1.value . I
just made a mistake in the posting :)
Joerg
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> schrieb im
Newsbeitrag news:%23fEyGglCHHA.3476@.TK2MSFTNGP04.phx.gbl...
> Try:
> =ReportItems!textbox1.value
>
> "Jörg Krumm" <jeykey-news@.justmail.de> wrote in message
> news:e5MI%23WiCHHA.4016@.TK2MSFTNGP02.phx.gbl...
>> Hi there,
>> probably the most common problem with srs: how to insert data fields in
>> page header or footer?
>> The described workaround to reference ReportItems in the body does not
>> work for me, don´t know why.
>> Here is what I did:
>> I have a footer that must display fields from a query.
>> I placed a textbox named textbox1 in the body with a value of
>> =First(Fields!Field123.Value
>> I added a textbox in the footer with a value of =ReportItems!textbox1
>> When I render the report the textbox in the body contains the data as
>> expected, but the textbox in the footer is just empty. No Errors, no
>> warnings!
>> I use SQL2000 SP4 with Reporting Services SP2.
>> Any suggestions are highly appreciated :)
>> greetinx,
>> Joerg Krumm
>|||You could create a report parameter, probably internal, and have its value be
the data field. Then you can put that parameter in the header.
Carmine
"Jörg Krumm" wrote:
> Hi Chris,
> thanks for your hint. I do have a value of =ReportItems!textbox1.value . I
> just made a mistake in the posting :)
> Joerg
> "Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> schrieb im
> Newsbeitrag news:%23fEyGglCHHA.3476@.TK2MSFTNGP04.phx.gbl...
> > Try:
> > =ReportItems!textbox1.value
> >
> >
> > "Jörg Krumm" <jeykey-news@.justmail.de> wrote in message
> > news:e5MI%23WiCHHA.4016@.TK2MSFTNGP02.phx.gbl...
> >> Hi there,
> >>
> >> probably the most common problem with srs: how to insert data fields in
> >> page header or footer?
> >>
> >> The described workaround to reference ReportItems in the body does not
> >> work for me, don´t know why.
> >>
> >> Here is what I did:
> >>
> >> I have a footer that must display fields from a query.
> >> I placed a textbox named textbox1 in the body with a value of
> >> =First(Fields!Field123.Value
> >> I added a textbox in the footer with a value of =ReportItems!textbox1
> >>
> >> When I render the report the textbox in the body contains the data as
> >> expected, but the textbox in the footer is just empty. No Errors, no
> >> warnings!
> >>
> >> I use SQL2000 SP4 with Reporting Services SP2.
> >>
> >> Any suggestions are highly appreciated :)
> >>
> >> greetinx,
> >>
> >> Joerg Krumm
> >>
> >
> >
>
>

Wednesday, March 7, 2012

ReportItem aggregate

I have some data grouped with by a number, On the group footer I have the
sum(col1) and sum(col2) displayed in textbox1, textbox2 etc.
Additionally I need to include sum(col1) - sum(col2) in textbox3.
When I tried to use (ReportItems!textbox1.value) -
(ReportItems!textbox2.value)
It gived an error "Report item expressions can only refer to other report
items within the same grouping scope or a containing grouping scope."
Any advice is welcome.
Thanks.This is probably because textbox3 is in an outer scope (containing grouping
or the table). When the report is processed, you'd get multiple instances of
a group. In an outer scope, we can't determine which inner group instance we
should get the textbox value from. Is this the case in your report?
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ni" <Ni@.discussions.microsoft.com> wrote in message
news:EEA615B0-5283-425D-AA32-81E20F460904@.microsoft.com...
>I have some data grouped with by a number, On the group footer I have the
> sum(col1) and sum(col2) displayed in textbox1, textbox2 etc.
> Additionally I need to include sum(col1) - sum(col2) in textbox3.
> When I tried to use (ReportItems!textbox1.value) -
> (ReportItems!textbox2.value)
> It gived an error "Report item expressions can only refer to other report
> items within the same grouping scope or a containing grouping scope."
> Any advice is welcome.
> Thanks.