0

I have an RDLC Report Table which retrieves data from a SQL Server.

I've embedded this report into an ASP.NET Web for (.aspx file) using the ReportViewer Control.

When I run the application the Data is retrieved from the SQL Server.

However, I need to have a column where the user has the ability to place a tick mark in the cells of that column.

Obviously I'm able to add a column to the Report itself in the .RDLC file but I'm not able to figure out how to get the tick mark for the user working.

Any ideas how this could be achieved?

kvj
  • 17
  • 5

1 Answers1

0

Not 100% sure what you mean by:

Obviously I'm able to add a column to the Report itself in the .RDLC file but I'm not able to figure out how to get the tick mark for the user working.

I mean, we don't have a check box control for RDL reports.

And RDL seems to struggle with boolean values.

However, for given columns?

Add a column to the data source/query - cast the boolean column to number - it will still spit out 0 (false) and 1 (true).

Then in the RDL report, you have two choices:

You can add/drop in a check box image, and display it based on the value of the colum above.

But if you want a check box, and un-checked?

You can drop in a indicator. There are a few built in ones. Pick the one with a check box and a "x" for un-checked. it has a seperator also built in - remove that.

So, you get this:

enter image description here

So, using that indicator - 0 to 0, it will display the X, and for 1 to 1, the check box.

You get this effect:

enter image description here

So, it not sure if you ONLY want a check box for true rows, or you want a check box, and a un-check box as per above. You not limited to using a "indicator" on the report, but it for sure the easy road if you need both check and X.

You also are free to input a image, and only show it as true for the column in question that has true values. However, you can't stuff two images into a single column, so indicator becomes the better choice.

Edit: this is only for display - user can't change these while viewing report.

So to be clear, this gets you display, but does not get or give you ability to check or uncheck the boxes in the report. If you need that ability I'm afraid you are out of luck.

You might be able to present data in a grid view or better yet a listview, allow users to check/ uncheck and then have a view report button. This also suggests that the data has an extra column for this purpose.

I don't believe that rdl reports have this interactive ability

Albert D. Kallal
  • 42,205
  • 3
  • 34
  • 51
  • Thank you for your answer Albert. Certainly it gives me some clarity and I will go another direction now to achieve this end user goal. – kvj Jul 25 '22 at 02:48
  • I would format out a listview - try to make it look similar - that you can add a check box to. At that point, you could then process values for checked rows and then launch a report based on that filter or as above shows, display the checked rows for the report. – Albert D. Kallal Jul 25 '22 at 02:59