Ir para conteúdo
Fórum Script Brasil

Pedro SI

Membros
  • Total de itens

    12
  • Registro em

  • Última visita

Tudo que Pedro SI postou

  1. Bom Dia Pessoal, Estou com uma dificuldade no DBGrid, No caso eu tenho um que está vinculado a um data source que possui campos numéricos, que são exibidos no Grid, porém cada numero é a chave de outras tabelas, para facilitar a utilização do usuário quero colocar as descrições de cada índice no Grid, Porem o DataSource que eu uso é genérico para outras utilizações e não quero colocar CalcFields nele. Existe alguma forma de criar as colunas e inserir valores selecionados nela "Manualmente", caso haja outra opção aceito sugestões também. Grato.
  2. Boa Noite Pessoal, Bom tenho que desenvolver um aplicativo para atualizar os relatórios da empresa, o servido é HTTP, utiliza aquela tecnologia do homeip.net, Porem não tenho do que utilizar, em pesquisas encontrei o componente do Indy Client TIdHTTP, gostaria de saber como utilizalo, ou se alguém me indica um servidor melhor para esta funcionalidade, explicação do sistema: Carrega os relatórios que estão sendo utilizados no cliente, carrega com um arquivo .txt que já existe no pc do cliente com a base atualizada dos relatórios, compara as duas e verifica quais estão atualizados e a partir do botão atualizar o download dos novos é feito. Qualquer Duvida estou Aqui! Muito Obrigado Pela Atenção, Pedro Henrique Malvestio da Silva.
  3. O que eu aprontei foi isso: procedure TFrmQG.StringGrid2DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); procedure DrawCellText; var Text: array[0..255] of Char; begin StrPCopy( Text, StringGrid1.Cells[ ACol, ARow ] ); ExtTextOut( StringGrid1.Canvas.Handle, Rect.Left + 2, Rect.Top + 2, ETO_CLIPPED or ETO_OPAQUE, @Rect, Text, StrLen( Text ),nil ); end; procedure DrawCellColor( CorFundo, CorLetra : TColor ); var S1, S2 : TColor; begin with StringGrid1.Canvas do begin S1 := Brush.Color; S2 := Font.Color; try {pinta o fundo com a cor desejada} Brush.Color := CorFundo; FillRect( Rect ); {pinta as letras com a cor desejada} Font.Color := CorLetra; DrawCellText; finally {restaura as cores} Brush.Color := S1; Font.Color := S2; end;{try} end;{with} end; begin StringGrid1.RowCount := 1; StringGrid2.RowCount := 1; relatorio1 := StringGrid1.Cells[1,StringGrid1.RowCount]; while relatorio1 <> '' do begin StringGrid2.RowCount :=1; relatorio2 := StringGrid2.Cells[1,StringGrid2.RowCount]; while relatorio2 <> '' do begin if relatorio1 = relatorio2 then if StringGrid1.Cells[2,StringGrid1.RowCount] <> StringGrid2.Cells[2,StringGrid2.RowCount] then begin DrawCellColor(clRed, clBlack); break; end; StringGrid2.RowCount := StringGrid2.RowCount + 1; relatorio2 := StringGrid2.Cells[1,StringGrid2.RowCount]; end; StringGrid1.RowCount := StringGrid1.RowCount + 1; relatorio1 := StringGrid1.Cells[1,StringGrid1.RowCount]; end; {If (StringGrid1.Cells[ACol,ARow] <> StringGrid2.Cells[ACol,ARow]) then DrawCellColor( clRed, clBlack );} end; e ao que me parece ele entrou um um laço infinito, tipo ele não demonstra a grade só fica fazendo testes, tem alguma maneira mais agil de isto ocorrer?
  4. Jhonas, Muito Obrigado, Procedimento terminado, só colocar o evento vinculado na StringGrid1 ;P Agora tá filé! ai na parte onde é alterada a cor eu posso inserir os If para o caso de outra variação ser inserida uma outra cor? Muito Obrigado, o codigo está quase perfeito ;D
  5. Acho que errei em alguma coisa, Porque o meu muda a cor quando eu clico em algum iten do StringGrid2 ele pinta a mesma celula referente a StringGrid1, eu simplesmente apaguei o codigo, inseri o seu, inseri os dois Grids e o obotão, ai no evento do string 2 e inseri em OnDrawCell o StringGrid2DrawCell, ai ele fica assim... o botão fica somente para preencher o grid. é este o procedimento?
  6. Me expressei mal, Eu quero que quando eu clique no botão, ou seja quando carregar os arquivos para as listas, ele já preencha a cor nas cells, no caso faria uma comparação estilo IF, e depois se fosse verdade, tal cor, se não permanece branço. Eu acho que consegui explicar melhor sakosaksaosak! abraço.
  7. Novamente Jhonas muito obrigado, Consegui fazer funcionar o preenchimento das Cells, A forma que fiz funcionar é clicando sobre a grid 2, tem alguma forma de ser alterada a cor quando eu clicar no botão? O que eu quero é fazer a comparação dos valores preenchidos e pelo resultado ele vai preenchendo cores no StringGrid1. Abraço.
  8. Jhonas, em primeiro lugar muito obrigado por sua ajuda! Referente ao código que me passou, copiei ele direto para o Delphi e inseri o botão conjunto aos dois StringGrid, ele preenche a String grid mais não muda a cor, eu tenho uma duvida com os procedures, somente de inseri los no código eles já são executados??? Pelo que noitei não só neste código mais nos outros eles nuca são chamados, e meu conhecimento é em linguagem estruturada e pouco de Objeto, é meio parecido mais to me enrolando kosakoskoaskso! Abraço.
  9. Boa Tarde Pessoal, Venho aqui pedir socorro! estou montando um programa que le todos os arquivos de uma pasta, insere em um stringGrid e após vai comparar com os arquivos de outra pasta, então ele carrega outra stringGrid para a outra pasta, no momento da comparação se o arquivo não existir na segunda pasta será pintado no primeiro string grid, porem eu não consigo fazer essa colorização da linha ou celula, Eu peço só que seja bem explicado se eu tenho que gerar um novo botão para inserir o codigo ou inserir alguma unit pois eu não estou habituado com o Delphi e suas notificações, por isso quanto mais detalhado for melhor para meu aprendizado, O codigo que carrega as string grides: function GetFileDate(TheFileName: string): string; begin f := FileOpen(TheFileName, 0); try VLResult := DateTimeToStr(FileDateToDateTime(FileGetDate(f))); finally FileClose(f); end; end; procedure TFrmQG.BtnFecharClick(Sender: TObject); begin close; end; procedure TFrmQG.BtnProcessamentoClick(Sender: TObject); begin {if Gauge1.MaxValue = 0 then Gauge1.MaxValue := Table1.RecordCount; Gauge1.Progress := VGRegistrosLidos; LLidos.Caption := FormatFloat('###,###,##0',VGRegistrosLidos); LGravados.Caption := FormatFloat('###,###,##0',VGRegistrosGravados); LIgnorados.Caption := FormatFloat('###,###,##0',VGRegistrosIgnorados); LErros.Caption := FormatFloat('###,###,##0',VGRegistrosErros); if VGRegistrosErros <> 0 then Panel2.Color := clRed;} end; procedure TFrmQG.BtnInterromperClick(Sender: TObject); begin if MessageDlg('Deseja realmente interromper o processamento?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin VGInterromper := True; end; end; procedure TFrmQG.BtnExecutarClick(Sender: TObject); begin {VGRegistrosLidos := 0; VGRegistrosGravados := 0; VGRegistrosIgnorados := 0; VGRegistrosErros := 0; VGInterromper := false; if CBTransacao.Checked then DBDecis.StartTransaction; With Table1 do begin First; While NOT EOF do begin inc(VGRegistrosGravados); inc(VGRegistrosIgnorados); inc(VGRegistrosErros); if VGInterromper then break; if CBStatus.Checked then BtnProcessamento.Click; if CBContador.Checked then BtnProcessamento.Click; inc(VGRegistrosLidos); Next; Application.ProcessMessages; end; end; if CBTransacao.Checked then DBDecis.Commit; MessageDlg('Final do Processamento!', mtInformation, [mbOK], 0);} //----------------StringGrid1-----------------------------------------------// StringGrid1.Cells[0, 0] := 'Numero'; StringGrid1.Cells[1, 0] := 'Nome'; StringGrid1.Cells[2, 0] := 'Data'; StringGrid1.Cells[3, 0] := 'Hora'; StringGrid1.Cells[4, 0] := 'Status'; //----------------StringGrid2-----------------------------------------------// StringGrid2.Cells[0, 0] := 'Numero'; StringGrid2.Cells[1, 0] := 'Nome'; StringGrid2.Cells[2, 0] := 'Data'; StringGrid2.Cells[3, 0] := 'Hora'; StringGrid2.Cells[4, 0] := 'Status'; try //faz a primeira busca FindFirst('C:\DECIS\Relatorio\*.*',faArchive,Result); //elimina o diretorio . if (Result.Name <> '.') then begin //adiciona o nome do arquivo no StringGrid StringGrid1.Cells[1,1] := Result.Name; StringTest := Result.Name; RegistroData := FileAge('C:\DECIS\Relatorio\' + Result.Name); Data := FileDateToDateTime(RegistroData); VLResult := DateTimeToStr(Data); StringGrid1.Cells[0,1] := '1'; StringGrid1.Cells[2,1] := VLResult; StringGrid1.RowCount := 3; end; //faz a busca em todo diretório while FindNext(Result) = 0 do begin //elimina o diretorio .. if (Result.Name <> '..') then begin //adiciona no grid StringGrid1.Cells[0,StringGrid1.RowCount-1] := IntToStr(StringGrid1.RowCount-1); StringGrid1.Cells[1,StringGrid1.RowCount-1] := Result.Name; StringTest := Result.Name; RegistroData := FileAge('C:\DECIS\Relatorio\' + Result.Name); Data := FileDateToDateTime(RegistroData); VLResult := DateTimeToStr(Data); StringGrid1.Cells[2,StringGrid1.RowCount-1] := VLResult; StringGrid1.RowCount := StringGrid1.RowCount + 1; end; end; finally FindClose(Result); end; try //faz a primeira busca FindFirst('C:\DECIS\Relatorio\Original\*.*',faArchive,Result2); //elimina o diretorio. if (Result.Name <> '.') then begin //adiciona o nome do arquivo no StringGrid StringGrid2.Cells[1,1] := Result2.Name; RegistroData := FileAge('C:\DECIS\Relatorio\Original\' + Result2.Name); Data := FileDateToDateTime(RegistroData); VLResult := DateTimeToStr(Data); StringGrid2.Cells[0,1] := '1'; StringGrid2.Cells[2,1] := VLResult; StringGrid2.RowCount := 3; end; //faz a busca em todo diretório while FindNext(Result2) = 0 do begin //elimina o diretorio .. if (Result.Name <> '..') then begin //adiciona no grid StringGrid2.Cells[0,StringGrid2.RowCount-1] := IntToStr(StringGrid2.RowCount-1); StringGrid2.Cells[1,StringGrid2.RowCount-1] := Result2.Name; RegistroData := FileAge('C:\DECIS\Relatorio\Original\' + Result2.Name); Data := FileDateToDateTime(RegistroData); VLResult := DateTimeToStr(Data); StringGrid2.Cells[2,StringGrid2.RowCount-1] := VLResult; StringGrid2.RowCount := StringGrid2.RowCount + 1; end; end; finally FindClose(Result2); end; If (StringGrid1<>StringGrid2) then begin //StringGrid1.Canvas.Font.Color := clGreen; //StringGrid1.Color := clGreen; end; {if (gdselected in gdFixed) then begin StringGrid.Canvas.Font.Color:= clGreen;//coloque a cor do colordialog StringGrid.Canvas.Brush.Color:= clWhite; end else begin StringGrid.Canvas.Font.Color:= clBlack; StringGrid.Canvas.Brush.Color:=clWhite; end; StringGrid.Canvas.FillRect(Rect); StringGrid.Canvas.TextOut(Rect.Left+2,Rect.Top+2,StringGrid.Cells[ACol,Arow]);} end; Acessem Meu Blog http://ohwmen.wordpress.com
  10. Jhonas Muito Obrigado pela atenção, Consegui parte da solução que no momento é o suficiente, procedure convTextOut(CV: TCanvas; const sText: String; x, y, angle:integer); var LogFont: TLogFont; SaveFont: TFont; begin CV.Font.Name := 'Code 128'; CV.Font.Size := 80; SaveFont := TFont.Create; SaveFont.Assign(CV.Font); GetObject(SaveFont.Handle, sizeof(TLogFont), @LogFont); with LogFont do CV.Font.Handle := CreateFontIndirect(LogFont); SetBkMode(CV.Handle, TRANSPARENT); CV.TextOut(x, y, sText); CV.Font.Assign(SaveFont); SaveFont.Free; end; procedure TForm1.Button1Click(Sender: TObject); var VLCodigoBarras: String; begin VLCodigoBarras := '01234567890123456789012345'; Canvas.Font.Name := 'Code 128'; Canvas.Font.Size := 10; convTextOut(Canvas,VLCodigoBarras,50,170,0); end; procedure TForm1.Button2Click(Sender: TObject); begin Canvas.Font.Name := 'Code 128'; Canvas.Font.Size := 32; convTextOut(Image1.Canvas, Edit1.Text, 3, 0, 0); Image1.Picture.SaveToFile('E:\Projetos\Codigo de Barras Imagens\TesteGeraImagem\ImagemText\TESTE2.bmp'); end; end. Apartir da fonte ele salva um picture, na realidade não preciso que ele exporte direto para o relatório só preciso que ele gere a imagem e depois com o Crystal eu referencio, se notar o tamanho da fonte está 80.... e esse é o motivo da resolução não ter sido total, pois se eu jogar uma fonte menor, o o delphi salva a imagem mais a qualidade fica muito baixa o ideal da fonte seria 32 a 36 maior que isso a impressora não lê e tenho que corrigir o tamanho no cristal, se alguém puder me ajudar com isso, preciso que a qualidade seja meior mesmo com a fonte um pouco menor, Se alguém já tiver em código, e puder me mandar explicando como insere e tal, faz 3 dias que eu estou mexendo com delphi to todo confundido, so tinha programado em C e muito pucom em Java, então com é veterano ai sabe o que eu to passando ;D Abraço a todos e muito obrigado pela atenção!
  11. Muito obrigado pessoal! a fonte code 128 que utilizo é esta: http://ultradownloads.uol.com.br/download-fonte/Code-128/ está upada no ultra downloads do uol. e o o algoritimo que eu fiz para que o crystal gere os caracteres de cod de barras é este: Shared StringVar VGEntrada; Shared StringVar VGSaida; Shared NumberVar VGNumeroBarra; StringVar VLCodigoBarras := ''; StringVar VLCheckNumber := ''; NumberVar VLRestoDivisao; NumberVar VLDigitoVerificador := 0; NumberVar VLIndice; NumberVar VLDigitoSequencia :=1; for VLIndice := 1 to 44 step 2 do ( VGEntrada := mid({VDNOTAELETRONICA.CHAVEACESSO},VLIndice,2); //--------------------------------------// //------Verifica Criptografia-----------// //--------------------------------------// if(VGEntrada = '00')then VGSaida := ' '; if(VGEntrada = '01')then VGSaida := '!'; if(VGEntrada = '02')then VGSaida := '"'; if(VGEntrada = '03')then VGSaida := '#'; if(VGEntrada = '04')then VGSaida := '$'; if(VGEntrada = '05')then VGSaida := '%'; if(VGEntrada = '06')then VGSaida := '&'; if(VGEntrada = '07')then VGSaida := ''''; if(VGEntrada = '08')then VGSaida := '('; if(VGEntrada = '09')then VGSaida := ')'; if(VGEntrada = '10')then VGSaida := '*'; if(VGEntrada = '11')then VGSaida := '+'; if(VGEntrada = '12')then VGSaida := ','; if(VGEntrada = '13')then VGSaida := '-'; if(VGEntrada = '14')then VGSaida := '.'; if(VGEntrada = '15')then VGSaida := '/'; if(VGEntrada = '16')then VGSaida := '0'; if(VGEntrada = '17')then VGSaida := '1'; if(VGEntrada = '18')then VGSaida := '2'; if(VGEntrada = '19')then VGSaida := '3'; if(VGEntrada = '20')then VGSaida := '4'; if(VGEntrada = '21')then VGSaida := '5'; if(VGEntrada = '22')then VGSaida := '6'; if(VGEntrada = '23')then VGSaida := '7'; if(VGEntrada = '24')then VGSaida := '8'; if(VGEntrada = '25')then VGSaida := '9'; if(VGEntrada = '26')then VGSaida := ':'; if(VGEntrada = '27')then VGSaida := ';'; if(VGEntrada = '28')then VGSaida := '<'; if(VGEntrada = '29')then VGSaida := '='; if(VGEntrada = '30')then VGSaida := '>'; if(VGEntrada = '31')then VGSaida := '?'; if(VGEntrada = '32')then VGSaida := '@'; if(VGEntrada = '33')then VGSaida := 'A'; if(VGEntrada = '34')then VGSaida := 'B'; if(VGEntrada = '35')then VGSaida := 'C'; if(VGEntrada = '36')then VGSaida := 'D'; if(VGEntrada = '37')then VGSaida := 'E'; if(VGEntrada = '38')then VGSaida := 'F'; if(VGEntrada = '39')then VGSaida := 'G'; if(VGEntrada = '40')then VGSaida := 'H'; if(VGEntrada = '41')then VGSaida := 'I'; if(VGEntrada = '42')then VGSaida := 'J'; if(VGEntrada = '43')then VGSaida := 'K'; if(VGEntrada = '44')then VGSaida := 'L'; if(VGEntrada = '45')then VGSaida := 'M'; if(VGEntrada = '46')then VGSaida := 'N'; if(VGEntrada = '47')then VGSaida := 'O'; if(VGEntrada = '48')then VGSaida := 'P'; if(VGEntrada = '49')then VGSaida := 'Q'; if(VGEntrada = '50')then VGSaida := 'R'; if(VGEntrada = '51')then VGSaida := 'S'; if(VGEntrada = '52')then VGSaida := 'T'; if(VGEntrada = '53')then VGSaida := 'U'; if(VGEntrada = '54')then VGSaida := 'V'; if(VGEntrada = '55')then VGSaida := 'W'; if(VGEntrada = '56')then VGSaida := 'X'; if(VGEntrada = '57')then VGSaida := 'Y'; if(VGEntrada = '58')then VGSaida := 'Z'; if(VGEntrada = '59')then VGSaida := '['; if(VGEntrada = '60')then VGSaida := '\'; if(VGEntrada = '61')then VGSaida := ']'; if(VGEntrada = '62')then VGSaida := '^'; if(VGEntrada = '63')then VGSaida := '_'; if(VGEntrada = '64')then VGSaida := '`'; if(VGEntrada = '65')then VGSaida := 'a'; if(VGEntrada = '66')then VGSaida := 'b'; if(VGEntrada = '67')then VGSaida := 'c'; if(VGEntrada = '68')then VGSaida := 'd'; if(VGEntrada = '69')then VGSaida := 'e'; if(VGEntrada = '70')then VGSaida := 'f'; if(VGEntrada = '71')then VGSaida := 'g'; if(VGEntrada = '72')then VGSaida := 'h'; if(VGEntrada = '73')then VGSaida := 'i'; if(VGEntrada = '74')then VGSaida := 'j'; if(VGEntrada = '75')then VGSaida := 'k'; if(VGEntrada = '76')then VGSaida := 'l'; if(VGEntrada = '77')then VGSaida := 'm'; if(VGEntrada = '78')then VGSaida := 'n'; if(VGEntrada = '79')then VGSaida := 'o'; if(VGEntrada = '80')then VGSaida := 'p'; if(VGEntrada = '81')then VGSaida := 'q'; if(VGEntrada = '82')then VGSaida := 'r'; if(VGEntrada = '83')then VGSaida := 's'; if(VGEntrada = '84')then VGSaida := 't'; if(VGEntrada = '85')then VGSaida := 'u'; if(VGEntrada = '86')then VGSaida := 'v'; if(VGEntrada = '87')then VGSaida := 'w'; if(VGEntrada = '88')then VGSaida := 'x'; if(VGEntrada = '89')then VGSaida := 'y'; if(VGEntrada = '90')then VGSaida := 'z'; if(VGEntrada = '91')then VGSaida := '{'; if(VGEntrada = '92')then VGSaida := '|'; if(VGEntrada = '93')then VGSaida := '}'; if(VGEntrada = '94')then VGSaida := '~'; if(VGEntrada = '95')then VGSaida := 'Â'; if(VGEntrada = '96')then VGSaida := 'Ä'; if(VGEntrada = '97')then VGSaida := 'Å'; if(VGEntrada = '98')then VGSaida := 'Æ'; if(VGEntrada = '99')then VGSaida := 'Ç'; //--------------------------------------// //--------------------------------------// //--------------------------------------// VLCodigoBarras := VLCodigoBarras + VGSaida; VGNumeroBarra := toNumber(VGEntrada); VLDigitoVerificador := VLDigitoVerificador + (VGNumeroBarra * VLDigitoSequencia); VLDigitoSequencia := VLDigitoSequencia + 1; ); VLDigitoVerificador := VLDigitoVerificador + 105; VLRestoDivisao := Remainder (VLDigitoVerificador, 103); VLCheckNumber := toText(VLRestoDivisao,'00'); VGEntrada := VLCheckNumber; //--------------------------------------// //------Verifica Criptografia-----------// //--------------------------------------// if(VGEntrada = '00')then VGSaida := ' '; if(VGEntrada = '01')then VGSaida := '!'; if(VGEntrada = '02')then VGSaida := '"'; if(VGEntrada = '03')then VGSaida := '#'; if(VGEntrada = '04')then VGSaida := '$'; if(VGEntrada = '05')then VGSaida := '%'; if(VGEntrada = '06')then VGSaida := '&'; if(VGEntrada = '07')then VGSaida := ''''; if(VGEntrada = '08')then VGSaida := '('; if(VGEntrada = '09')then VGSaida := ')'; if(VGEntrada = '10')then VGSaida := '*'; if(VGEntrada = '11')then VGSaida := '+'; if(VGEntrada = '12')then VGSaida := ','; if(VGEntrada = '13')then VGSaida := '-'; if(VGEntrada = '14')then VGSaida := '.'; if(VGEntrada = '15')then VGSaida := '/'; if(VGEntrada = '16')then VGSaida := '0'; if(VGEntrada = '17')then VGSaida := '1'; if(VGEntrada = '18')then VGSaida := '2'; if(VGEntrada = '19')then VGSaida := '3'; if(VGEntrada = '20')then VGSaida := '4'; if(VGEntrada = '21')then VGSaida := '5'; if(VGEntrada = '22')then VGSaida := '6'; if(VGEntrada = '23')then VGSaida := '7'; if(VGEntrada = '24')then VGSaida := '8'; if(VGEntrada = '25')then VGSaida := '9'; if(VGEntrada = '26')then VGSaida := ':'; if(VGEntrada = '27')then VGSaida := ';'; if(VGEntrada = '28')then VGSaida := '<'; if(VGEntrada = '29')then VGSaida := '=; if(VGEntrada = '30')then VGSaida := '>'; if(VGEntrada = '31')then VGSaida := '?'; if(VGEntrada = '32')then VGSaida := '@'; if(VGEntrada = '33')then VGSaida := 'A'; if(VGEntrada = '34')then VGSaida := 'B'; if(VGEntrada = '35')then VGSaida := 'C'; if(VGEntrada = '36')then VGSaida := 'D'; if(VGEntrada = '37')then VGSaida := 'E'; if(VGEntrada = '38')then VGSaida := 'F'; if(VGEntrada = '39')then VGSaida := 'G'; if(VGEntrada = '40')then VGSaida := 'H'; if(VGEntrada = '41')then VGSaida := 'I'; if(VGEntrada = '42')then VGSaida := 'J'; if(VGEntrada = '43')then VGSaida := 'K'; if(VGEntrada = '44')then VGSaida := 'L'; if(VGEntrada = '45')then VGSaida := 'M'; if(VGEntrada = '46')then VGSaida := 'N'; if(VGEntrada = '47')then VGSaida := 'O'; if(VGEntrada = '48')then VGSaida := 'P'; if(VGEntrada = '49')then VGSaida := 'Q'; if(VGEntrada = '50')then VGSaida := 'R'; if(VGEntrada = '51')then VGSaida := 'S'; if(VGEntrada = '52')then VGSaida := 'T'; if(VGEntrada = '53')then VGSaida := 'U'; if(VGEntrada = '54')then VGSaida := 'V'; if(VGEntrada = '55')then VGSaida := 'W'; if(VGEntrada = '56')then VGSaida := 'X'; if(VGEntrada = '57')then VGSaida := 'Y'; if(VGEntrada = '58')then VGSaida := 'Z'; if(VGEntrada = '59')then VGSaida := '['; if(VGEntrada = '60')then VGSaida := '\'; if(VGEntrada = '61')then VGSaida := ]'; if(VGEntrada = '62')then VGSaida := '^'; if(VGEntrada = '63')then VGSaida := '_'; if(VGEntrada = '64')then VGSaida := '`'; if(VGEntrada = '65')then VGSaida := 'a'; if(VGEntrada = '66')then VGSaida := 'b'; if(VGEntrada = '67')then VGSaida := 'c'; if(VGEntrada = '68')then VGSaida := 'd'; if(VGEntrada = '69')then VGSaida := 'e'; if(VGEntrada = '70')then VGSaida := 'f'; if(VGEntrada = '71')then VGSaida := 'g'; if(VGEntrada = '72')then VGSaida := 'h'; if(VGEntrada = '73')then VGSaida := 'i'; if(VGEntrada = '74')then VGSaida := 'j'; if(VGEntrada = '75')then VGSaida := 'k'; if(VGEntrada = '76')then VGSaida := 'l'; if(VGEntrada = '77')then VGSaida := 'm'; if(VGEntrada = '78')then VGSaida := 'n'; if(VGEntrada = '79')then VGSaida := 'o'; if(VGEntrada = '80')then VGSaida := 'p'; if(VGEntrada = '81')then VGSaida := 'q'; if(VGEntrada = '82')then VGSaida := 'r'; if(VGEntrada = '83')then VGSaida := 's'; if(VGEntrada = '84')then VGSaida := 't'; if(VGEntrada = '85')then VGSaida := 'u'; if(VGEntrada = '86')then VGSaida := 'v'; if(VGEntrada = '87')then VGSaida := 'w'; if(VGEntrada = '88')then VGSaida := 'x'; if(VGEntrada = '89')then VGSaida := 'y'; if(VGEntrada = '90')then VGSaida := 'z'; if(VGEntrada = '91')then VGSaida := '{'; if(VGEntrada = '92')then VGSaida := '|'; if(VGEntrada = '93')then VGSaida := '}'; if(VGEntrada = '94')then VGSaida := '~'; if(VGEntrada = '95')then VGSaida := 'Â'; if(VGEntrada = '96')then VGSaida := 'Ä'; if(VGEntrada = '97')then VGSaida := 'Å'; if(VGEntrada = '98')then VGSaida := 'Æ'; if(VGEntrada = '99')then VGSaida := 'Ç'; //--------------------------------------// //--------------------------------------// //--------------------------------------// VLCodigoBarras := "Í" + VLCodigoBarras + VGSaida + "Î"; VLCodigoBarras; apartir deste algoritimo será impresso um codigo de caracteres e numeros que jogado na fonte 128C gera o codigo de barras, porem eu preciso converter este codigo de barras em uma imagem para vinculala no relatório!
  12. Boa Tarde a Todos, Hoje tenho um sistema que é desenvolvido em Delphi 7 e utiliza a base do Crystal Para a geração de relatórios, Com a entrada a NFe no Brasil tivemos que criar o próprio algoritimo para que o cristal imprima o código e que a leitora o reconheça, a lógica para que isto ocorra está correta, meu unico problema é: quando exporto o boleto para PDF e envio para alguém que não possua a fonta exatamente igual a minha instalada ele não demonstra o codigo de barras! será que alguém possue alguma formula em delphi que ao invé de gerar uma String, gere diretamente uma imagem.bmp ou .jpg, bom de qualquer formato se possivel uma linha de comando interna do crystal, Por Favor até o momento não consegui encontrar nada, Grato Pela atenção, Um grande Abraço, Pedro Henrique.
×
×
  • Criar Novo...