React Form won't save date - html

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?

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!

Splunk Fields - Broken

I was going to ask this on the Splunk forums, but for some reason I haven't got a validation email after a few hours and multiple attempts, so I thought I would try here.
I create a search from a .csv data source and save a report from this search. I then selected the fields I want. Screenshot:
This works great. Then I send this report over to a dashboard so I can make some nice graphs and all the fields are gone and I have no option to map the fields.
(redacted some data)
As you can see there's no option to use the fields I selected in the report even though this is an import of that report. I tried manually mapping a field, and even that only shows up in the Reports view and not in any dashboards/panels. Is there something I'm missing here?
I suggest that you go to the report and choose the "Add to dashboard" option. Keep both the report and the dashboard in the same app. "Permanent" fields are defined within the context of an app. "Temporary" fields (created by the rex command, for example) exist only within the context of a report.

How to get current date in file name?

I am generating report everyday through SSRS. I am trying to get current date as file name when ever the job runs and file created.
Like this ID_report_03-31-2014
I have tried echo %date% %time% and #ExecutionTime but it doesn't work
The main option with a file share subscription is to add #timestamp to the file name.
From File Share Delivery in Reporting Services:
An alternative approach to creating unique files for every delivery is
to include a timestamp in the file name. To do this, add the
#timestamp variable to the file name (for example,
CompanySales#timestamp). With this approach, the file name is unique
by definition, so it will never be overwritten.
I don't know if this is exactly what you are after, since it will include a time component, but as far as a standard SSRS subscription goes your options are limited.
Edit after comment
You don't have a lot of control over the format here.
On the MS forums one of there support suggests using Data Driven Subscriptions to get more control:
Can we edit #timestamp variable in SSRS:
In this case, we can define the filename with timestamp in database
and then use Data-Driven Subscriptions to delivey the report.
But that seems a poor option to me, but is the only suggestion out there that I can see.
I have solved that problem using Data Driven Subscription.
I found the solution here.

MS Access form does not refresh when using ODBC link to MySql

I have a front-end Access 2007 database connecting to MySql tables using MySQL ODBC connector.
The problem is that a form linked to a table will not refresh its data if the data are changed by another user on the network or if the data was changed by a pop-up form.
If I create a VBA code which detects the change and then refresh the form or requery, then the form which shows many records in a table like format, will jump to its top, and some users will lose the sight of the record which is relevant to them and will have to scroll down to find it again which is not always easy.
Previously, when I was using only Access tables on the network, records would be updated on all access forms if data would change, and the forms would not scroll back to the top...
Is ti possible to make Access form autamaticaly refresh its row if data changed on MySql?
One possible solution is if I could get the form to scroll to the exacly same position after the refresh, but not sure if this can be done...
Check the ODBC refresh interval in your Access application. The default value appears to be 1500 seconds. Perhaps a lower value will allow your form to display its updated contents without code intervention.
Office button -> Access Options -> Advanced, then find ODBC refresh interval near the end of that section of options.
Newer Versions of Office
File -> Options -> Client Settings -> Scroll down to Advanced -> Change ODBC refresh Interval (Sec)
Also, since you have created code to detect data changes on the server, then refresh the forms in response, you could set a bookmark for the form, refresh, and then return to the bookmarked form row.
Recordset.Bookmark Property (DAO)
Update: Changing the form's Recordset Type to Dynaset was the key to resolving this one.
Your first question "Is ti possible to make Access form autamaticaly refresh its row if data changed on MySql?" is clearly answerable: No.
When Access has populated your form, the representation of data in your form becomes totally independent of the record with the same primary key in the database - MySQL has no knowledge, that you are interested in any changes, so it will not inform Access (in fact: there isn't a mechanism to do so)
Concerning the scroll question: In Access 2000 this was possible by activating the record, which would scroll it into view. I suspect it may be similar with Access 2007

SSRS parameter validation

I am using SSRS reports in MS CRM 4.0
I have two datetime parameters in my report. They are fine until someone type in an invalid format, e.g. 9/30/2008 or 40/09/2008 or random text. It logs an Error in the event log but my manager doesn’t want to see it.
Now, just wondering how to do a client side validation and stop the report gets executed if the validation failed. Or do you know how to just stop user typing into the input boxes so they can only pickup a date from the calendar control?
Any advice will be welcomed.
One way to trick this into happening is using cascading parameters that depend on the date fields. If these fail to populate then the report itself will not populate.