Repaso de informes

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@460 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2009-11-05 18:47:48 +00:00
parent 50a50edb67
commit 75152b161e
6 changed files with 125 additions and 394 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1401,7 +1401,7 @@ object RptFacturasCliente: TRptFacturasCliente
Top = 142 Top = 142
end end
object frxReport: TfrxReport object frxReport: TfrxReport
Version = '4.3' Version = '4.8.11'
DotMatrixReport = False DotMatrixReport = False
EngineOptions.DoublePass = True EngineOptions.DoublePass = True
IniFile = '\Software\Fast Reports' IniFile = '\Software\Fast Reports'
@ -1411,259 +1411,12 @@ object RptFacturasCliente: TRptFacturasCliente
PrintOptions.Printer = 'Default' PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0 PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 37871.995398692100000000 ReportOptions.CreateDate = 37871.995398692100000000
ReportOptions.LastChange = 40094.542152187500000000 ReportOptions.LastChange = 40122.799261608790000000
ReportOptions.VersionBuild = '1' ReportOptions.VersionBuild = '1'
ReportOptions.VersionMajor = '12' ReportOptions.VersionMajor = '12'
ReportOptions.VersionMinor = '13' ReportOptions.VersionMinor = '13'
ReportOptions.VersionRelease = '1' ReportOptions.VersionRelease = '1'
ScriptLanguage = 'PascalScript' ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'procedure DatosClienteOnBeforePrint(Sender: TfrxComponent);'
'begin'
' DatosCliente.Lines.Clear;'
' DatosCliente.Lines.Add(<frxDBCabecera."CALLE">);'
''
' if (<frxDBCabecera."CODIGO_POSTAL"> <> '#39#39')'
' or (<frxDBCabecera."POBLACION"> <> '#39#39') then'
' DatosCliente.Lines.Add(<frxDBCabecera."CODIGO_POSTAL"> + '#39' ' +
' '#39' + <frxDBCabecera."POBLACION">);'
''
' if (<frxDBCabecera."PROVINCIA"> <> '#39#39') then'
' DatosCliente.Lines.Add(<frxDBCabecera."PROVINCIA">);'
'end;'
''
'procedure BandaDetallesOnBeforePrint(Sender: TfrxComponent);'
'begin'
'{ '
' BandaDetalles.StartNewPage := False;'
' BandaDetalles.Visible := True;'
' MemPrecio.Style := '#39'Concepto normal'#39';'
' MemCantidad.Style := '#39'Concepto normal'#39';'
' MemImpTotal.Style := '#39'Concepto normal'#39';'
' RichConcepto.Visible := True;'
''
' case <frxDBDetalles."TIPO_DETALLE"> of'
' '#39'Salto'#39': begin'
' BandaDetalles.StartNewPage := True;'
' RichConcepto.Visible := False;'
' end;'
' '#39'Titulo'#39': begin'
' MemPrecio.Style := '#39'Concepto titulo'#39';'
' MemCantidad.Style := '#39'Concepto titulo'#39';'
' MemImpTotal.Style := '#39'Concepto titulo'#39';'
' end;'
' '#39'Concepto'#39': begin'
' MemPrecio.Style := '#39'Concepto normal'#39';'
' MemCantidad.Style := '#39'Concepto normal'#39';'
' MemImpTotal.Style := '#39'Concepto normal'#39';'
' end;'
' '#39'Subtotal'#39': begin'
' MemPrecio.Style := '#39'Concepto subtotal'#39';'
' MemCantidad.Style := '#39'Concepto subtotal'#39';'
' MemImpTotal.Style := '#39'Concepto subtotal'#39';'
' end;'
' '#39'Descuento'#39': begin'
' BandaDetalles.Visible := False;'
' RichConcepto.Color := clNone;'
' end;'
' end;'
''
' RichConcepto.Color := MemImpTotal.Color;'
' RichConcepto.Frame := MemImpTotal.Frame;'
'} '
'end;'
''
'{procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);'
'begin'
'// if Engine.FreeSpace > ReportSummary1.Height then '
' Engine.CurY := Engine.PageHeight - ReportSummary1.Height - ' +
'Band3.Height - 1'
'end;} '
''
'procedure Memo15OnBeforePrint(Sender: TfrxComponent);'
'begin'
' Memo15.Lines.Clear;'
' if (StrToFloat(<frxDBCabecera."BASE_IMPONIBLE">) < 0) then'
' Memo15.Lines.Add('#39'ABONO'#39')'
' else'
' Memo15.Lines.Add('#39'FACTURA'#39')'
'end;'
''
'procedure Band2OnBeforePrint(Sender: TfrxComponent);'
'begin'
' if not Engine.FinalPass then'
' Set('#39'TotalPaginas'#39', (<TotalPaginas> + 1));'
''
' if Engine.FinalPass then'
' Set('#39'Pagina'#39', (<Pagina> + 1));'
''
'{ if Engine.FinalPass and (<TotalPaginas> = <Pagina>) then'
' begin '
' LineaCorta1.visible := False; '
' LineaLarga1.visible := True; '
' LineaCorta2.visible := False; '
' LineaLarga2.visible := True; '
' end'
' else'
' begin'
' LineaCorta1.visible := True; '
' LineaLarga1.visible := False;'
' LineaCorta2.visible := True; '
' LineaLarga2.visible := False;'
' end;'
'} '
'end;'
''
'procedure frxReportOnStartReport(Sender: TfrxComponent);'
'begin'
' Set('#39'Pagina'#39', 0);'
' Set('#39'TotalPaginas'#39', 0);'
'end;'
''
'procedure Memo26OnBeforePrint(Sender: TfrxComponent);'
'begin '
' if (<frxDBCabecera."DESCUENTO"> > 0) then'
' begin'
' eDescuento.visible := True;'
' Descuento.visible := True; '
' end'
' else'
' begin'
' eDescuento.visible := False; '
' Descuento.visible := False; '
' end; '
'end;'
''
''
'procedure ReportSummary1OnAfterCalcHeight(Sender: TfrxComponent)' +
';'
'begin'
'//Es peor el remedio que la enfermedad, en el caso de sobre pasa' +
'r en uno el numero de conceptos para que no quepa el reportsumar' +
'y,'
'//no hay forma de ponerlo al final en la p'#225'gina siguiente hasta ' +
'que el numero de conceptos rellene al menos un concepto de la si' +
'guiente hoja. ' +
' ' +
' ' +
' ' +
' ' +
' '
'// if Engine.FreeSpace > ReportSummary1.Height then '
'// Engine.CurY := Engine.PageHeight - ReportSummary1.Height ' +
'- Band3.Height - 1'
'end;'
''
'procedure Shape4OnBeforePrint(Sender: TfrxComponent);'
'begin'
' if Engine.FinalPass and (<TotalPaginas> = <Pagina>) then '
' begin'
' Band3.Height := 192;'
''
' if (<frxDBCabecera."DESCUENTO"> = 0) then'
' begin'
' eBaseimponible.Top := eBaseimponible.Top - (eImporteneto.' +
'Height + eDescuento.Height);'
' Baseimponible.Top := Baseimponible.Top - (eImporteneto.He' +
'ight + eDescuento.Height);'
' eIva.Top := eIva.Top - (eImporteneto.Height + eDescuento.' +
'Height);'
' Iva.Top := Iva.Top - (eImporteneto.Height + eDescuento.He' +
'ight);'
' eRe.Top := eRe.Top - (eImporteneto.Height + eDescuento.He' +
'ight);'
' Re.Top := Re.Top - (eImporteneto.Height + eDescuento.Heig' +
'ht);'
' lImportetotal.Top := lImportetotal.Top - (eImporteneto.He' +
'ight + eDescuento.Height); '
' eImportetotal.Top := eImportetotal.Top - (eImporteneto.He' +
'ight + eDescuento.Height);'
' Importetotal.Top := Importetotal.Top - (eImporteneto.Heig' +
'ht + eDescuento.Height);'
' Shape4.Height := Shape4.Height - (eImporteneto.Height + e' +
'Descuento.Height); '
' end'
' else'
' begin'
' eImporteneto.Visible := True;'
' Importeneto.Visible := True;'
' eDescuento.Visible := True;'
' Descuento.Visible := True; '
' end;'
' '
' if (<frxDBCabecera."RE"> = 0) then'
' begin'
' lImporteTotal.Top := lImporteTotal.Top - eRe.Height; ' +
' '
' eImportetotal.Top := eImportetotal.Top - eRe.Height; ' +
' '
' Importetotal.Top := Importetotal.Top - eRe.Height;'
' Shape4.Height := Shape4.Height - eRe.Height; ' +
' '
' end'
' else'
' begin'
' eRe.Visible := True;'
' Re.Visible := True; '
' end; '
' '
' if (<frxDBCabecera."IVA"> = 0) then'
' begin'
' lImporteTotal.Top := lImporteTotal.Top - eIva.Height; ' +
' '
' eImportetotal.Top := eImportetotal.Top - eIva.Height; ' +
' '
' Importetotal.Top := Importetotal.Top - eIva.Height;'
' Shape4.Height := Shape4.Height - eIva.Height; ' +
' '
' end'
' else'
' begin'
' eIva.Visible := True;'
' Iva.Visible := True; '
' end; '
' '
' eBaseimponible.Visible := True;'
' Baseimponible.Visible := True; '
' lImporteTotal.Visible := True;'
' eImportetotal.Visible := True; '
' Importetotal.Visible := True;'
''
' Shape4.Visible := True; '
' end'
' else'
' begin'
' Band3.Height := 100; ' +
' '
' end '
'end;'
''
'begin'
''
'end.')
ShowProgress = False ShowProgress = False
StoreInDFM = False StoreInDFM = False
OnStartReport = 'frxReportOnStartReport' OnStartReport = 'frxReportOnStartReport'
@ -1674,6 +1427,7 @@ object RptFacturasCliente: TRptFacturasCliente
UserName = 'frxDBCabecera' UserName = 'frxDBCabecera'
CloseDataSource = True CloseDataSource = True
DataSource = DADataCabecera DataSource = DADataCabecera
BCDToCurrency = False
Left = 264 Left = 264
Top = 16 Top = 16
end end
@ -1681,6 +1435,7 @@ object RptFacturasCliente: TRptFacturasCliente
UserName = 'frxDBDetalles' UserName = 'frxDBDetalles'
CloseDataSource = False CloseDataSource = False
DataSource = DADataDetalles DataSource = DADataDetalles
BCDToCurrency = False
Left = 344 Left = 344
Top = 16 Top = 16
end end
@ -1722,6 +1477,7 @@ object RptFacturasCliente: TRptFacturasCliente
UserName = 'frxDBVencimientos' UserName = 'frxDBVencimientos'
CloseDataSource = True CloseDataSource = True
DataSource = DADataVencimientos DataSource = DADataVencimientos
BCDToCurrency = False
Left = 456 Left = 456
Top = 16 Top = 16
end end
@ -1806,6 +1562,7 @@ object RptFacturasCliente: TRptFacturasCliente
UserName = 'frxDBInformeListadoFacturas' UserName = 'frxDBInformeListadoFacturas'
CloseDataSource = True CloseDataSource = True
DataSource = DADSInformeListadoFacturas DataSource = DADSInformeListadoFacturas
BCDToCurrency = False
Left = 576 Left = 576
Top = 16 Top = 16
end end
@ -1831,6 +1588,7 @@ object RptFacturasCliente: TRptFacturasCliente
UserName = 'frxDBInformeListadoFacturasResumen' UserName = 'frxDBInformeListadoFacturasResumen'
CloseDataSource = True CloseDataSource = True
DataSource = DADSInformeListadoFacturasResumen DataSource = DADSInformeListadoFacturasResumen
BCDToCurrency = False
Left = 584 Left = 584
Top = 192 Top = 192
end end

View File

@ -613,7 +613,7 @@ begin
AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString); AInforme := DarRutaFichero(DarRutaInformes, rptFacturaCliente, tbl_Cabecera.FieldByName('ID_EMPRESA').AsString, tbl_Cabecera.FieldByName('ID_TIENDA').AsString);
if VarIsNull(AInforme) then if VarIsNull(AInforme) then
raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe' + rptFacturaCliente)); raise Exception.Create (('Error Servidor: _GenerarFactura, no encuentra informe ' + rptFacturaCliente));
frxReport.LoadFromFile(AInforme, True); frxReport.LoadFromFile(AInforme, True);
frxReport.PrepareReport(False); frxReport.PrepareReport(False);