Announcement

Collapse
No announcement yet.

BUG SC V. 8.00.0041 Header/Footer unable to call databases

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • BUG SC V. 8.00.0041 Header/Footer unable to call databases

    Hi,

    after the header/footer calls in pdf-reports are enabled, I tried to select a fields from another table,
    which results in an error message:

    Fehler
    Undefined variable: field_state_id
    Fehler
    Undefined property: Header_Footer::$Db
    Fatal error: Call to a member function Execute() on a non-object in C:\Program Files\NetMake\v8\wwwroot\scriptcase\app\AppName\pd freport_test2\pdfreport_test2_head_foot.php on line 32
    The code snip of "Selecting fields from another table" is NOT working, ending in such an error message within on_header and on_footer event. The other events it is working ...

    BR

    Eric
    Last edited by EricB; 04-22-2015, 04:25 AM. Reason: explain that it does not work in pdf-reports, just to make it clear

  • #2
    Is not a bug, you just can't do database statements in this events
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      According to the docs you can use sc_select in a grid onfooter/onheader. So it looks like a bug to me.

      Ex. 2: The SQL command can passed as application fields (local variables) or of global variables.
      sc_select(dataset,"select price order from order where clientId = '{clientId}' and cod_Seller = [var_glo_seller]");

      Note: The command must always be finished with semicolon";".
      on grid:
      onClick
      onClick
      onFooter <=
      onGroupBy
      onHeader <=
      onNavigate
      onRecord
      onScriptInit
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        Originally posted by aducom View Post
        According to the docs you can use sc_select in a grid onfooter/onheader. So it looks like a bug to me.

        Ex. 2: The SQL command can passed as application fields (local variables) or of global variables.
        sc_select(dataset,"select price order from order where clientId = '{clientId}' and cod_Seller = [var_glo_seller]");

        Note: The command must always be finished with semicolon";".
        on grid:
        onClick
        onClick
        onFooter <=
        onGroupBy
        onHeader <=
        onNavigate
        onRecord
        onScriptInit
        Yes you are true. Usually I don't use this events, and I was in mobile when answered. I just did a quick search on webhelp and this confused me:
        "onHeader- This event is executed immediately before displaying the grid header. Use this event to print some calculated value in the header for example."

        Now I'm in front of my SC, yes, this macros are available (green) and docs speaks about scope like you pointed.
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Just an info, I corrected my starting post. Was not talking of grid, but from pdfreport.

          Comment

          Working...
          X