I am working with SQL Server 2008 and i generated my cub and i want to make a rdl report with parameters but when i preview the report i found that the structures of values are strange
For example instead of seizing in a field of paramettre the value 148, I have to put [PRODUCT].[ID].&[1.48E2]
When I generate the report from the database of sql server directly it works but from the cube it does not work
How can i do to just put 184 rather than 1.48E2 and why i have that structure?
Right click on your datasets folder in report builder or Visual Studio , click "show hidded datasets" , amend the query to reflect your requirements.
On the
How can i do to just put 184 rather than 1.48E2
part, first of all, I think you meant 148, not 184. Secondly, it is possible to just pass 184, but that probably involves little change in the report's dataset. As you have still not provided the query for the report's dataset, I can't really help you on how to make changes.
Now coming to the
why i have that structure?
part, it is because of how the DSV of your cube is written. In scientific notation, 1.48E2 is same as 148.
If you want to see the member to look like [PRODUCT].[ID].&[1.48E2], you need to probably change the format of ID attribute in DSV.
Related
I am trying to build an SSRS report to be put in Dynamics CRM and run from a record in the Account entity. My initial query to pull the data is pretty simple, but the functionality of the SSRS report and filtered view aren't working as expected. I'm using the custom report data source from the CRM data source folder, so I know that's not the issue (see here).
Here's my query (which is very basic):
SELECT Name
,Address1_Line1
,Address1_Line2
,Address1_City
,Address1_StateOrProvince
,Address1_PostalCode
,kore_salespersonidName
,kore_coordinatoridName
,client_FulfillmentContactName
,OpenDeals
,OpenRevenue
,client_ActivationBalance
,client_SponsorLevel
,client_PreviousSeasonSpend
,client_CurrentSeasonSpend
,Description
,kore_industryidName
FROM FilteredAccount AS CRMAF_FilteredAccount
I've also tried to use a another one as a filter for the report using a where clause on the end of the first query, but that just returns a random list of results as well.
Here's the one I've used for the filter:
SELECT CRMAF_FilteredAccount.AccountId
,CRMAF_FilteredAccount.Name
FROM FilteredAccount as CRMAF_FilteredAccount
WHERE CRMAF_FilteredAccount.statecode = 0
This is a similar issue I have, but no resolution: Similar issue.
Any help is appreciated.
Looks like my issue was just a bug with CRM. If you originally upload the report and don't specify in the "Display In" that it needs to be in "Forms for related record types" then it doesn't look like it'll change even if you change that value and the report will always run for all records. I found this link where it suggested that I delete the report and reupload it, which solved the issue.
The report parameter 'ServicePriorityNameParameter' has a DefaultValue
or a ValidValue that depends on the report parameter
"ServicePriorityNameParameter". Forward dependencies are not valid.
This is the error I keep receiving when trying to use this parameter.
I also have a WorkCategoryParameter which I specified the values for. Also a RequestNumberParameter in which a request number can be typed into.
I have tried reordering my parameters and also adding a separate dataset in which to run each parameter off of. I'm pretty new to SSRS so any words of advice will help. Thanks!
Reordering the parameters in the designer does not actually reorder them. If you open the report's rdl file (if using visual studio just right-click the report in the solution explorer and select View Code). In there, look for the ReportParameters section and reorder the parameters from there. Basically you need to make sure that any parameters that are dependent on other parameters are listed after the thing they are dependant on.
E.g. If you had a parameter called #Countries to list countries based on continent and the dataset that supplied the values to that parameter read something like SELECT * FROM dbo.MyCountryTable WHERE Continent = #continent then the #continent parameter would have to appear first in the list as #Countries depends on it.
I need to store a large query into a string variable.
When I paste the sql query into the Value property of the variable, I see only one line.
I am using VS 2008 , BIDS to design the package.
I think this is a bug as stated here,
what I am actualy intersted is a workaround to bypass this.
We use a parameters table in a SQL database, then load long strings into variables using a simple SQL query. This has the additional advantage that you can refactor the query code without opening SSIS.
It also allows multiple packages to easily share common query code.
Edit: Of course, if you only want to do this once...
Manually edit the XML. Put a placeholder value in the variable, then open the .dtsx in a text editor, locate the placeholder value, and replace it with the value you need.
Please back up your package prior to doing this.
Another work around - you can set the EvaluateAsExpression to True and put the SQL query in the Expression. The Expression will have a ... button which you can click to edit a multi-line value.
I'm using now SQL Server 2008 R2.
My website shows the report exactly as it is, including the container where the parameters appear (the client prefers it that way).
However, my website solution includes localization (Portuguese, English, Spanish).
I've tried to translate the parameters by creating one parameter for each language, and then show them according the selected one. It didn't work in SSRS 2008. Because I don't know how to find the visibility properties of prompt.
Does anyone know a solution... Or if SQL Server 2012 has solutions for translating parameter's prompt, or conditional visibility?
Thanks.
The only solution I've found so far (SSRS 2008, 2008R2, 2010, 2012) is to break the DRY commandments, and duplicate the reports with language codes as part of the report name (e.g. MyReport_sp.rdl, MyReport_de.rdl, etc) and then place a web service between the client request and the SSRS instance. The web service then has to field the request to the correct report based on a "Culture" parameter passed with the client's request.
This is NOT a good solution, though at least the Culture param is used in localizing the rest of the report as well. We still have hopes that at some future date MS will add prompt localizability and we can rename the report to MyReport.rdl and just have everything actually localized. Hmm, what a concept...
Another workaround would be to just put a number in the prompt for the parameter then prefix the label of each parameter with the localised version by either using "get values from query" or by using the expression builder with a switch statement in the label expression.
For the get values from query option you would have a dataset something like this if you have the translated versions in the query:
SELECT ParamLabel, ParamValue
FROM MyLocalisedParameters
WHERE UserLanguage = #Language
Or like this if not:
SELECT
CASE #Language
WHEN 'pt-PT' THEN 'Selecione Departamento: ' + ParamLabel
WHEN 'es-ES' THEN 'Seleccionar Departamento: ' + ParamLabel
ELSE 'Select Department: ' + ParamLabel
END AS ParamLabel
, ParamValue
FROM MyParametersTable
in both cases creating and assigning the Globals!Language to a Parameter called #Language.
Or if using the expression builder for a hardcoded set of values it would look something like this:
either way the end result would look something like this:
Not perfect but functioning and easier to maintain than several copies of the same report.
If you want it to look a bit tidier then just have the Parameter prompt as only one entry in the parameters list and set it to the default value to avoid repetition on every line.
There is none...
As per connect.microsoft.com, this feature has been requested after SSRS 2005 has been released, and while it is on Microsoft's TODO list, the programmer time to do this has never been allocated, and hence in 2012, SSRS is still not capable of doing that.
Although it's (with much effort) possible to translate everything else, it's not possible to translate the parameter prompt.
There is NO conditional visibility either, visibility of parameters is fixed.
Also, there is no way having SSRS use a supplied language instead of the one set in the browser language settings.
The only thing that you CAN do is write a C# program that loads your XML file, get's the report's parameter name(s) (and possibly the report's name as well), looks them up in a database, and automagically creates N reports for n languages.
Then, you have to redirect your users to the report in their language.
You then only need to write an upload tool, because you won't want to do that by hand.
The other way is to use the ReportViewer control, and re-implement parameter selection.
I think there's CrissCross that tries to do that, but it failed in all but 2 of the reports that I tested.
An evil hack would be:
parametername: babla_language1 / blabla_language2 / blabla_language3 / blabla_language4
and then use jQuery to get that string. do string.split('/')[index_of_language]
and then prey that / is never within "blabla_languageXY"
Edit:
I actually did that. You have to use setInterval to do it, because there is no way to detect change when you select a parameter.
I'm writing a report in SSRS. I have a report with some fairly long expressions although the calcuations are simple additions, subtractions and mults and divs. Is there a way to capture the results of an expression for use in a calculation in another field without having to repeat the whole original calculation? I already do part of the calculation in underlying views. Is it possible to do something similar to referencing a 'Field.xxx.Value'? I'm using 2008 R2 for now but will be moving to Sql Server 2012 soon.
Supposedly the result of the complex expression that you want to reuse is located in a Text Box named "amt3". Then you can use this to, say, Color it:
=iif(ReportItems("amt3").Value < 0, "Red", "Green")
Are you wanting to repeat a calculation or use a calculated value?
If you want to repeat a calculation you can use inbedded code. Just write some VB that takes in whatever parameters you want and have it output the results.