Click here to Skip to main content
14,973,021 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a problem with managing reports via the .NET Component Report Viewer. I can't dynamically manage a field and make it either a text or an image, based on the value I get programmatically. So what I need is that the field becomes a text field when I have a generic value, it becomes an image field, when instead I have an image value. All this must be done dynamically and the text or image must be in the same overlapping cell, they cannot be side by side or above and one below, they must be in the same position and they must be able to change dynamically. Could someone please help me out? I hope I was understandable and comprehensive. In any case, if you need further clarification, I remain available. I hope someone will answer me. Thank you. Greetings to all.

What I have tried:

I've tried to insert a textbox and an image control in the same cell, then i tried to setting up the visibility control of the textbox and the image, but the problem is that both the image and the textbox refers to the same value. So the goal is to dynamically manage only one textbox and that it becomes a text field when I have a generic value and it becomes an image field, when I have an image value.
Posted
Comments
Richard Deeming 19-Mar-21 12:59pm
   
How about passing a parameter to indicate whether the value is an image or text?
IlPalàndra 19-Mar-21 13:06pm
   
How can I use the parameter? If the parameter indicate an image what I have to do next? And then if the parameter indicate a text what I have to do?
Then, how can I indicate if the value is an image or a text?
Gerry Schmitz 19-Mar-21 14:13pm
   
It's "in the data". It's a "data driven" report process. Use a "transparent image" if you have to if you can't figure out how to toggle one over the other.
IlPalàndra 19-Mar-21 14:32pm
   
So I have to create a parameter that I find in the report data and not an image that I find in the toolbox right?
If I create a parameter, then it is compatible with an image? Because the type of data available are integer, text, date and there is not the type image. In my case I use a blob type for images
Gerry Schmitz 21-Mar-21 10:45am
   
ETL - extract, translate, load (or report, in this case). Create an "image" of the text, if there is no image. Then always show an image; and not worry about image OR text." Or some other "pre-report" process. Not everything has to be done, or can be accomplished, at "report time".
IlPalàndra 21-Mar-21 15:02pm
   
Thanks for your helpful advices, so if I use a simple parameter it can also show an image if the value of my database contains an image right? I tried to do this, but how can I view correctly an image in the parameter? Can you give me some examples? Thanks in advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900