Jump to content
Fórum Script Brasil
  • 0

crystal reports x vbnet


mrje

Question

Boa Tarde

Nas minha aplicação em vbnet tenho diversos relatorios que faço um seleção por periodo.

Exemplo. Relação de duplitas pagas no periodo de 99/99/9999 até 99/99/9999.

Preciso colocar esse periodo con cabeçalho do relatorio.

Detalhe que para fazer esse filtro utilizo instrução a instrução abaixo :

sqlrel = ""
        If RadioButton4.Checked = True Then
            compara_de = Mid$(MaskedTextBox1.Text, 7, 4) & Mid$(MaskedTextBox1.Text, 4, 2) & Mid$(MaskedTextBox1.Text, 1, 2)
            compara_ate = Mid$(MaskedTextBox2.Text, 7, 4) & Mid$(MaskedTextBox2.Text, 4, 2) & Mid$(MaskedTextBox2.Text, 1, 2)
            sqlrel = "{despesas.c_vencimento} >= '" & compara_de & "' and {despesas.c_vencimento} <= '" & compara_ate & "'"
            sqlrel = sqlrel & " and {despesas.status_lancamento} = 0  and {despesas.idloja} = 'SP1'"
            If CheckBox2.Checked = True Then
                sqlrel = sqlrel & " and {despesas.conta} = '" & wconta & "'"
            Else
                sqlrel = sqlrel & " and {despesas.Grupo} = '1' and {despesas.conta} <> '1-9-99-999'"
            End If
            frmRelatorio.CrystalReportViewer1.SelectionFormula = sqlrel
            frmRelatorio.CrystalReportViewer1.ReportSource = "C:\Relats\PG002a.rpt"

Grato pela atenção dispensada e fico no aguardo.

Att.

João Eduardo

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

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...