Reports Blank Currency Fields

  • Thread starter Thread starter Nigel Bate
  • Start date Start date
N

Nigel Bate

I have a main report with 2 subreports, 1 for sales orders (with a Calc.
totals fields) and 1 for PO's( With Clac. Totals field). These are then used
to calculate a profit in currency & percentage on the main Report section.
My problem is, that if there are no PO's then the subreport will not show
any records & therefore nothing is displayed for the PO's total value. is
there any way to have it defaulted to (0) for the PO's total field.
Also the tables I am getting the data from are linked and read only, data
reported via queries.

Thank you
Nigel
 
Use this formula:
=VAL(NameOfTheField & "")

in the textbox of the subtotal ... if the value of the field is "" then the
VAL() function return 0.

Doc
 
It would help to know how you pull the values from the subreports into the
main report. Can you share some control sources as well as where the text
boxes are located?
 
Duane,
I am useing the sub reports to total the individual items, i.e there is
a sub report for sales and another for PO's. On the main report are the 2
text boxes for the pofits. The main report calculates this from the
subreports at report run time - if get my meaning.
Nigel
 
Unfortunetly this has returned with Error! in the text box of subreports
total field (at the moment it has the code =Sum([MySumField]), in the
reports footer.
Regards
Nigel
 
Try this:

=Val(Sum([MySumField]&"")

Nigel Bate said:
Unfortunetly this has returned with Error! in the text box of subreports
total field (at the moment it has the code =Sum([MySumField]), in the
reports footer.
Regards
Nigel
Doctor M$ said:
Use this formula:
=VAL(NameOfTheField & "")

in the textbox of the subtotal ... if the value of the field is "" then
the VAL() function return 0.

Doc
 
I kinda expected you to share a control source from your main report like:
=subrptCtrlName.Report!txtMyTotal
Or, maybe the text box control source that references both subreports.
 
Thank you very much, this worked a treat.
What would the code be if I still wanted to have the sales Total visible in
the totals field if the PO's total field was either null or 0. I could use a
query if necassary for the 2 totals to work out the profit bon a third sub
report.
Nigel
Doctor M$ said:
Try this:

=Val(Sum([MySumField]&"")

Nigel Bate said:
Unfortunetly this has returned with Error! in the text box of subreports
total field (at the moment it has the code =Sum([MySumField]), in the
reports footer.
Regards
Nigel
Doctor M$ said:
Use this formula:
=VAL(NameOfTheField & "")

in the textbox of the subtotal ... if the value of the field is "" then
the VAL() function return 0.

Doc

"Nigel Bate" <[email protected]> ha scritto nel messaggio
I have a main report with 2 subreports, 1 for sales orders (with a Calc.
totals fields) and 1 for PO's( With Clac. Totals field). These are then
used to calculate a profit in currency & percentage on the main Report
section.
My problem is, that if there are no PO's then the subreport will not
show any records & therefore nothing is displayed for the PO's total
value. is there any way to have it defaulted to (0) for the PO's total
field.
Also the tables I am getting the data from are linked and read only,
data reported via queries.

Thank you
Nigel
 
Thanks very much
Nigel Bate said:
Thank you very much, this worked a treat.
What would the code be if I still wanted to have the sales Total visible
in the totals field if the PO's total field was either null or 0. I could
use a query if necassary for the 2 totals to work out the profit bon a
third sub report.
Nigel
Doctor M$ said:
Try this:

=Val(Sum([MySumField]&"")

Nigel Bate said:
Unfortunetly this has returned with Error! in the text box of subreports
total field (at the moment it has the code =Sum([MySumField]), in the
reports footer.
Regards
Nigel
Use this formula:
=VAL(NameOfTheField & "")

in the textbox of the subtotal ... if the value of the field is "" then
the VAL() function return 0.

Doc

"Nigel Bate" <[email protected]> ha scritto nel messaggio
I have a main report with 2 subreports, 1 for sales orders (with a
Calc. totals fields) and 1 for PO's( With Clac. Totals field). These
are then used to calculate a profit in currency & percentage on the
main Report section.
My problem is, that if there are no PO's then the subreport will not
show any records & therefore nothing is displayed for the PO's total
value. is there any way to have it defaulted to (0) for the PO's total
field.
Also the tables I am getting the data from are linked and read only,
data reported via queries.

Thank you
Nigel
 
Back
Top