Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renders select fields as inputs #87

Open
j71h opened this issue May 16, 2019 · 4 comments
Open

Renders select fields as inputs #87

j71h opened this issue May 16, 2019 · 4 comments
Labels

Comments

@j71h
Copy link

j71h commented May 16, 2019

Rendering the report parameters almost works but some fields that should be <select> end up as <input>.

image
Image 1: Old Web form rendering, notice Buildings and Language

image
Image 2: Detail on Buildings drop down with muliti-select

image
Image 3: MvcReportViewer rendering

I'm thinking of forking to fix this, do you have any clue to what is going on?

@alanjuden
Copy link
Owner

@j71h,

The logic that renders out the report parameters is located in HtmlHelperExtensions.ParametersToHtmlString(). I would be curious how you have those parameters configured on your report (where do the values come from for the dropdown). I'm basically using the available values that are defined in your report for the select fields...and if there are none, then you get an input box rather than a select box. I have some parameters in my reports that have values specified manually and some that have the values pulled from a query and both of those are working fine for me.

@j71h
Copy link
Author

j71h commented May 16, 2019

Ah, come to think of it the Buildings are populated after selecting the Client, so changing Client will change the possibilities of the Buildings selection. That might be whats causing this, no? Thought I saw something about nested calls...

The Language I do not know.

I do not have access to the Report as such, so I cannot really give you any info on how the report is setup, but I am tasked with showing it in a web site.

@alanjuden
Copy link
Owner

@j71h, If you inspect the Chrome web developer console, do you have any errors happening? There's a function that should be running on change of the select fields to perform the nested parameters lookup to build the updated lists (ReportViewer_Register_OnChanges()).

@j71h
Copy link
Author

j71h commented May 17, 2019

@alanjuden, Thanks for you comments. It lead me in the right direction. I used the code samples in your blog post as template for my view page and as it turns out that code was not up to date. Using the code in the examples here in GitHub worked much better.

Still there are some odd behavior. Those two fields are not populated on initial load, but as soon as I do a parameterRefresh they get values.
Trying to call parameterRefresh in the ready-function lead to an refresh loop, but solved populating those two fields.
Do not know if these problems are report dependent, some issue in your code or in mine, but it is at least working and not throwing exceptions even if I try to load a report without setting those two pesky parameters.

Thanks for your quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants