Passthrough and open new page

  • now the requirement is to have the pass through report open in a new window. I've cut back the number of parameters and now the silliest error of all. Here is my Text box Action for Go to URL

    ="void window.open('" & Globals!ReportServerUrl & "/Pages/ReportViewer.aspx?"

    & Globals!ReportFolder & "/Labor+Detail"

    & "&StartDate=" & Fields!pStartDate.Value

    '& "&EndDate=" & Fields!pEndDate.Value

    & "&ID=" & Fields!pID.Value

    & "&Dept=DETAIL&Dept=VENEER&Dept=MACHINE&Dept=CABINET&Dept=FINISH&Dept=METAL&Dept=SHIPPING&Dept=INSTALL&Dept=OTHER"

    & "','_blank')"

    You may have noticed the line with &EndDate= is commented out. That is because I get the error

    the ActionInfo.Action.Hyperlink expression for the text box 'Textbox264' contains an error: [BC30277] Type character '&' does not match declared data type 'Object'.

    I only get the error for that line and not the Start Date line. Both fields are defined as DATETIME in my procedure. I have also tried using Parameters!StartDate.Value and Parameters!EndDate.Value and get the same results. I have learned that it sometimes helps to pass the parameters back in the result set as a field to fix problems. Not this time. the values returned are StartDate: 1990-01-01 00:00:00.000 and EndDate: 2016-08-01 09:33:54.620 (CURRENT_TIMESTAMP). I've also tried to CAST both as DATE. I get the same error. I just can't understand why one DateTime works and the other doesn't.

    John
    SQL Rebel without a Where Clause
    SQL/Epicor/Prophet21/VISUAL/e.i.e.i.o.

  • If anyone is interested, this works...

    ="void window.open('" & Globals!ReportServerUrl & "/Pages/ReportViewer.aspx?"

    & Globals!ReportFolder & "/Labor+Detail"

    & "&StartDate=" & CDate(First(Fields!pStartDate.Value, "dsOrdSummary"))

    & "&EndDate=" & CDate(First(Fields!pEndDate.Value, "dsOrdSummary"))

    & "&ID=" & CStr(Parameters!ID.Value)

    & "&Dept=DETAIL&Dept=VENEER&Dept=MACHINE&Dept=CABINET&Dept=FINISH&Dept=METAL&Dept=SHIPPING&Dept=INSTALL&Dept=OTHER"

    & "','_blank')"

    John
    SQL Rebel without a Where Clause
    SQL/Epicor/Prophet21/VISUAL/e.i.e.i.o.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply