J
Jim D.
I have a report that when it is exported to html, the labels display as hyperlinks. I have not set the Hyperlink property on these. The only unusual thing I am doing is setting their caption at runtime in the Report.Open event.
The hypelink address is sort of like a file path mixed with an SQL statement.
Example: file:///C:/My%20Documents/<BR>SELECT%20Q_LAST_SIGHTING_CUSTOM_3.DESTINATION,%
I can't see any more of the select statement. Why would this be happening?
Thanks for the help. Below is all of the code that sets the rowsource and controlsource properties in the Report.Open event.
' Create string that has the day variables for the next two weeks;
' this is to be included in the SQL statement to fix the columns
' that display.
strDays = "'" & Format(DATE, "ddd mm/dd") & "','" & Format(DATE + 1, "ddd mm/dd") & "','" & Format(DATE + 2, "ddd mm/dd") & "','" & Format(DATE + 3, "ddd mm/dd") & "','" & Format(DATE + 4, "ddd mm/dd") & "','" & Format(DATE + 5, "ddd mm/dd") & "','" & Format(DATE + 6, "ddd mm/dd") & "','" & Format(DATE + 7, "ddd mm/dd") & "','" & _
Format(DATE + 8, "ddd mm/dd") & "','" & Format(DATE + 9, "ddd mm/dd") & "','" & Format(DATE + 10, "ddd mm/dd") & "','" & Format(DATE + 11, "ddd mm/dd") & "','" & Format(DATE + 12, "ddd mm/dd") & "','" & Format(DATE + 13, "ddd mm/dd") & "'"
' SQL statement for cross tab query
strSQL = "TRANSFORM Count(Q_ETA_CALENDAR_CUSTOM_1.Railcar) AS CountOfRailcar " _
& "SELECT IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]) AS Destination, Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "From Q_ETA_CALENDAR_CUSTOM_1 " _
& "GROUP BY IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]), Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "PIVOT Format(IIf(IsNull([ETADateAlias]),Null,IIf([ETADateAlias]>Date(),[ETADateAlias],Date())),'ddd mm/dd') In (" & strDays & ");"
' Set the report record source to the sql statement
Me.RecordSource = strSQL
' Set the control source for each column field and label for the
' next 14 days
Me.txtDay1.ControlSource = Format(DATE, "ddd mm/dd")
Me.lblDay1.Caption = Format(DATE, "mm/dd")
Me.lblWeekDay1.Caption = Format(DATE, "ddd")
Me.txtDay2.ControlSource = Format(DATE + 1, "ddd mm/dd")
Me.lblDay2.Caption = Format(DATE + 1, "mm/dd")
Me.lblWeekDay2.Caption = Format(DATE + 1, "ddd")
Me.txtDay3.ControlSource = Format(DATE + 2, "ddd mm/dd")
Me.lblDay3.Caption = Format(DATE + 2, "mm/dd")
Me.lblWeekDay3.Caption = Format(DATE, "ddd")
Me.txtDay4.ControlSource = Format(DATE + 3, "ddd mm/dd")
Me.lblDay4.Caption = Format(DATE + 3, "mm/dd")
Me.lblWeekDay4.Caption = Format(DATE + 3, "ddd")
Me.txtDay5.ControlSource = Format(DATE + 4, "ddd mm/dd")
Me.lblDay5.Caption = Format(DATE + 4, "mm/dd")
Me.lblWeekDay5.Caption = Format(DATE + 4, "ddd")
Me.txtDay6.ControlSource = Format(DATE + 5, "ddd mm/dd")
Me.lblDay6.Caption = Format(DATE + 5, "mm/dd")
Me.lblWeekDay6.Caption = Format(DATE + 5, "ddd")
Me.txtDay7.ControlSource = Format(DATE + 6, "ddd mm/dd")
Me.lblDay7.Caption = Format(DATE + 6, "mm/dd")
Me.lblWeekDay7.Caption = Format(DATE + 6, "ddd")
Me.txtDay8.ControlSource = Format(DATE + 7, "ddd mm/dd")
Me.lblDay8.Caption = Format(DATE + 7, "mm/dd")
Me.lblWeekDay8.Caption = Format(DATE + 7, "ddd")
Me.txtDay9.ControlSource = Format(DATE + 8, "ddd mm/dd")
Me.lblDay9.Caption = Format(DATE + 8, "mm/dd")
Me.lblWeekDay9.Caption = Format(DATE + 8, "ddd")
Me.txtDay10.ControlSource = Format(DATE + 9, "ddd mm/dd")
Me.lblDay10.Caption = Format(DATE + 9, "mm/dd")
Me.lblWeekDay10.Caption = Format(DATE + 9, "ddd")
Me.txtDay11.ControlSource = Format(DATE + 10, "ddd mm/dd")
Me.lblDay11.Caption = Format(DATE + 10, "mm/dd")
Me.lblWeekDay11.Caption = Format(DATE + 10, "ddd")
Me.txtDay12.ControlSource = Format(DATE + 11, "ddd mm/dd")
Me.lblDay12.Caption = Format(DATE + 11, "mm/dd")
Me.lblWeekDay12.Caption = Format(DATE + 11, "ddd")
Me.txtDay13.ControlSource = Format(DATE + 12, "ddd mm/dd")
Me.lblDay13.Caption = Format(DATE + 12, "mm/dd")
Me.lblWeekDay13.Caption = Format(DATE + 12, "ddd")
Me.txtDay14.ControlSource = Format(DATE + 13, "ddd mm/dd")
Me.lblDay14.Caption = Format(DATE + 13, "mm/dd")
Me.lblWeekDay14.Caption = Format(DATE + 13, "ddd")
The hypelink address is sort of like a file path mixed with an SQL statement.
Example: file:///C:/My%20Documents/<BR>SELECT%20Q_LAST_SIGHTING_CUSTOM_3.DESTINATION,%
I can't see any more of the select statement. Why would this be happening?
Thanks for the help. Below is all of the code that sets the rowsource and controlsource properties in the Report.Open event.
' Create string that has the day variables for the next two weeks;
' this is to be included in the SQL statement to fix the columns
' that display.
strDays = "'" & Format(DATE, "ddd mm/dd") & "','" & Format(DATE + 1, "ddd mm/dd") & "','" & Format(DATE + 2, "ddd mm/dd") & "','" & Format(DATE + 3, "ddd mm/dd") & "','" & Format(DATE + 4, "ddd mm/dd") & "','" & Format(DATE + 5, "ddd mm/dd") & "','" & Format(DATE + 6, "ddd mm/dd") & "','" & Format(DATE + 7, "ddd mm/dd") & "','" & _
Format(DATE + 8, "ddd mm/dd") & "','" & Format(DATE + 9, "ddd mm/dd") & "','" & Format(DATE + 10, "ddd mm/dd") & "','" & Format(DATE + 11, "ddd mm/dd") & "','" & Format(DATE + 12, "ddd mm/dd") & "','" & Format(DATE + 13, "ddd mm/dd") & "'"
' SQL statement for cross tab query
strSQL = "TRANSFORM Count(Q_ETA_CALENDAR_CUSTOM_1.Railcar) AS CountOfRailcar " _
& "SELECT IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]) AS Destination, Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "From Q_ETA_CALENDAR_CUSTOM_1 " _
& "GROUP BY IIf(Left([DestinationAlias],8)='HOPEWELL',[DestinationAlias] & ' ' & [ConsigneeAddress1],[DestinationAlias]), Q_ETA_CALENDAR_CUSTOM_1.LE " _
& "PIVOT Format(IIf(IsNull([ETADateAlias]),Null,IIf([ETADateAlias]>Date(),[ETADateAlias],Date())),'ddd mm/dd') In (" & strDays & ");"
' Set the report record source to the sql statement
Me.RecordSource = strSQL
' Set the control source for each column field and label for the
' next 14 days
Me.txtDay1.ControlSource = Format(DATE, "ddd mm/dd")
Me.lblDay1.Caption = Format(DATE, "mm/dd")
Me.lblWeekDay1.Caption = Format(DATE, "ddd")
Me.txtDay2.ControlSource = Format(DATE + 1, "ddd mm/dd")
Me.lblDay2.Caption = Format(DATE + 1, "mm/dd")
Me.lblWeekDay2.Caption = Format(DATE + 1, "ddd")
Me.txtDay3.ControlSource = Format(DATE + 2, "ddd mm/dd")
Me.lblDay3.Caption = Format(DATE + 2, "mm/dd")
Me.lblWeekDay3.Caption = Format(DATE, "ddd")
Me.txtDay4.ControlSource = Format(DATE + 3, "ddd mm/dd")
Me.lblDay4.Caption = Format(DATE + 3, "mm/dd")
Me.lblWeekDay4.Caption = Format(DATE + 3, "ddd")
Me.txtDay5.ControlSource = Format(DATE + 4, "ddd mm/dd")
Me.lblDay5.Caption = Format(DATE + 4, "mm/dd")
Me.lblWeekDay5.Caption = Format(DATE + 4, "ddd")
Me.txtDay6.ControlSource = Format(DATE + 5, "ddd mm/dd")
Me.lblDay6.Caption = Format(DATE + 5, "mm/dd")
Me.lblWeekDay6.Caption = Format(DATE + 5, "ddd")
Me.txtDay7.ControlSource = Format(DATE + 6, "ddd mm/dd")
Me.lblDay7.Caption = Format(DATE + 6, "mm/dd")
Me.lblWeekDay7.Caption = Format(DATE + 6, "ddd")
Me.txtDay8.ControlSource = Format(DATE + 7, "ddd mm/dd")
Me.lblDay8.Caption = Format(DATE + 7, "mm/dd")
Me.lblWeekDay8.Caption = Format(DATE + 7, "ddd")
Me.txtDay9.ControlSource = Format(DATE + 8, "ddd mm/dd")
Me.lblDay9.Caption = Format(DATE + 8, "mm/dd")
Me.lblWeekDay9.Caption = Format(DATE + 8, "ddd")
Me.txtDay10.ControlSource = Format(DATE + 9, "ddd mm/dd")
Me.lblDay10.Caption = Format(DATE + 9, "mm/dd")
Me.lblWeekDay10.Caption = Format(DATE + 9, "ddd")
Me.txtDay11.ControlSource = Format(DATE + 10, "ddd mm/dd")
Me.lblDay11.Caption = Format(DATE + 10, "mm/dd")
Me.lblWeekDay11.Caption = Format(DATE + 10, "ddd")
Me.txtDay12.ControlSource = Format(DATE + 11, "ddd mm/dd")
Me.lblDay12.Caption = Format(DATE + 11, "mm/dd")
Me.lblWeekDay12.Caption = Format(DATE + 11, "ddd")
Me.txtDay13.ControlSource = Format(DATE + 12, "ddd mm/dd")
Me.lblDay13.Caption = Format(DATE + 12, "mm/dd")
Me.lblWeekDay13.Caption = Format(DATE + 12, "ddd")
Me.txtDay14.ControlSource = Format(DATE + 13, "ddd mm/dd")
Me.lblDay14.Caption = Format(DATE + 13, "mm/dd")
Me.lblWeekDay14.Caption = Format(DATE + 13, "ddd")