Jump to content
Fivewin Brasil

Fastreport para xHarbour


Edu

Recommended Posts

Uma forma bem simples e automática de fazer isso amigo

// INICIO DO RELATÓRIO
oFrPrn := frReportManager():new()
oFrPrn:SetIcon(1) //ícone da janela do FRH
oFrPrn:SetTitle( cTitulo ) //título da janela do FRH
oFrPrn:SetTitle( cTipo ) //título da janela do FRH
oFrPrn:SetTitle( cUSUARIO ) //título da janela do FRH
oFrPrn:SetTitle( cImagem1 ) //título da janela do FRH
oFrPrn:LoadLangRes( 'brazil.xml') //arquivo de idioma
// BASE DE DADOS PRINCIPAL COM ARRAY
FOR nI:=1 To Len(aCabec)
cCabec+=aCabec[nI]+IF(nI==Len(aCabec),'',';')
cIFF +="IIF( aField == '"+aCabec[nI]+"',"+str(nI)+","+IF(nI<>Len(aCabec),"",REPLICATE(')', Len(aCabec) ) )
Next
oFrPrn:SetUserDataSet( "TMP_ABASTECE",cCabec,;
{||np := 1}, ; //--> bGoTop
{||np := np + 1}, ; //--> bSkipPlus
{||np := np - 1}, ; //--> bSkipMinus
{||np > Len(TMP_ABASTECE)}, ; //--> bCheckEOF
{|aField|nCol := &cIFF,;
TMP_ABASTECE[np, nCol] } )
oFrPrn:LoadFromFile(RepDir+"R_ABT_001.FR3") // para leitura direta de arquivo FR3
oFrPrn:PreviewOptions:SetAllowEdit( .f. ) // inibe o botão de edição do relatório pelo usuário
IF lDesig
oFrPrn:DesignReport()
oFrPrn:ShowReport()
ELSE
oFrPrn:ShowReport() // aqui para gerar o preview do relatório.
ENDIF
oFrPrn:DestroyFR()
qualquer dúvida meu Skype alessandroavel@ibest.com.br
Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

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

Loading...
×
×
  • Create New...