Jump to content
Fórum Script Brasil
  • 0

SelectionFormula não funciona com variavel basica


moisessg

Question

Ola Senhores, bom estou tentando passar um argumento para abrir o relatorio

atraves de uma text1 ou por uma DTPicker1

olhem só assim funciona.

CrystalReport1.SelectionFormula = "{ado.data} = '4/4/2012'" 'Consulta por Data
        CrystalReport1.Destination = 0
        CrystalReport1.ReportFileName = "C:\vb\relatorios1\ControlePCP.rpt"
        CrystalReport1.Action = 1
--------------------------------------------------------------- Porem preciso interagir com o usuario onde o mesmo digite o valor ou numa DTPicker1, ou numa text1
Dim criterio As Variant
        criterio = DTPicker1.Value
        CrystalReport1.SelectionFormula = "{ado.data} = 'criterio' " 'sei que o erro deve estar em alguma coisa na variavel
        CrystalReport1.Destination = 0
        CrystalReport1.ReportFileName = "C:\vb\relatorios1\ControlePCP.rpt"
        CrystalReport1.Action = 1
obs.:já tentei
Dim criterio As Variant
Dim criterio As String

O mesmo foi testado com uma Text1

Acho que bastante gente já deve ter tido esse problema.

Edited by kuroi
Adicionar tag CODE
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      652k
×
×
  • Create New...