How can I tell if an emailed SSRS Report has been viewed or opened? - reporting-services

Is there an EASY way to add something to the SSRS Report email being sent to tell if it has been opened or viewed?
I am not really interested in WHO viewed it, I am looking to cleanup the reports so I just want to know if ANYONE opened/viewed the email.
I understand adding things like the URL of single pixel image and recording the calls to get that image gives an approximation of what is viewed (depending on the client, etc..), but I'd rather not write something like that from scratch. And I'm not exactly sure of how to inject that into an SSRS sent email either.

Related

SQL drop down selections in HTML

I'm new to HTML and coding period. I've created a basic HTML page. In that page i want to create dropdown selections that produce outputs from my SQL database. MSSQL not MySQL.
EX: If I select a table or a column from dropdown one and then input a keyword for selection box 2. I want it to produce a table that shows the information in that table/column with that keyword.
If I select a medical name from dropdown and I want it to show only medical names that are equal to Diabetes. and then show me those rows from my database to a table. How would I show that in HTMl from connecting to the database, to creating the dropdown selection linked to the database, and then being able to select the criteria for what I want to be displayed. and then showing that in a table or list format.
Thank you in advance
OK, Facu Carbonel's answer is a bit... chaotic, so since this question (suprisingly) isn't closed yet, I'll write one myself and try to do better.
First of all - this is a VERY BROAD topic which I cannot answer directly. I could give a pile of code, but walking through it all would take pages of text and in the end you'd just have a solution for this one particular problem and could start from scratch with the next one.
So instead I'll take the same path that Factu Carbonel took and try to show some directions. I'll put keywords in bold that you can look up and research. They're all pieces of the puzzle. You don't need to understand each of them completely and thoroughly from the beginning, but be aware what they are and what they do, so that you can google finer details when you need them.
First of all, you need to understand the roles of the "server side" and "client side".
The client side is the browser (Chrome, Firefox, Internet Explorer, what have you). When you type an address in the address bar (or click a link or whatever), what the browser does is it parses the whole thing and extracts the domain name. For example, the link to this question is https://stackoverflow.com/questions/59903087/sql-drop-down-selections-in-html?noredirect=1#comment105933697_59903087 and the domain part of that is stackoverflow.com. The rest of this long jibberish (it's called an "URL" by the way) is also relevant, but later.
With the domain in hand the browser then uses the DNS system to convert that pretty name into an IP address. Then it connects via network to the computer (aka "server") designated by that IP address and issues a HTTP request (HTTP, not HTML - don't mix these up, they're not the same thing).
HTTP, by the way, is the protocol that is used on the web to communicate between the server and the browser. It's like a language that they both understand, so that the browser can tell the server hey, give me the page /questions/59903087/sql-drop-down-selections-in-html. And the server then returns the HTML for that page.
This, by the way, is another important point to understand about HTTP. First the browser makes its request, and the server listens. Then the server returns its response, and the browser listens. And then the connection is closed. There's no chit-chat back and forth. The browser can do another request immediately after that, but it will be a new request.
Now, the browser is actually pretty limited in what it can do. Through these HTTP requests it gets from the server the HTML code, the CSS code and the Javascript code. It also can get pictures, videos and sound files. And then it can display them according to the HTML and CSS. And Javascript code runs inside the browser and can manipulate the HTML and CSS as needed, to respond to the user's actions. But that's all.
It might seem that the Javascript code that runs inside the browser is all powerful, but that is only an illusion as well. It's actually quite limited, and on purpose. In order to prevent bad webpages from doing bad things, the Javascript in each page is essentially limited to that page only.
Note a few things that it CANNOT do:
It cannot connect to something that doesn't use HTTP. Like an SQL server.
It can make HTTP requests, but only to the same domain as the page (you can get around this via CORS, but that's advanced stuff you don't need to worry about)
It cannot access your hard drive (well, it can if the user explicitly selects a file, but that's it)
It cannot affect other open browser tabs
It cannot access anything in your computer outside the browser
This, by the way, is called "sandboxing" - like, the Javascript code in the browser is only allowed to play in its sandbox, which is the page in which it was loaded.
OK, so here we can see, that accessing your SQL server directly from HTML/CSS/Javascript is impossible.
Fortunately, we still need to talk about the other side of the equation - the web server which responded to the browser's requests and gave it the HTML to display.
It used to be, far back in the early days of the internet, that web servers only returned static files. Those days are long gone. Now we can make the webserver return -- whatever we want. We can write a program that inspects the incoming request from the browser, and then generates the HTML on the fly. Or Javascript. Or CSS. Or images. Or whatever. The good thing about the server side is - we have FULL CONTROL over it. There are no sandboxes, no limits, your program can do anything.
Of course, it can't affect anything directly in the browser - it can only respond to the browsers requests. So to make a useful application, you actually need to coordinate both sides. There's one program running in the browser and one program running on the web server. They talk through HTTP requests and together they accomplish what they need to do. The browser program makes sure to give the user a nice UI, and the server program talks to all the databases and whatnot.
Now, while in browser you're basically limited to just Javascript and the features the browser offers you, on the server side you can choose what web server software and what programming language you use. You can use the same Javascript, or you can go for something like PHP, Java (not the same as Javasctipt!), C#, Ruby, Python, and thousands of others. Each language is different and does things its own way, but at the end of the day what it will do is that it will receive the incoming requests from the browser and generate some sort of output that the browser expects.
So, I hope that this at least gives you some starting point and outlines where to go from here.
First of all there is something that you need to know to do this, and that is the difference between a front-end and a back-end.
Html is a front-end technology, they are called like that because that's what is shown to the user and the back-end it's all mechanisms that run behind the hood.
The thing is, in your front-end you can't do things of back-end, like do querys from a database, manage sessions and that kind of thing.
For that you need a back-end running behind, like php, ruby, node.js or some technology like that.
From the html you can only call functions on the server using things like <form action="/log" method="POST"> this wold call the action /log that you should have already program on your back-end. Don't get confuse with this, there is plenty of ways to sending request to your back-end and this is just one way to do it.
For your specific case I recommend you to look up for ajax, to do the query on your database with no need of the browser to refresh after the query is made.
Some topics you need to know to understand this is:
-what's front-end and back-end and their differences.
-what is client-server architecture
-ajax
-http requests
-how to work with a back-end, doing querys to the database, making routes, etc.
-and for last, wile your server it's not open to the world with your own domain name, what is localhost and how to use it.
I hope that this clarify a bit this, that is no easy thing, but with a bit of research and practice you will accomplish!

SSRS 2016 Object Alignment is off on Server Render

I'm trying to create floor plan maps with data interspersed throughout the map. When I'm in design mode AND preview mode in Visual Studio, the report appears with objects perfectly lined up as I expect. However, when I publish to the server and run on the server, object alignment is off. I can't find anything related to my issue or how to tell it I want things placed in a specific location when running on the server. I'm already using Rectangles to contain elements but that doesn't seem to help. Images below show what I'm running in to. I have Admin access to the server so if I need to make changes there, I can. I'm happy to share my .RDL file if I can figure out how to upload it.
Any ideas to fix this infuriating problem would be welcome.
Design mode:
Preview mode:
Render on the server:
Unfortunately, SSRS is pretty bad for something like this that requires precise locations. Not really a setting you can adjust to fix it, it's just not meant for this type of application. Additionally, the report manager(in browser) always messes up the formatting. I always recommend exporting the report to a .pdf to see how it looks before finalizing anything. With that said, if this is client facing -- I'd suggest adapting this to use a .pdf viewer or just exports and opens a .pdf. Cleans things up and gives you a uniform result every time.
Another thing I could suggest if you insist on using SSRS would be to re-do the report using Tablixes as opposed to rectangles. These tend to hold shape better and you could do some creative borders to produce a similar result.

Enable copy/paste for SSRS report in preview mode

How can we enable the copy/paste option for ssrs report content in preview mode? Now in my report, I don't get a copy/paste menu in mouse right click.
You cannot copy text from a report in preview mode; it has never been an option in any version of the tool that I have worked with. I have often wished it was. Pasting, of course, would never be an option.
Work around: export the results to Excel, or PDF, and copy from that output. Or, deploy the report to your reporting server, and work with the results there. Once the report is open in a browser using Report Manager, you can select and copy the results all you like.
Probably not the answer you were hoping for, but likely the only true answer. I would love to be wrong on this one.
Richards answer is the best answer and upvoted. When you can easily export report data in any format then why you want to copy and paste from the preview mode? if you still want to have a feel of preview mode, you can take screenshots and then probably apply some OCR?
Otherwise, just to add value to Richard's answer above, you can export the report (data) in the preview mode using export button displayed in the screen below and you can choose any format of your choice:
sounds good?

How can I track the number of times an image is accessed on my Microsoft server?

Say I have an image on my server
C:\inetpub\somesite\images\someimage.jpg
whose URL is
http://MyAwesomeWebsite.com/images/someimage.jpg
and which I'm using in the HTML
<img src="http://MyAwesomeWebsite.com/images/someimage.jpg"/>
of an HTML email I'm sending out. I want to see how many people read this email by tracking how many times a request is made to use that image. Is that possible? Is there a better way of doing this without using 3rd-party software? I know about LogFile, but I don't want to have to develop a script that looks through every text document for the number of instances of the expression "someimage.jpg", although that's what I might have to do.

The selected report is not ready for viewing. The report is still being rendered or a report snapshot is not available. (rsReportNotReady)

I am encountering the Error mentioned on subject everytime i use the interactive sorting on the exported .HTML file.
Here's the scenario. I have a report(with an interactive sorting column) which i created a subscription to run and generate an .HTML format every 2 minutes.
I would like to know if the interactive sorting feature will still work on the .HTML that was generated? Let me know your thoughts and tricks if ever.
Thanks.
Try removing compatibility view setting for intranet sites if you can.
Also check to see if your browser and os support the interactive features of SSRS here, there is a table at the bottom of that page.
There is a long rant here that discusses the problems with rendering SSRS report in HTML. It also show some workarounds you can do with jquery.
If all that fails, just render your reports in Excel, your users can filter it and sort it any way they want.