Hiding report elements in report view (1 Viewer)

solnajeff

Registered User.
Local time
Today, 18:04
Joined
May 22, 2007
Messages
33
Hi

I have a report that is used for printing tests for trainees. One test involves the addition of between one and three variables. In the printed version the addition signs that are not required can be removed using Detail_Print or Detail_Format.

However as I intend to also administer tests using the computer I would like to remove unnecessary addition signs from the report view. The report is embedded in a form but 'Detail' code is not executed when the embedded report is loaded.

I did try changing the default report view to print preview for the embedded report but that did not have any effect.

If anyone has come across this before I would be grateful for any advice.

Regards

Jeff
 

Minty

AWF VIP
Local time
Today, 15:04
Joined
Jul 26, 2013
Messages
10,354
Is the field is a calculated one , something like

Code:
ReportValue: [Field1] & "+" & [Field2] & "+" & [Field3]

?
 

isladogs

MVP / VIP
Local time
Today, 15:04
Joined
Jan 14, 2017
Messages
18,186
If the report is embedded in a form then neither report view nor print preview will be used.
It will be subject to whichever view your form is in. Form view or layout view
 

solnajeff

Registered User.
Local time
Today, 18:04
Joined
May 22, 2007
Messages
33
Hi

No the format is "expression 1" "+" "expression 2" "+" "expression 3", no calculations involved

The expressions are text only which the trainee has to calculate mentally and then add together. The number of expressions may be one or two or three, however if one or two I am left with unwanted addition signs that I wish to hide.

When printing this is no problem as it is done in Detail Print, but I cannot workout if it is possible to hide in report view

Regards

Jeff
 

GinaWhipp

AWF VIP
Local time
Today, 11:04
Joined
Jun 21, 2011
Messages
5,901
Hmm, try...

[expression 1] & (” “+[expression 2]) & (” “+[expression 3])

Edit: If the first expression can be left blank you want to use...

LTrim([expression 1] & (” “+[expression 2]) & (” “+[expression 3]))
 
Last edited:

solnajeff

Registered User.
Local time
Today, 18:04
Joined
May 22, 2007
Messages
33
Hi

Thanks for the advice, unfortunately it is the third and second that would be blank. However it did give me the idea to add the addition signs at the time of the test creation rather than at the report stage and now it displays correctly.

Many thanks for all your input

Regards

Jeff
 

GinaWhipp

AWF VIP
Local time
Today, 11:04
Joined
Jun 21, 2011
Messages
5,901
What I gave you should show nothing if any one of them is blank leaving you only with the one that is actually filled in. Are you saying that is not what is happening?
 

Users who are viewing this thread

Top Bottom