I am trying to show one of the two simple reports on a click event. I have three report designs in a single Dynamics SSRS reporting project. One pie and two table designs. I want to show one of the table based on the user selection on pie slice. When I try to add conditional function for report action on the pie series I get compile time error stating that it is not allowed.
Action on series properties is set to "Go to report" and expression is set to ReportPrj.AutoDesign1 only this works, if I try to use a conditional query for my expression this fails to compile.
[=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")]
Matter of fact anything other than ReportPrj.Design format fails to compile. Is this some kind of limitation on AX SSRS reports. If that is the case what are my other options.
Here is the compile error.
ReportPrj.AutoDesign1Pie.: Could not resolve drillthrough target report =IIf(Parameters!pvalue.Value = 1,
"ReportPrj.AutoDesign1",
"ReportPrj.AutoDesign2"
).
I am running Dynamics AX 2012 CU2, SQL Server 2008 R2, and Visual Studio 2010 on a Windows 2008 Server.
All you help is greatly appreciated.
Thank you,
mm
Is that a valid expression with the starting "[" and ending "]"?
Does this work?
=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")
Related
When I run a report that has run for a few years with no problems, the report runs but I get the following error:
[rsFieldReference] The Value expression for the text box 'FieldName' refers to the field 'FieldName'.
Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.
However, the Value and the field name are identical ['FieldName']. And, the report runs correctly in Visual Studio [in spite of the error] and on the Report Server when it is deployed.
How do I get the error to stop showing up?
I suspect it is a 'residual' error that is persisting even though I can't see an actual 'error'.
We recently switched to a newer version of Visual Studio [2017] and I have made a slight change to the SQL in the Dataset [nothing to do with 'FieldName'].
Thanks!
I have a job to create sub report using chart by parsing parameter value from master report. I have checked there was no different data type and ensure that there is no null value. So at the first, I tried to make test case by creating sub report using standard table, and it works.
But, when I tried to use chart report in sub report with the same data and I run it from master report, it didn't work and the notice is
"Data retrieval failed for the subreport,'subrptqtybyasset', located at:/rptAssetQtyByType. Please check the log files for more information."
Then I try to look at sub report and running this chart alone and it works. Same result when I tried running sub report using standard table (not using chart).
So, my questions : First, why SSRS give different result when I execute sub report using chart, meanwhile it works by using table?. Second, is there any solution to make it work with chart on subreport?, because I really need using chart in my subreport.
Thank you very much.
You should check the SSRS log file for a better description of what has errored.
The default log file location in SQL Server 2008 is
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles
A similar path is used for other versions.
In the rare case that the SSRS log file doesn't reveal the cause of the error, you can run a SQL Profiler trace to the database specific in the report data source to try to work out what is going wrong when the report runs.
Thanks Josh for the answer,
I have just run the program today and I see in the SSRS log file and there is no error statement,maybe you can see from this link :
www.herryyulianto.com/images/stackoverflow/Response01.jpg
The error statement only appear in Visual Studio Reporting. Still same result as yesterday.
Here are the last log that I got :
9/2/2014 9:46:11 AM spid56 Starting up database 'ReportServer$SQLEXPRESSTempDB'.
9/2/2014 9:36:11 AM spid52 Starting up database 'ReportServer$SQLEXPRESSTempDB'.
And this is master report that contains sub report chart when I execute :
www.herryyulianto.com/images/stackoverflow/UsingChart.jpg
But if the master report contains sub report with standard table and I got :
www.herryyulianto.com/images/stackoverflow/UsingStandardTable.jpg
Well, I don't know how to solve this problem. Thanks.
We are in the process of updating from the SSRS package in SQL 2005 to SQL 2012. SSRS seems to work fine, even with the original report model, but none of the reports we create have clickthrough functionality. Even if the entities are linked in the report model, the table simply doesn't have any clickthrough links. The older reports carried over from the SQL 2005 SSRS do still have the functionality however.
We are using the enterprise version of SQL, which claims to have the feature. Is there a manner in which I need to turn it on?
Clickthrough doesn't only matter on the underlying reporting server's capability which supplies the data, but also if the report designer application (in our case Report Builder 3.0) support it too.
#djangojazz is using SSDS (successor of BIDS) in his solution, and it also requires cubes. I think #ChargerIIC wanted to use Report Builder. It seems that Report Builder 3.0 is not a successor of Report Builder 1.0 in all respects. Particularly this clickthrough feature may be a difference.
See Report Builder 3.0 FAQ: http://download.microsoft.com/download/7/F/D/7FDAA75C-1273-4DFE-8EC6-D9699C3EE47F/SQL_Server_2008_R2_Report_Builder_3_0FAQs.docx
See the question: "What are the key differences between Report Builder 1.0 and Report Builder 3.0?". The last row in the answer table is crossed out, but it says that 1.0 support infinite click through, while 3.0 is manual.
"Q. Is this a replacement for Report Builder 1.0?
A. Not for this release. It does replace Report Builder 2.0 but there is still some additional functionality from Report Builder 1.0 that did not make it into this release that has been prioritized for a future release."
To set up a drill through report for a master report you must have two reports. For the sake of simplicity I will keep my example super simple. Let's start with the drill through report as that is the lowest level. For both examples assumple you are using a Shared Data Source you make up. This is written with instructions for 2012 Business Intelligence Development Studio assuming you are in a Report Solution for SSRS and a working SSRS Project. You get to this with All Programs > Microsoft SQL Server 2012 > SQL Server Data Tools (Once you open it, it will be called Business Intelligence).
Create a new 'Item' for a blank report and call it 'SubReport'
Open up 'Report Data' and add your Shared Data Source
Right Click 'Parameters' and 'Add Parameter'. Add a simple text parameter and call it 'Prompt'.
Open the 'Toolbox' and drag a text box onto the surface.
Type in 'Hello from [#Prompt]'. You can test the report in 'Preview' mode and see that you can pass whatever text string you want to it to get a value.
Now for the master report, repeat steps 1 and 2 but call the report 'MasterReport'
Add a 'DataSet' by right clicking the 'DataSource' you just created and click 'Add DataSet'. For example I will just create a super simple set I call 'People'
DECLARE #Person TABLE (person varchar(8)); INSERT INTO #Person
VALUES ('Brett'), ('Sean'), ('Chad'), ('Michael');
SELECT TOP 100 *
FROM #Person p
Now go to the 'Toolbox' and drag and drop a 'Table' element onto the report.
Click on the most left 'Data' cell of the 'Table' you just dropped and hover over it and select the little box that appears in the upper right and you should see a column named 'person' that matches my dataset above. Select that and the cell and header will now be populated.
Now for the real magic to actually happen.
A. Right click the cell you just created and 'Text Box Properties'.
B. Select 'Action' on the left pane.
C. Choose the radio button 'Go to Report'. (More options now appear)
D. Under 'Specify a report:' select the dropdown for the value 'SubReport'
E. Under 'Use these parameters to run the report:' click 'Add'
F. Under 'Name' you will see the parameter name 'Prompt' from the report we created in step 3
G. Under 'Value' select '[person]' which is from the dataset we created in this report in step 7.
Preview the report and now when you 'hover over' values in the table a pointer appears. When you click on a cell you DRILL THROUGH to the other report in a new screen.
I hope this helps, the important thing to keep in mind is that you can isolate your logic to seperate the two reports as distinct entitites that are loosely coupled by passing values from one to the other. You can make the parameters hidden, make more of them, you can nest the report inside of your cell if you like, etc.
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've set up a report using SSRS and would like it to AutoRefresh constantly as data will continuously be added. Simple solution was to set the value to a constant which is easy enough. However, the report is an error log so I would like for the user to be able to shut it off or delay the refresh while they read the messages. I've tried adding a parameter Refresh as an Integer but I cannot set the AutoRefresh value to an expression via
=Parameters!Refresh.Value
and
=[#Refresh]
SSRS yells at me saying the "Property value is not valid. PARAM is not a valid value for Int32."
I appreciate any help.
Yes, AutoRefresh can use an expression in SSRS 2012.
I was able to set this up correctly on SSRS 2012 and make it work. The data type of the parameter must be Integer. What data type are you using? What version of SSRS are you using?
Edit: I have confirmed it does NOT work in SSRS 2008. However, if you are using SSRS 2008 R2, change the project property TargetServerVersion to SQL Server 2008 R2, and it will work. I have it working in a test environment.