Qlik Sense: How to accept user input to a column in a table and write back to source - input

In Qlik Sense, I have a task to allow users to enter comments next to each row in a table. The source is currently from an excel file but if I can figure this out, it will be from a database. The goal is to have the user's comments be written back to the source.
I am stuck currently on how to allow the user to enter comments in the existing table from Qlik Sense.
Any pointers?

Qlik does not have this capability. Qlik (and the other similar tools) don't write data back. They consume data.
Said that ... I had similar requirement few years ago - users to be able to write comments based on the data that is displayed (based on the current selections). My solution was to write QV extension that sends the selections and user input data to web server (NodeJS in my case) and the web server was storing the data in text file which was then consumed back from Qlik. With this approach the web server can do whatever you want with the data - write files, write in db, trigger actions etc.
But again - there is no way to write back to the database from the UI with the default tools
Repo with the QV extension and the server - https://github.com/countnazgul/qv-add-comment

Related

SSRS 2005 Subscription changes

OK this is my question(s) and its SSRS 2005 and SQL Server 2005/2008
I had been tasked with rebuilding a dozen or so reports that our users use on their data systems. We just build them and since every DB instance is schematically the same for all our clients, we push the reports out to their report servers for use.
So modified a great many reports, but the reports have blown away the clients subscriptions. So every user that uses these reports, that can be a great many seeing as how everyone can have their own set of parameters, has to run the reports manually or redo their subscriptions.
My company would very much like to avoid that, but I can not figure out how to change a report, and even with the same parameter set going in as the last report, keep the subscription there.
Even when I copy the report down to their report server and replace the old with the new using same name. The subscription is still there, but it gets modified.
I am looking either for a way to push down a subscription as part of the report, so that they will have minimal input to their subscriptions in order to tailor it to their needs
--OR ideally--
Upload a new version of the report to their report server and just have the subscription apply to the newest report that I have put on their server
It doesn't really matter which one but the second is best seeing as how individual users use the reports with individual names as a parameter
Many thanks in advance for anyone that can point me to the way to manage out subscriptions on my side, or enable my reports to assume the subscriptions of same named reports on their server.
--edit--
Want to put a clearer picture out there
I have a master copy of a report. The users use the report on their own systems.
I do some heavy modifications to the master copy of the report, and upload it to their systems. using the same name and same parameter set as the original report.
I want the subscriptions on their report server to find this report using the same name.
so XXX.report has a subscription. I change it to XXX.report locally, and upload to their servers. The subscriptions are not synching though.
Thanks
I'm not sure how you're accessing SSRS but you can use the following webservice methods to download and upload report subscriptions
ListSubscriptions
GetSubscriptionProperties
GetDataDrivenSubscriptionProperties
DeleteSubscription
CreateDataDrivenSubscription
CreateSubscription
Using those methods, you use ListSubscriptions to get a report's subcriptions. The Subscription.IsDataDriven property will tell you if it's data driven or not. For data driven subscriptions, use GetDataDrivenSubscriptionProperites to get the subscription properties, otherwise use GetSubscriptionProperties. All of those classes are XML serializable so you can save them to disk out of the box using the XmlSerializer.
To readd the subscriptions, use DeleteSubscription to delete the subcriptions one by one and then CreateSubscription or CreateDataDrivenSubscription to readd the subscriptions.
This is a hack though, because you should be able to modify reports without breaking the subscriptions. You should to the following to help diagnose the issue
Set SSRS logging to verbose for all components
Use the click once report builder to change the title of a report and see if the subscriptions break when you click save
Have the SQL profiler running on the ReportServer database to see what SQL is being generated when the subscriptions break
there's a tool called Reporting Services Scripter from Jasper Smith. I think it should work for you.
What I had to wind up doing was going back and change all the input parameters, including the sql content for the drop downs, back to what they originally were. Then playing with the SQL for the report to accept the new(old) parameters.
Thanks for your input. I accepted the web services answer as that is a path I will have to explore for our next update.

how to display the result of a procedure running from the server side in oracle?

I am trying to automate a daily monitoring activity where there are set of scripts to be executed(all are select statements). I am in the process of creating a procedure which runs these scripts and by means of scheduler, this will be running daily once. My problem is since these activities are taking place in server side(server backbone), How do i save the results? Earlier we will run all the scripts manually and save it in a notepad. Is there any option to do the same in automation? Like saving in our PC or SQL developer? Instead of logging in to server and searching the path where the file is saved? I thought of saving the results in a table but i am looking for a better option.Please suggest...
Generally it is a good idea to save the results in a table as this gives you flexibility when querying the results or exporting them in multiple formats.
There are multiple options to get the data to the client:
Query the table with the results from the client
Generate a HTML from the results table and have make it accessible from a HTTP server.
You can also create a web PL/SQL package and generate the HTML within (http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_web.htm#i1006207)
Export the data from the results table to a file and put it in a shared directory that is accessible by the client.
Email the results from the PL/SQL package.
I thought of saving the results in a table but i am looking for a better option.
What is exactly the issue with the "table" option?
Regarding "saving in our PC or SQL developer": one problem with that is that a PC/app screen is:
a PC is usually less resilient to reboots, crashes, etc.
it's intended for private use. Unless you're working alone - these logs may be of interest to other people;
..
Other options: it can be made to send e-mail; copy the file to a well known place (incl. one which is directly mounted on your PC); write to database table (as already suggested); and more.

How do I upload an Excel sheet to a SQL table in a Lightswitch web client?

I have a lightswitch project in visual studio 2013, using vb.net. I would like the user to be able to click a button and have lightswitch find an excel file, and upload that file to a sql table according to a pre-determined column mapping.
My preference was to use the Office Integration extension for visual studio, which I got working with VS 2013 by downloading it from this link: http://www.ge.tt/71iuRQv/v/0
However, the documentation and examples for office integration seem to be very heavy on getting an excel spreadsheet into a display in the lightswitch web client, rather than into the sql data table, which is where I need it. Here are the examples I've been following:
http://blogs.msdn.com/b/bethmassi/archive/2012/07/18/new-and-improved-office-integration-pack-extension-for-lightswitch.aspx
Alternatively, I have an existing stored procedure, and I can request that the server call this stored proc by sending a web API extension from the client to the server. I have this working already for other stored procs, according to examples from Beth Masi and Paul van Bladel. (Stackoverflow won't let me post the links...)
The undesirable part of this approach is that the stored proc is old, and messy.
I've searched and searched, but have yet to find anyone approach this problem for VS 2013 with lightswitch. Any useful advice?
I've used the method detailed by Matt Sampson to store word files and it works very well. Since it just stores the raw binary it should handle Excel files just as well.
If you're creating the table in LightSwitch, use the Binary Type. If you use SQL create scripts use varbinary(MAX).
You need to create a custom Silverlight dialog box to gain access to the OpenFileDialog object. Then open the file in as a FileStream.
Finally, you need to add a handler for the closed method of the control and then show the control to the user. Most likely done in a button. This needs to be done on the main dispatcher.
The code examples are in C# but I just used one of the many available translators out on the web and copy/pasted the VB.NET code.
Another option might be to consider shelling out to the DTSEXEC run-time to execute an SSIS package to perform the upload - especially if the target Excel spreadsheets have predefined layouts and content data types.
Even simpler, you might be able to use the SQL Server BULK INSERT command to get the job done - although that would require a SQL Client connection to your database.
HTH

How to see Tableau Custom SQL on server without downloading workbook?

Oftentimes I need to troubleshoot a workbook that another person at my company has created and published to our server. To troubleshoot, I need to see their connection details, specifically their Custom SQL, to understand what data they are using in their extract.
Is there any way to view this connection info (specifically their SQL code) when viewing the published workbook on the server (web) version?
I am an admin and I am able to download their workbook to my desktop version of tableau, then open it, then reconnect to the data, then look through the data connections they created, to see their SQL. But it's a really cumbersome process.
All I'm looking to do is, when looking at a published workbook, see the data connection details so that I can see the Custom SQL, without going through the process of downloading I described above.
You can get some details on the SQL statement by creating a performance recording.
From the Tableau Server Admin Guide:
Enable Performance Recordings:
Choose the Admin button in Tableau Server.
Choose Site.
Select a site.
Choose Edit.
In the Edit Site dialog box, select Allow Performance Recording.
Choose OK.
You start performance recording for a specific view by adding ?:record_performance=yes to
the url. For example:
http://server.site.com/views/Variety/BaseballStatistics?:record_performance=yes
Now, notice a new link at the top of your view called "Show Performance Recording".
Click this to open the generated performance workbook dashboard. Click on the bar chart and observe the SQL appear at the bottom of the view. Note, the SQL text will truncate after about 250 characters.
The admin guide suggests viewing the "Tableau Log" to find the full SQL statement.. I have looked at all the server side logs in C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs but cannot locate the SQL. (please reply if you know where to find this?)
You can also run a database trace to see the SQL that the database sees. For example, for MS SQL Server, run the Profiler tool, setup a default trace, and filter on "Application Name" = "Tableau Protocol Server 8.0" or similar.
I have version 8.1 and this is how I got around this problem. Tableau shows a 'Custom SQL Warning' when you open a workbook that contains the custom SQL. You can copy all the text in this message by simply Ctrl + C as this is any other Windows warning message. And then paste it your editor of choice to analyze it.
I do not know if this works on earlier versions.
I thought you could do this easily, and originally answered that you could, but I didn't pay close attention to your question. You can change some things about data connections without editing the workbook, including the ip address or name of the database server, but there doesn't appear to be a simple way to access custom sql without downloading the workbook.
Go to the Administrator page and select Data Connections.
You can enter some search criteria to filter the list of data connections shown (or not).
Find the workbook in question by scanning the second column -- you can sort the column if that helps.
Then select the corresponding data connection in the 4th column to see the details of the connection.
If it makes sense for the connection, you can also modify the connection directly at the server. This is really useful if you, say, need to move your enterprise database to a new IP address or change a database password, without downloading, modifying and republishing alot of workbooks.
An even better practice is to start using shared data connections hosted on Tableau server instead of having each workbook have its own local copy of connection and related info.

Pulling Data From an SQL Database in HTML 5

I am trying to develop a BlackBerry application that will show data from an SQL Database from a server. I was researching the new HTML 5 option for blackberry (WebWorks) and noticed that it apparently cannot connect to any server data by itself. Some links state that I would need javascript coding to obtain it. I looked into the option of PhoneGap (link here: http://phonegap.com/) and decided I'd try using HTML 5 to produce the application. I have never touched SQL databases before and I am wondering how I would connect the two; meaning how do you pull data from the server given that you are working with HTML5?
I have looked at:
Where is data stored when using an HTML 5 Web SQL Database
Process for pulling data from a sql database
among others but I am still unsure as to what to do. I would be looking to "view" the data from the server and display it on the app. It would be something of the sort:
- HomeScreen: What data would you like to view?:
- Dropdown list of categories (from the database)
- Selecting Entry in dropdown leads to available information (from the database)
Any help would be appreciated, and of course thanks in advance.
the new (and pretty awesome) features of HTML5 is happening in the browser on the client side. What you will need is a back-end on the server side doing some magic. It is true that browsers now have databases but these are located on the phone, computer etc and as I understand your question you want these data to communicate with data on your server. To move data across the web you will need to perform HTTP-requests which can easily be done through javascript and ajax. Look a bit into these technologies and make a little server-side script that gathers data from the database and send it in a structured format to the phone (JSON, XML), then make a script in javascript on the client-side that parse these data and utilise them.
Good luck!