[Lazarus-es] LazReport

Héctor S. Ponce hectorsponce en gmail.com
Jue Abr 8 23:52:20 CEST 2010


Hola,

Tengo un problema con LazReport. No asigna valor a las variables.


Porcion del fuente de la clase LR_Class:
------------------------------------------------------------

(Linea 7465)

    else if AFormatStr[1] in ['D', 'T', 'd', 't'] then
    begin
      AFormat := $02040000;
      AFormatStr := Copy(AFormatStr, 2, 255);
    end
    else if AFormatStr[1] in ['B', 'b'] then
    begin
      AFormat := $04040000;
      AFormatStr := Copy(AFormatStr, 2, 255);
    end;
  end;

  CurVariable := ParName;
  CurValue := 0;

///////////////////////
  GetVariableValue(ParName, CurValue);
<<<<------------------------------------  ACA ESTA LA LLAMADA A MI
PROCEDIMIENTO
// EL NOMBRE DE LA VARIABLE DEL REPORTE EN PARNAME ES CORRECTO "LVR_CLIENTE"
//
///////////////////////

  ParValue := FormatValue(CurValue, AFormat, AFormatStr);
  {
  if TVarData(CurValue).VType=varString then
    ValStr := CopyVarString(CurValue)
  else
    ValStr := CurValue;
  ParValue := FormatValueStr(ValStr, Format, FormatStr);
  }
  {$IFDEF DebugLR}
  DebugLn('%sTfrReport.InternalOnGetValue(%s)
Value=%s',[sspc,ParName,ParValue]);
  {$ENDIF}
end;




Fuente de mi procedimiento
-----------------------------------------

procedure Tfacturador.frReport1GetValue(ParName: String; var ParValue:
Variant);
//
//  ACA EL CONTENIDO DE LA VARIABLE PARNAME ES
'VR_CLIE#0#0#.........................................'
//  POR LO QUE NUNCA OBTIENE EL VALOR DADO QUE NO RESULTA VERDADERA NUNGUNA
IGUALDAD
//
begin
//
frReport1.Values.FindVariable('LRV_CLIENTE').Field:=QuotedStr('LRV_CLIENTE');
  if UpperCase(ParName)=' LRV_EMPRESA' then
ParValue:=trim(DataModule1.GetKey('EMPRESA'));
  if ParName=' lrv_cliente' then ParValue:=cliente;
  if ParName='lrv_direccion' then ParValue:=cliente_domicilio;
  if ParName='lrv_cuit' then ParValue:=cliente_documento;
  if ParName='lrv_comprobante' then
  ParValue:=comprobante;

  if ParName='lrv_st' then ParValue:=monto_subtotal;
  if ParName='lrv_dto' then ParValue:=descuento;
  if ParName='lrv_dtomon' then ParValue:=monto_descuento;
  if ParName='lrv_tot' then ParValue:=monto_total;
  if ParName='lrv_fp1' then ParValue:=pago_medio[1];
  if ParName='lrv_ref1' then ParValue:=pago_ref[1];
  if ParName='lrv_imp1' then ParValue:=pago_importe[1];
  if ParName='lrv_fp2' then ParValue:=pago_medio[2];
  if ParName='lrv_ref2' then ParValue:=pago_ref[2];
  if ParName='lrv_imp2' then ParValue:=pago_importe[2];
  if ParName='lrv_fp3' then ParValue:=pago_medio[3];
  if ParName='lrv_ref3' then ParValue:=pago_ref[3];
  if ParName='lrv_imp3' then ParValue:=pago_importe[3];
  if ParName='lrv_pagado' then ParValue:=pagado;
end;


QUIERO SABER SI ALGUIEN LE HA PASADO LO MISMO Y COMO LO HA SOLUCIONADO.

ESTOY COMPILANDO EN WIN 7, LAZARUS 0.9.29, FPC: 2.5.1

MUCHAS GRACIAS

HECTOR PONCE
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus-es/attachments/20100408/4d7aa38f/attachment.html>


More information about the Lazarus-es mailing list