PeterWallace
Programmer
I am having trouble formatting dates on Data report ...
the Table date field may have a valid date , or a ZERO
and as ZERO is a valid date it is printed as 30/12/1899
I have already dumped the Table into a Msflexgrid ... and formatted the grid so these dates are shown as blank
is there a way that I can get the Date field on the report to display blank field .....
Long way would be to create a tempory table and load origional Data into that Table switching the Date fields to Text via using Format to display as a date or Blank ..
could then use this as Input to datareport ....
BUT have already done that in the MSFlexgrid
Can I use the MSFlexgrid as input to DataReport
instead of a table as in sample
With RptWaterHist
.DataMember = vbNullString
Set .DataSource = Altrst
.Caption = Trim(Printtitle)
With .Sections("Section1").Controls
.Item("ref").DataField = Altrst.Fields(0).Name
.Item("Billed").DataField = Altrst.Fields(1).Name
.Item("BilledDate").DataField = Altrst.Fields(2).Name)
.Item("Paid").DataField = Altrst.Fields(3).Name
.Item("PaidDate").DataField = Altrst.Fields(4).Name)
End With
.Sections("Section2").Controls.Item("TradeAs").Caption = ClientBName
.Sections("Section2").Controls.Item("PrintTitle").Caption = Printtitle
.Sections("Section2").Controls.Item("Abn").Caption = "ABN : " & ClientAbn
.Sections("Section2").Controls.Item("DeName").Caption = Tname
.Sections("Section2").Controls.Item("DeAddress").Caption = TAddress
.Sections("Section5").Controls.Item("Label4").Caption = BilleddoubleSTRING
.Sections("Section5").Controls.Item("Label5").Caption = PaiddoubleSTRING
.Sections("Section5").Controls.Item("Label6").Caption = DuedoubleSTRING
RptWaterHist.WindowState = 2
.Show vbModal
End With
the Table date field may have a valid date , or a ZERO
and as ZERO is a valid date it is printed as 30/12/1899
I have already dumped the Table into a Msflexgrid ... and formatted the grid so these dates are shown as blank
is there a way that I can get the Date field on the report to display blank field .....
Long way would be to create a tempory table and load origional Data into that Table switching the Date fields to Text via using Format to display as a date or Blank ..
could then use this as Input to datareport ....
BUT have already done that in the MSFlexgrid
Can I use the MSFlexgrid as input to DataReport
instead of a table as in sample
With RptWaterHist
.DataMember = vbNullString
Set .DataSource = Altrst
.Caption = Trim(Printtitle)
With .Sections("Section1").Controls
.Item("ref").DataField = Altrst.Fields(0).Name
.Item("Billed").DataField = Altrst.Fields(1).Name
.Item("BilledDate").DataField = Altrst.Fields(2).Name)
.Item("Paid").DataField = Altrst.Fields(3).Name
.Item("PaidDate").DataField = Altrst.Fields(4).Name)
End With
.Sections("Section2").Controls.Item("TradeAs").Caption = ClientBName
.Sections("Section2").Controls.Item("PrintTitle").Caption = Printtitle
.Sections("Section2").Controls.Item("Abn").Caption = "ABN : " & ClientAbn
.Sections("Section2").Controls.Item("DeName").Caption = Tname
.Sections("Section2").Controls.Item("DeAddress").Caption = TAddress
.Sections("Section5").Controls.Item("Label4").Caption = BilleddoubleSTRING
.Sections("Section5").Controls.Item("Label5").Caption = PaiddoubleSTRING
.Sections("Section5").Controls.Item("Label6").Caption = DuedoubleSTRING
RptWaterHist.WindowState = 2
.Show vbModal
End With