Showing posts with label values. Show all posts
Showing posts with label values. 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

Wednesday, March 21, 2012

ReportSelectionFormula To bring Null Values

Hello

Can anyone help me how to View the CR with ReportSelectionFormula with Particular field having Null Values

I have written like this

rpt1.RecordSelectionFormula = "{Dpled.Match} IS NULL"

or

rpt1.RecordSelectionFormula = "{Dpled.Match}='' "

but it gives blank reportUse isnull() function

rpt1.RecordSelectionFormula = isnull({Dpled.Match})

it will report only those records which has match field as null|||I tried out this

rpt1.RecordSelectionFormula = " IsNull({Dpled.Match})"

Still did not work out to bring Report with Null Values|||try this

rpt1.RecordSelectionFormula = " if IsNull({Dpled.Match}) then true"

Tuesday, March 20, 2012

Reports running automatically when all parameters had default values

If all the parameters for a report have default values, the report runs automatically as soon as you open it. Is there a way to prevent this?

Hi,

For the parameters set the default value to null.

Hope this helps.

|||

The point is that I WANT to provide defaults for all parameters but I DON'T want the report to run automatically.

|||

Hi,

you are asking this in client side or in Report Manager.

|||I am refering to running the reports from the client, that is when connection to http://mycomputer/reports using IE.|||

Hi,

Remove the default values of the parameters in the report or in Report Manager.Set the default values for parameters in Stored procedures.

|||

Thanks,

Will give that a try.

Do the default values still show up in the Reporting Services client? I guess I will find out when I test it.

There is another issue with this solution, I am using a table valued function that is part of a standard package so I can't edit it. I might set up a wrapper stored procedure.

Dick Campbell

Friday, March 9, 2012

ReportParameter.ValidValues

I have been assigned to create a new report subscription form. I have
done everything but prompt the user for values. So there are a bunch
of reports with varied parameters. Some of these parameters are
hard-coded lists and others are DataSetReference. How do I provide the
subscriber with an accurate list of valid values?
I was thinking something like:
ReportParameters[0].reportParameter.ValidValues
but that comes back null.
I tried reportService.GetReportParameters(report, historyID,
forRendering, values, credentials)
Values comes back null.
Please help!
Thank you!
--Larry--"values" in GetReportParameters is used to validate parameter values.
Actual parameters are returned by GetReportParameters.
You can try something like this:
ReportParameter [ ] rp = reportService.GetReportParameters(report,
forRendering, historyID, null, credentials);
rp[0].ValidValues should contain valid values.
This posting is provided "AS IS" with no warranties, and confers no rights.
<lfarrell@.setfocus.com> wrote in message
news:1105590508.069271.235070@.c13g2000cwb.googlegroups.com...
>I have been assigned to create a new report subscription form. I have
> done everything but prompt the user for values. So there are a bunch
> of reports with varied parameters. Some of these parameters are
> hard-coded lists and others are DataSetReference. How do I provide the
> subscriber with an accurate list of valid values?
> I was thinking something like:
> ReportParameters[0].reportParameter.ValidValues
> but that comes back null.
> I tried reportService.GetReportParameters(report, historyID,
> forRendering, values, credentials)
> Values comes back null.
> Please help!
> Thank you!
> --Larry--
>|||Thank you, but that didn't work,
The ValidValues is <undefined value>
I used the following code:
ValidValue[] vv = new ValidValue[0];
parameters = server.GetReportParameters(thisfolder, null, false,
Paramvalues, Paramcredentials);
if (parameters.Length != 0)
{
vv = parameters[0].ValidValues;
}
when I look at parameter[0] (and 1 as well) I have ValidValues
<undefined value>
CalidValuesQueryBased = true
ValidValuesQueryBasedSpecified = true|||Thank you, but that didn't work,
The ValidValues is <undefined value>
I used the following code:
ValidValue[] vv = new ValidValue[0];
parameters = server.GetReportParameters(thisfolder, null, false,
Paramvalues, Paramcredentials);
if (parameters.Length != 0)
{
vv = parameters[0].ValidValues;
}
when I look at parameter[0] (and 1 as well) I have ValidValues
<undefined value>
CalidValuesQueryBased = true
ValidValuesQueryBasedSpecified = true|||Thanks to Daniel Dieb, I fixed my problem. He commented on a similar
post:
If ForRendering has a value of false, the parameter meta data returned
represents the parameter data that is currently associated with the
specified report. If any parameters values are based on a query and you
are
interested in returning the query-based parameters valid values list,
you
need to set ForRendering to true, In addition, for query based
parameters,
you need to ensure that you have passed in all of the credential
information
required to return the query parameters.
I set this parm to true and got my values!!

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?

Wednesday, March 7, 2012

ReportItem values are not printing in header

I am using the following inorder to get dataset fields into my header:
=First(ReportItems("EmpName").Value)
The data is returned when I run the report and I can see the values when a
client runs it to their screen. But when I go to print or print-preview the
data in the header is not there (all the data in the report is ok).
--
Systems AnalystTry =ReportItems!EmpName.Value
"schmidtkaren" wrote:
> I am using the following inorder to get dataset fields into my header:
> =First(ReportItems("EmpName").Value)
> The data is returned when I run the report and I can see the values when a
> client runs it to their screen. But when I go to print or print-preview the
> data in the header is not there (all the data in the report is ok).
> --
> Systems Analyst

ReportingWeekToMonthPattern possible values

Hi, I'm working with a server Time dimension which one of it's many purposes is to provide sales analysis by Reporting week. I'm using the property ReportingWeekToMonthPattern to divide the months in weeks but none of the default values is good to me {4-4-5 | 4-5-4 | 544}. According to the business rules, the pattern is not that regular and instead, I need this exact pattern that includes the 12 months of the year:

4-4-5-4-4-5-4-5-4-4-5-4

That is, the first half of the year with a 4-4-5 pattern, and the second half with a 4-5-4 pattern. Is this possible to set in the dimension?

Thanks in advance,

RAH

I don't think you can do this using a server time dimension. You would probably need to create a dimension table and build your time dimension off it. That way you can do pretty much anything you like.

ReportingService.Render

I have some reports with parameters that use queried default values.
I am using them as a workaround to get data from the dataset into the page
header.
They work just fine when I call the report from the SQL Server Reporting
Services web interface. I am having trouble getting them to work when I
call them from the SOAP service.
When I call the ReportingService.Render do I need to pass in the parameter
that is supposed to get its data from the dataset? If I don't, the
ReportingService.Render method throws an exception that says:
This report requires a default or user-defined value for the report
parameter 'pActDesc'. To run or subscribe to this report, you must provide a
parameter value. --> This report requires a default or user-defined value
for the report parameter 'pActDesc'. To run or subscribe to this report, you
must provide a parameter value. --> This report requires a default or
user-defined value for the report parameter 'pActDesc'. To run or subscribe
to this report, you must provide a parameter value.
Is there some special combination of settings I need to use?
Here is an example of the report parameter definition:
<ReportParameter Name="pActDesc">
<DataType>String</DataType>
<Nullable>true</Nullable>
<DefaultValue>
<DataSetReference>
<DataSetName>DataSet1</DataSetName>
<ValueField>ActDesc</ValueField>
</DataSetReference>
</DefaultValue>
<AllowBlank>true</AllowBlank>
</ReportParameter>
Thank you very much for your help!
PaulYou must specify the report parameters when you call the Render method. This
is the fifth argument of the method.
if you have two parameters, for example TerritoryID and Country you can do:
dim paramvalues(1) as ParameterValue
paramvalues(0) = new ParameterValue
paramvalues(0).Name = "TerritoryID"
paramvalues(0).Value = "EMEA"
paramvalues(1) = new ParameterValue
paramvalues(1).Name = "Country"
paramvalues(1).Value = "Germany"
and then you use the array paramvalues as your fifth argument to the Render
method. The error method you are getting is the error method you are supposed
to get if you try to render a report which has parameters without specifying
the parameters.
HTH
Charles Kangai, MCT, MCDBA
"Paul" wrote:
> I have some reports with parameters that use queried default values.
> I am using them as a workaround to get data from the dataset into the page
> header.
> They work just fine when I call the report from the SQL Server Reporting
> Services web interface. I am having trouble getting them to work when I
> call them from the SOAP service.
> When I call the ReportingService.Render do I need to pass in the parameter
> that is supposed to get its data from the dataset? If I don't, the
> ReportingService.Render method throws an exception that says:
> This report requires a default or user-defined value for the report
> parameter 'pActDesc'. To run or subscribe to this report, you must provide a
> parameter value. --> This report requires a default or user-defined value
> for the report parameter 'pActDesc'. To run or subscribe to this report, you
> must provide a parameter value. --> This report requires a default or
> user-defined value for the report parameter 'pActDesc'. To run or subscribe
> to this report, you must provide a parameter value.
> Is there some special combination of settings I need to use?
> Here is an example of the report parameter definition:
> <ReportParameter Name="pActDesc">
> <DataType>String</DataType>
> <Nullable>true</Nullable>
> <DefaultValue>
> <DataSetReference>
> <DataSetName>DataSet1</DataSetName>
> <ValueField>ActDesc</ValueField>
> </DataSetReference>
> </DefaultValue>
> <AllowBlank>true</AllowBlank>
> </ReportParameter>
> Thank you very much for your help!
> Paul
>
>

Saturday, February 25, 2012

Reporting, Visual Studio, layout level, median function

I'd like to calculate the median of a set of values, ie: 1,2,2,2,5 would have
a median of 2.
I've been able to get the average using
sum(fields!1.value)/count(fields!1.value) or Avg(fields!1.value).
How can the median be found using either a function or a math formula?
Thanks,
JimI have no clue if this would work, but it might be worth a try... add a new
text column ( and maybe hide it)...
It's value is
=IIF(rownumber(nothring)=Count(Fields!1,Value),Fields!Fieldname.Value,0)
So the value of this field will be 0 for all rows except the middle row,
which will have the value of the OTHER column with values ... Of course this
only would work if the OTHER column is sorted, and you'd have to account for
an even/odd number of rows...
But then you sum this column in your aggregate row, which would be the
median value...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:440D1DAE-8C20-41D5-819D-C193254626F4@.microsoft.com...
> I'd like to calculate the median of a set of values, ie: 1,2,2,2,5 would
> have
> a median of 2.
> I've been able to get the average using
> sum(fields!1.value)/count(fields!1.value) or Avg(fields!1.value).
> How can the median be found using either a function or a math formula?
> Thanks,
> Jim|||Is your syntax correct? I cant get it to work..
=IIF(rownumber(nothring)=Count(Fields!1,Value),Fields!Fieldname.Value,0)
what does Fields!1 represent?
"Wayne Snyder" wrote:
> I have no clue if this would work, but it might be worth a try... add a new
> text column ( and maybe hide it)...
> It's value is
> =IIF(rownumber(nothring)=Count(Fields!1,Value),Fields!Fieldname.Value,0)
> So the value of this field will be 0 for all rows except the middle row,
> which will have the value of the OTHER column with values ... Of course this
> only would work if the OTHER column is sorted, and you'd have to account for
> an even/odd number of rows...
> But then you sum this column in your aggregate row, which would be the
> median value...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Jim" <Jim@.discussions.microsoft.com> wrote in message
> news:440D1DAE-8C20-41D5-819D-C193254626F4@.microsoft.com...
> > I'd like to calculate the median of a set of values, ie: 1,2,2,2,5 would
> > have
> > a median of 2.
> >
> > I've been able to get the average using
> > sum(fields!1.value)/count(fields!1.value) or Avg(fields!1.value).
> >
> > How can the median be found using either a function or a math formula?
> >
> > Thanks,
> > Jim
>
>