Announcement

Collapse
No announcement yet.

Global variable in Grid application

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

  • Global variable in Grid application

    I'm having problems while passing parameters to a pdf report application from a grid application when "Imprimir" button is pressed. As showed in the image.

    I want to to pass as parameter the Material to the pdf report when the button is clicked. My code is the following in the grid application:

    [busqueda] = {Material};
    sc_redir(pdfreport_Dibujo,[busqueda], "_blank");
    sc_exit(sel);

    and my sql statement on the pdf report:

    SELECT
    Material,
    Codigo,
    Provider1,
    Provider2,
    Provider3,
    Provider4,
    Provider5,
    Provider6
    FROM
    Dibujo
    WHERE
    (Material = '[busqueda]')
    Last edited by boschrenos; 03-10-2016, 07:04 PM.

  • #2
    In the grid don't set the [busqueda] var.
    Try this:

    Code:
    sc_redir(pdfreport_Dibujo,busqueda={Material}, "_blank");

    Comment


    • #3
      Originally posted by robydago View Post
      In the grid don't set the [busqueda] var.
      Try this:

      Code:
      sc_redir(pdfreport_Dibujo,busqueda={Material}, "_blank");
      Exactly. Is not needed to set the var before the redir, but as robydago sais, the problem is how you pass the param, is incorrect.

      1.- Set your global var as out, and on report, as in, and don't add to the redir..or.
      2.- sc_redir(pdfreport_Dibujo,busqueda=[busqueda], "_blank") or sc_redir(pdfreport_Dibujo,busqueda={Material}, "_blank")
      /Giuseppe

      Professional Scriptcase Services
      Some Customers opinions

      Comment

      Working...
      X