I have a ssrs report with localization, i have to check for some conditions and concatinat the
result of expression with some string which is localized, here is the code i have done
=IIF(Parameters!PledgeTerm1.Value MOD 30,Parameters!PledgeTerm1.Value & "Days",Parameters!PledgeTerm1.Value/30 & "Month(s)")
where i want days and months to be localized, i have written the code below
=IIF(Parameters!PledgeTerm1.Value MOD 30,Parameters!PledgeTerm1.Value & Code.LocalizedValue("DAYS", Parameters!Culture.Value) ,Parameters!PledgeTerm1.Value/30 & Code.LocalizedValue("MONTHS", Parameters!Culture.Value) )
which is not working.....
A good way to address issues like this is to set up a debugging session.
Open the report project that references the localization project's assembly.
Open the localization project and select the menu option Debug -> Attach to Process, and scroll down the list of Processes till you find the devenv.exe instance for the report project (or the browser process if running from a report server.)
After attaching to the report project process, set some breakpoints at the beginning of the LocalizedValue method, and then step through the code while checking pertinent values.
This should save you a lot of time when developing custom assemblies. I think it's also a good idea to add a unit testing project to the localization project's solution, which can run tests for any/all localization methods. Be sure to set the unit testing project as the startup project for the solution. Then you can run the solution in Debug anytime you change something. This will help you catch and solve a lot of issues before they get deployed. Hope that helps!
Related
Dears,
I am quite new with Report Builder, and also with SSRS so sorry in advance if I raise irrelevant questions. My goal, essentially, is to deploy a sort of SQL Monitoring dashboard (I just uploaded a demo picture of it, here the link 1 ), that is composed by a main report with some charts and toggled sub reports. All these sub reports are filtered by the SQL instance name, and other parameters like number of monitoring days, months etc...
Plus I make use only of shared datasets.
Now, if I deploy the whole solution with Visual Studio against my report server, it works perfectly and all the report parts are uploaded without any issue against the report site.
If I try to deploy the report using the report website manager (by trying to upload the whole solution file by file), it does not upload anything, even if I create first the data source and then trying to add the existing datasets.
If I try to deploy the solution with Report Builder (after having giving to it the target report server URL and an existing folder that starts with slash), the only option I have is to open the solution as file, and save it against the target report server configured. But then the annoying error appears even if I the path has less than 260 char and even if the path starts with the slash:
"Error: The path of the dataset "" is not valid. The full path must be
less than 260 characters long; other restrictions apply. If the report
server is in native mode, the path must start with slash.
(rsInvalidItemPath)"
What am I doing wrong? I thought that a tool like that, used also for publishing, would make the life easier, but apparently I may not know exactly how to use it.
I'm creating a new SSRS report in AX2012. At first, I added some Data Methods through Visual Studio, but later I found another way to get what I wanted without using those data methods. Consequently, I deleted the Data Methods and the Business Logic project.
Now, everytime I build the report, I get a warning :
Could not resolve 'projectname' from the AOT. If the reference is required in your code, you may get compilation errors.
How do I delete the reference to the business logic project? My report runs without problems, but I would like to stop getting this warning...
Thanks!
It should just be a project dependency.
See here: https://msdn.microsoft.com/en-us/library/et61xzb3.aspx
To remove:
In Solution Explorer, select a project. On the Project menu, choose
Project Dependencies. The Project Dependencies dialog box opens. On
the Dependencies tab, select a project from the Project drop-down
menu. In the Depends on field, clear the check boxes beside any other
projects that are no longer dependencies of this project.
EDIT: Another option is to export the XPO and edit it in there, and reimport.
When I run a report - using either a simple query, complex (query builder) or via DoCmd.OpenReport(.....) then the report populates fine.
However I wish to run the application with the forms etc as Pop-ups, and the application minimised, or hidden - otherwise users will just access the database that way - and miss the logic that is integrated etc.
So I am Minimising the application using apiShowWindow(hWndAccessApp, SW_SHOWMINIMIZED)
However in this case, when I run the same reports as before - there is no data, just a blank report - not even the header!
Any ideas?
Julie
Not sure why it works, or needs to be the case, but setting windows mode to Icon (via the macro and/or the doCmd.OpenForm () command in VBA) works.
Nor can I claim the credit - Thanks to Wayne G Dunn
I don't know if this will help, but i enabled logging to a text file called test.txt on my C Drive.
Public Sub Main()
Dim rowsProcessed As Integer = 100
Dim emptyBytes(0) As Byte
Dts.Log("Testing, Test 1,2,3", rowsProcessed.ToString, emptyBytes)
Dts.TaskResult = ScriptResults.Success
End Sub
You have to go into the SSIS->Logging menu and tick checkboxes like a crazy checkbox-ticking-ninja to get this to work.
There are various checkboxes that have to be checked, and some of them only appear when you click on the script tasks, so it took me a while to figure this out:
First, enable your logging provider (that you have set up, right?) by ticking it on the Providers and Logs tab.
Then switch to the Details tab (which shows various events that you might want to log)
For the DTS.Log() method you need the ScriptTaskLogEntry event, but they only show up when you click on Script Tasks in the tree on the left.
So, click each of your Script Tasks in the tree on the left, enable it for logging, and then tick the Script Tasks event on the details tab.
Also make sure your logging provider is ticked for each script task
See also: http://msdn.microsoft.com/en-us/library/ms136131.aspx
This is an old question and #codeulike has answered it well but I would like to add a note about the logging behavior in debug mode, specially for someone new to SSIS or SSIS logging (like me) - Assuming you have all the configuration in place required for logging, if execute a selected task that you expect to log, it still will not log. Only if you execute (or debug) the entire package, then the logging will work.
If you are sure you have done configured everything correctly and still cant see your dbo.sysssislog in the database you selected, then check in the following
YourDatabase > tables > system tables
you can find your loggings there.
its my first time doing package loggings and configured everything correctly and could not see that dbo.sysssislog in the database it was supposed to do loggings and banging my head for half an hour when i realised it was in system tables of that particular database.
I realize that this question is rather old, but maybe it helps someone.
I ran into the same problem - while debugging in Visual Studio my textfile logging provider just did not write into the configured logfile.
My logfile was in the directory "project-directory/bin/development".
After changing the path to "project-directory-name"-root (eg. "/project-directory-name/test.txt" it worked.
I cannot explain this - it is just what I have observed.
I get the correct results (nov and dec data) when I run a query in the Data tab of a report that I built in SQL Server Reporting Services. When I preview the report I get old data from October. It doesn't make any sense to me. I'm not sure whats going on. Note: the data is in Oracle.
Here's the date filter I'm using
receipt_date + 2 <= SYSDATE
The query works fine in SQL Developer and in the Data tab in the .rdl designer in Visual Studio... just not in the Preview tab when I run the report... that's when I get Oct. data.
Anyone know what's going on here?
SSRS caches data locally for use by the designer. The cached data is only updated if the developer previews the report in VS.NET using a different set of parameters, which in your case never happens because the report has no parameters.
To allow SSRS to refresh the cached data, navigate to the directory which contains your design-time RDL file and delete any files which have the extension ".data".
This is way too late, but maybe this can help someone else in the future.
When developing SQL Reporting Services reports, a really annoying function is that preview data is cached locally when testing reports instead of fetched on every run. Even explicitly refreshing the data doesn't always fix this. The most reliable way to resolve this is to delete the .data file associated with your report RDL file. These data files are stored in the same folder with your report definitions.
While you can delete these files manually, the following 15 second configuration change to BIS makes the process of deleting all data caches as simple as a menu selection.
Let's see how to achieve this.
In Visual Studio -->
Go to Tools - External Tools...
Add a new tool with the following settings:
Now whenever you want to delete your report data cache, just go to Tools - Clear Report Data Cache.
The only thing that works for me (in 2008 R2) is deleting the .data file and rebuilding the report. The refresh button on the preview tab does nothing nor does editing the RSReportDesigner.config file (located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies). Very frustrating. If I change the query or sp logic I now have to manually delete the .data file in the report project directory in order to see the the most recent rendering of the data.
Hope this was fixed in SSRS 2012 data tools.
see the links
http://connect.microsoft.com/SQLServer/feedback/details/522670/ssrs-turn-off-local-data-cache-in-bids#
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/145ac9ac-b247-47d2-a787-98a8fcfad053
The link in Greg's post points to this workaround, added after Greg posted: http://blog.summitcloud.com/2010/05/disable-reporting-services-data-cache-in-development/ That explains which config file controls the data caching, and says that refreshing the preview may actually get you fresh data. (I'm running a long query now, so I don't know yet if that works.)
Try hitting the Refresh button on the Preview tab.
If I understand properly, that is the same issue I had with mine.
I could see the query run successfully in the Report Data window but whenever I ran the Preview of the report, I was getting no results.
I realised after a bit of mucking around, all I needed to do was hit the Refresh button (mini icons on the the Preview tab) to get the Preview refreshed with the new data.
Is there anything different regarding the dataset's parameters? Do report parameters feed the dataset at all? If so what are they?
Is the report a server report? If so what is the time set to on the server?
There are no report parameters.....the exact same sql is run everytime. I'm not sure what you mean when you ask if the report is a server report.
i have one theory that i haven't been able to test. this report is not deployed to Report Manager but is being run from Visual Studio. I don't know if that makes a difference.
Pressing the refresh button in BIDS VS2010 for me isn't working. Nor did deleting the cache file. My issue was that I didn't have a Row Group - so it was only showing one (old) record on the report.