Full Version: hide field(s) on report
UtterAccess Discussion Forums > Microsoft® Access > Access Reports
Beejay
From some reports I have created it would be useful if I could hide some fields on the moment I want to print those reports. Off course I can create copies of the same reports without these specific fields, but that is not really what I'm looking for, because then I will have a lot of reports in my database.
Jerry Dennison
If you have a large number of fields that are empty or have information that is not relevant, then you probably have a problem with your table structure. Does all of your tables meet at least the Third Normal Form?
LuizFLC
on the event of format the report

if isnull(me.field) then
me.field.visible=false
end if
Beejay
The probem is not that I have fields that are empty. It is just that sometimes I want some fields not to be shown because certain fields contain confidential information. For example I have a report with all kind of information about insurances. I want to be able to print reports with and without the field "Annual premium". Depending on to whom I want to send the report. Off course I can make two reports but perhaps there is a possibility to use the one report, but before generating it, to choose that you want to hide certain feilds.

I hope this is all clear now.
LuizFLC
You have to inform a condition,otherwise how you could create a code

Regards
Jerry Dennison
I beg to differ. I have yet to see any entity with 75 attributes. I strongly suspect that you have repeating groups and that your table violates the Normal Forms.
Beejay
Dear Jerry,


I think we are not talking about the same things here. Suppose I have created a report that showes two fields: a field called "Monthly wage" and a field called "Bonus".

The case is that to some people I want to send a report with both fields on it and it to some people I want to send a report with only the field "Monthly wage" on it, just because the field "Bonus" is confidential.

Off course I can make two reports. One with both fields on it and one with only the field "Monthly wage" on it.

However that is not my question. Upon printing or e-mailing my report I would like to be able to pick which fields I want to have on it. On the spot so to say. Is that possible?

compute.gif
Jerry Dennison
While it is possible to do what you're asking programmatically, it is not really advisable to try and do so. It is more trouble that it's worth. Unless there is some overwhelming reason to do otherwise, I would make two reports.

What exactly are you trying to do?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.