Get the client time zone in ssrs - reporting-services

I will like to include the client's time zone next to the date as below:
03/03/2022 CET
The issue is that when I run the report from the server, it works but when report is executed on the browser side, id shows Coordinated Universal Time.
I am using the following function to get the time zone but I cannot get it to get the browser time zone:
System.TimeZone.CurrentTimeZone.StandardName
Any idea on how to get this?

Related

SSRS Document Map is gone after exporting report with cached reports

We are using Microsoft SQL Server Reporting Services Version 15.0.1102.932 and Microsoft Power BI Report Server Version 15.0.1108.153.
Some of our reports have a Document Map. When we export to Excel we don't want the Document Map. In the DocumentMapLabel we have logic like this:
=IIF(Globals!RenderFormat.Name = "EXCELOPENXML",Nothing,Fields!PAGR_ID.Value)
This works great. However, we have found an issue when the Caching is set to use a cache that expires in X minutes or always run from a history snapshot (option 2 or 3). After you export to Excel then run the report again for the same parameters, the document map is gone.
It appears when you export, the server fetches the data again so it can render it in the desired output format and creates a new record in the SnapshotData table in ReportServerTempDB. I queried that table before running a report for the first time. Ran the report, queried again and saw a new SnapshotData record, as expected. I ran the report several times and noticed the table field TransientRefcount was increasing with each run. Nice to know we can look at that and see how many times a cache has been accessed. I then exported to Excel, queried the table and noticed a new record was created. When I ran the report again with the same parameters I saw that new records TransientRefcount increase instead of the previous SnapshotData record.
Since our report turns off the document map when exporting to Excel, this new SnapshotData record doesn't have the document map in it. Now when you run the report again with the same parameters, the document map is gone, because the server is grabbing the most recent cached data.
Has anyone encountered this and found a way to fix it? A different way to turn off the document map?
I tried creating two tables, one with the document map and one without where the visibility of the table with the document map was set to hide if the RenderFormat is Excel and the other table hides when it's NOT Excel. But that didn't work, the cached version only displays the version without the document map. Which makes sense since the most recent cached version doesn't have a document map and it can't turn something on that isn't there.
One thought I had was to set the Globals!RenderFormat.Name to "RDL" when the report first runs before any parameters are entered, but I can't figure out how to do that. Maybe with some code? I've not used code in a report before so don't know how to do that.
Any thoughts? Thanks very much!

React Form won't save date

I've created a basic form in React to save a name, category, and date if available to an SQL table. My form is acting fine - it's submitting correctly and saving the new entries. The problem is, while it saves the name and the category fine, if you choose a date (using the HTML date picker) the date isn't getting saved. It's definitely seeing the date in the state upon change, but it won't save to the SQL table. Instead it's saving the state as "null."
When I use Terminal to add an item, I'm able to set the date when using an INSERT command, and it will save.
Without any code it's quite difficult to debug. It could be the format of the date value you're using, can you console.log the date before you send it off the SQL server?
Additionally, depending on how you're interacting with the SQL server you could open up the dev tools and go to the Network tab and see what's in the HTTP POST request?

SIEM plugin for SailPoint and Splunk timestamp discrepancy

I have a question about how events arrive inside of a tool such as Splunk.
Currently, it appears that the way the plugin works is it will send the records over to the log collection application in question, placing the time stamp of the event in epoch time (located in the attributes of the event).
However, it would appear that within Splunk, it is marking the event time at which point it entered into Splunk.
So, for example, I have an event that happened two years ago, the time stamp on the event shows that and SailPoint shows that (even Splunk will show that if you drill into the event).
However, when I import into Splunk, let's say today (March 15, 2021), Splunk will show the event timestamp of today instead of when the actual event took place.
So when I am doing analytics, I can't actually look for when the event took place based on Splunk's timestamps (because Splunk is showing the day of import, not when the event took place): it won't actually be showing me events that took place two years ago.
Splunk would be showing those events that took place two years ago as events that took place today because that's when the events from SailPoint were imported into Splunk.
It sounds like the event date is being set to the index date
What does your props.conf look like for setting the timestamp?
Based on your comment, you should add the following to the TA's local/props.conf:
TIME_PREFIX=\"created\":
TIME_FORMAT=%s$3N

SSRS Subscription - Maximum Request Length Exceeded Error

I am trying to create a subscription for an SSRS report in Report Manager on the report server.
When I click OK or try to change the time, I immediately get an error message:
Maximum request length exceeded.
When I Google for the error, the answers all relate to the size of the RDL report file being over 4 meg. My report is only 384k and the resulting Excel file is only 119k.
Is there anything else I can change to make this work?
I have also noticed that when I do get the error, my current Internet Explorer history is wiped out. I cannot go BACK after getting the error. I get the same error with Chrome except that the history doesn't get wiped out.
I had a working subscription but I deleted to try with a newly deployed version of the report.
History wiped out?

Using SharePoint Report Viewer Web Part: Error in getting session data: Invalid or Expired Session: xxxxxxxxxxx

I have recently tried to use Report Viewer Web Part in a SharePoint page. The reports have been used outside SharePoint for years. We are currently on SSRS 2008 R2 native mode and SharePoint 2007. After a while, when you go to the page with the web parts, you just get the error:
The report execution yoty4kmgk3hjr5uup1ng0a45 has expired or cannot be found. (rsExecutionNotFound)
And, in the SSRS log you get:
library!ReportServer_0-33!13bc!10/28/2013-11:09:45:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerStorageException: , An error occurred within the report server database. This may be due to a connection failure, timeout or low disk condition within the database.;
session!ReportServer_0-33!13bc!10/28/2013-11:09:45:: e ERROR: Error in getting session data: Invalid or Expired Session: yoty4kmgk3hjr5uup1ng0a45
session!ReportServer_0-33!13bc!10/28/2013-11:09:45:: i INFO: LoadSnapshot: Item with session: yoty4kmgk3hjr5uup1ng0a45, reportPath: , userName: DOMAIN\USER not found in the database
library!ReportServer_0-33!13bc!10/28/2013-11:09:45:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: , Microsoft.ReportingServices.Diagnostics.Utilities.ExecutionNotFoundException: The report execution yoty4kmgk3hjr5uup1ng0a45 has expired or cannot be found.;
library!ReportServer_0-33!f84!10/28/2013-11:09:45:: i INFO: RenderForNewSession('/PATH/REPORT')
Now I know exactly what this is. We get this all the time. When you run a report, SSRS takes a temporary snapshot and associates it with your session, and then renders from the snapshot to the browser. If you allow the report to sit open in the browser long enough the session times out and the temporary snapshot is destroyed. If you come back and try to interact with the report you will get this error because the session is gone. When this happens in a browser you can simply go back to the report manager and re-run the report to get a new session and snapshot.
Right now my creative team is working on the SharePoint layout and design. They have been working with at least three different example pages, which each hosts the same two SSRS reports in an instance of a Report Viewer Web Part. The reports do render normally when you initially place them on the page. However, after SSRS expires the session, the web part will show the session not found error. Each page establishes a different session for the same report so there will be multiple sessions open and the report will continue to render on one page after it starts showing the error on another.
The message is absolutely correct, the session does not exist. Sessions are transient, with a timeout of 600 seconds. This is expected behavior. So why is the instance of the web part in the page still holding on to the dead session? If you navigate away from the page and then come back, or you refresh the page, why does the SharePoint Report Viewer Web Part not go execute the report and get a new execution id? Is the web part not intelligent enough to know what's going on? Is there some expectation of the instance lifetime that's not being met?
So the question is: How could we get the SSRS SharePoint Web Part to be well behaved? In the SharePoint context a user should be able to open a page and interact with the content on it, unaware of where the content comes from or how it gets there, the experience should be seamless and transparent. In this case the Web Part is caching the session on the SharePoint server [I guess] so once SSRS kills the session the view in SharePoint just renders an error and we have found no way to refresh it.
Is there a way to solve this?
Try to increase the ssrs timeout. I am facing the same problem as I am using ssrs url in my asp.net web application to generate report. If I leave my page open for some time and come back to it, I get the same error that 'Report execution has expired'. I tried different options including adding &rc:UniqueGuid= newguid to the ssrs url, but of no help.