fuel9 / DisplayMonkey

Display Monkey digital signage solution
Other
126 stars 50 forks source link

added code to pass parameters for SQL reports #31

Closed HansKatsman closed 5 years ago

HansKatsman commented 6 years ago

we were looking to pass SQL report parameters within the call to the report. The easiest wy was to add them after the reportname. However the enodeurl changes this code to %26 which is not recognized by SQL server. So code was added to find the parameters and strip them from the reportname.

Other option can be a database change and add the parameter field. let me know what is preferred.

DisplayMonkey commented 6 years ago

Hi, thanks a lot you for contributing to DisplayMonkey project!

Just a couple questions/comments.

A bit surprised that the URL parameters are not working for you, as we have been relying on this method for a while. Is the issue affecting both DMM preview and DMP, or just the DMP?

There is one little change we'd like to ask you to make in your contributed code. The string interpolation was introduced in C# 6. However, we are still supporting development in VS 2013. Could you please change that single line to string.Format instead?

Unfortunately, we had never developed any automated lint and test tools for this project. Have you tested this in several different scenarios, with different types of parameters to confirm?

Many thanks! Display Monkey dev team.

HansKatsman commented 6 years ago

Hi, The reports working perfect as you prepared it both in DMM and DMP. A Great idea to create a picture from the report and display this in the presentation.

In your code you added the &rs:format=IMAGE behind the url after it was converted with urlencode(). So the & within the &rs:format=Image is not converted to %26 as sql report server requires this parameter for the image command. The same with normal parameters which need to be passed to the report (if it has parameters) SQL server needs the & sign to recognize it is a parameter followed by the parametername and a value.

We tested multiple reports with one or more parameters and it worked like we want. It is already in our production environment. So we use Http://ourreportserver/birthdayreport&Location=Botlek&Plant=1 where the last two parts help to pass the parameters to the reportserver. Now we can use one report and display different content at different displays We work with visual studio 2017, so the code was changed to optimize for the latest version. I changed the code back and tested this in dev and production at our company before a new commit and it works as it did before.

psined1 commented 6 years ago

Hi, again, thank you for your contribution to the project. You guys are lightyears ahead, so it's a little hard to keep up :) We appreciate your patience.

I'm cherry picking from your code right now. The change we are most interested in at the moment is SSRS parameters fix. However, I'm looking thru some other additions, e.g. RenderMode_Fill image mode. Could you please elaborate how exactly the new mode RenderMode_Fill is different from RenderMode_Fit and RenderMode_Stretch?

HansKatsman commented 6 years ago

displaymonkey_picture options Hi Dennis,

We added a lot of improvements over the past month and are using the product now as a standard within our company

We solved a lot of small bugs (like the Chinese datetime picker bug and the maxinterval bug and added a few features like Weather Underground API etc)

We also added options to filter easier and add the designate location to more screens We will add the templates for the 5 days weather and other stuff like a scrolling memo which we use in the foorter of the page

The fill option is described in our own manual

Picture frame