diff --git a/Source/Informes/1/InfPresupuestoCliente.fr3 b/Source/Informes/1/InfPresupuestoCliente.fr3 index 7974bd36..a3308ef8 100644 --- a/Source/Informes/1/InfPresupuestoCliente.fr3 +++ b/Source/Informes/1/InfPresupuestoCliente.fr3 @@ -1,112 +1,112 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - + + + + - - - - + + + + - + - - + + - - - + + + - - - + + + - - - - - - - + + + + + + + - + diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm index dfd8944d..081ab16a 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.dfm @@ -870,7 +870,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente Top = 142 end object frxReport: TfrxReport - Version = '4.3' + Version = '4.7.71' DotMatrixReport = False EngineOptions.DoublePass = True IniFile = '\Software\Fast Reports' @@ -878,17 +878,67 @@ object RptPresupuestosCliente: TRptPresupuestosCliente PreviewOptions.Zoom = 1.000000000000000000 PrintOptions.Printer = 'Por defecto' PrintOptions.PrintOnSheet = 0 - ReportOptions.CreateDate = 37800.807714351900000000 - ReportOptions.LastChange = 39836.700555358800000000 + ReportOptions.CreateDate = 39065.872423495400000000 + ReportOptions.LastChange = 39878.788205462970000000 ScriptLanguage = 'PascalScript' ScriptText.Strings = ( - 'procedure frxReportOnStartReport(Sender: TfrxComponent);' + '' + 'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);' + 'var' + ' Cadena: String;' 'begin' - ' Set('#39'Pagina'#39', 0);' - ' Set('#39'TotalPaginas'#39', 0); ' + '{ DatosEmpresa.Lines.Clear;' + ' if ( <> '#39#39') then' + ' Cadena := '#39'TLF: '#39' + ;' + ' if ( <> '#39#39') then' + + ' Cadena := Cadena + '#39' FAX: '#39' + ;' + ' DatosEmpresa.Lines.Add(Cadena);' + '}' 'end;' '' - 'procedure Band1OnBeforePrint(Sender: TfrxComponent);' + 'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);' + 'begin' + '{ NombreEmpresa.Lines.Clear;' + ' NombreEmpresa.Lines.Add();' + '}' + 'end;' + '' + 'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);' + 'var' + ' ACadena : String;' + 'begin' + '{ ACadena := '#39#39';' + ' DireccionEnvio.Lines.Clear;' + ' if ( <> '#39#39') then' + ' ACadena := ;' + '' + ' if ( <> '#39#39') then' + + ' ACadena := ACadena + '#39' '#39' + ;' + '' + ' DireccionEnvio.Lines.Add(ACadena);' + ' ACadena := '#39#39';' + ' DireccionEnvio.Lines.Add();' + ' if ( <> '#39#39') then' + ' ACadena := + '#39' '#39';' + ' if ( <> '#39#39') then' + ' ACadena := ACadena + ;' + '' + ' if (ACadena <> '#39#39') then' + ' DireccionEnvio.Lines.Add(ACadena);' + '' + ' if ( <> '#39#39') then' + ' DireccionEnvio.Lines.Add();' + '' + ' if ( <> '#39#39') then' + ' DireccionEnvio.Lines.Add();' + '}' + 'end;' + '' + 'procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);' 'begin' ' if not Engine.FinalPass then' ' Set('#39'TotalPaginas'#39', ( + 1));' @@ -897,26 +947,94 @@ object RptPresupuestosCliente: TRptPresupuestosCliente ' Set('#39'Pagina'#39', ( + 1)); ' 'end;' '' - 'procedure mContinuaOnBeforePrint(Sender: TfrxComponent);' + 'procedure frxReportOnStartReport(Sender: TfrxComponent);' 'begin' - ' if Engine.FinalPass then' + ' Set('#39'Pagina'#39', 0);' + ' Set('#39'TotalPaginas'#39', 0);' + ' Set('#39'Capitulo'#39', '#39'0'#39');' + ' Set('#39'NumCapitulos'#39', 0);' + ' Set('#39'TextoNumCapitulo'#39', '#39#39#39' '#39#39#39'); ' + 'end;' + '' + 'procedure Rich3OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if Engine.FinalPass then' + ' begin ' + ' Set('#39'Capitulo'#39', ( + 1));' + ' if ( = 1) then' + + ' MasterData1.Visible := False; ' + + ' ' + ' end' + ' else' + ' Set('#39'NumCapitulos'#39', ( + 1)); ' + 'end;' + '' + 'procedure Page2OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if (Length() = 0) then' + + ' Page2.Visible := False; ' + + ' ' + 'end;' + '' + 'procedure Memo45OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if Engine.FinalPass then' ' begin' - ' //A la vez que salta este salta la asignacion de pagina por ' + - 'lo que no coincide nunca si no suponemos +1 ' + - ' ' + - ' ' + - ' ' + - ' ' - ' if (( + 1) = ) then' - ' begin ' - ' mContinua.Visible := True;' - ' end ' - ' else' - ' begin ' - ' mContinua.Visible := False;' - ' end ' - ' end; ' + ' Set('#39'Capitulo'#39', ( + 1)); ' + + ' ' + ' Set('#39'TextoNumCapitulo'#39', );' + '' + + ' if (( = 1) and ( =' + + ' '#39'General'#39')) then' + ' MasterData1.Visible := False' + ' else begin ' + + ' if ( = '#39'Titulo opcional'#39') ' + + 'then' + ' begin' + ' Set('#39'TextoNumCapitulo'#39', '#39#39#39'OPCIONAL'#39#39#39');' + ' end' + ' end ' + ' end' + ' else ' + ' Set('#39'NumCapitulos'#39', ( + 1));' + 'end;' + '' + 'procedure Memo47OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if (Length() = 0) then' + ' begin' + + ' Rich8.Visible := False; ' + + ' ' + ' Memo47.Visible := False;' + ' end ' + 'end;' + '' + 'procedure Footer2OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' if not (() > 0) then' + ' begin' + ' mBonificacion.Visible := False;' + + ' mImporteFinal.Visible := False; ' + + ' ' + ' end; ' + 'end;' + '' + '' + 'procedure Rich2OnAfterData(Sender: TfrxComponent);' + 'begin' + '' + 'end;' + '' + 'procedure Rich2OnBeforePrint(Sender: TfrxComponent);' + 'begin' + ' ' 'end;' '' 'begin' @@ -925,6 +1043,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente ShowProgress = False StoreInDFM = False OnStartReport = 'frxReportOnStartReport' + OnUserFunction = frxReportUserFunction Left = 169 Top = 16 end @@ -932,6 +1051,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBCabecera' CloseDataSource = False DataSource = DADSCabecera + BCDToCurrency = False Left = 264 Top = 16 end @@ -939,6 +1059,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBDetalles' CloseDataSource = False DataSource = DADSDetalles + BCDToCurrency = False Left = 440 Top = 16 end @@ -1077,8 +1198,6 @@ object RptPresupuestosCliente: TRptPresupuestosCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = DABin2DataStreamer1 - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'Informe_Cabecera' IndexDefs = <> Left = 264 @@ -1187,6 +1306,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBCapitulos' CloseDataSource = False DataSource = DADSCapitulos + BCDToCurrency = False Left = 352 Top = 16 end @@ -1194,6 +1314,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBResumen' CloseDataSource = False DataSource = DADSResumen + BCDToCurrency = False Left = 520 Top = 16 end @@ -1426,8 +1547,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = DABin2DataStreamer1 - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates, moAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moAllInOneFetch] LogicalName = 'Informe_Capitulos' IndexDefs = <> Left = 352 @@ -1486,8 +1606,6 @@ object RptPresupuestosCliente: TRptPresupuestosCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = DABin2DataStreamer1 - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'Informe_Resumen' IndexDefs = <> Left = 520 @@ -1497,13 +1615,21 @@ object RptPresupuestosCliente: TRptPresupuestosCliente ShowDialog = False UseFileCache = True ShowProgress = False + OverwritePrompt = False PrintOptimized = True Outline = False + Background = False + HTMLTags = True Author = 'FactuGES' Subject = 'FactuGES' - Background = False Creator = 'FactuGES' - HTMLTags = True + ProtectionFlags = [ePrint, eModify, eCopy, eAnnot] + HideToolbar = False + HideMenubar = False + HideWindowUI = False + FitWindow = False + CenterWindow = False + PrintScaling = False Left = 528 Top = 440 end @@ -1580,8 +1706,6 @@ object RptPresupuestosCliente: TRptPresupuestosCliente RemoteFetchEnabled = False LocalSchema = schReport LocalDataStreamer = DABin2DataStreamer1 - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] LogicalName = 'InformeListadoPresupuestos' IndexDefs = <> Left = 680 @@ -1591,6 +1715,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBInformeListadoPresupuestos' CloseDataSource = True DataSource = DADSInformeListadoPresupuestos + BCDToCurrency = False Left = 680 Top = 16 end @@ -1598,6 +1723,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente UserName = 'frxDBInformeListadoPresupuestosResumen' CloseDataSource = True DataSource = DADSInformeListadoPresupuestosResumen + BCDToCurrency = False Left = 680 Top = 192 end @@ -1615,8 +1741,6 @@ object RptPresupuestosCliente: TRptPresupuestosCliente LogChanges = False StreamingOptions = [soDisableEventsWhileStreaming] RemoteFetchEnabled = False - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates] IndexDefs = <> Left = 680 Top = 304 @@ -1706,8 +1830,7 @@ object RptPresupuestosCliente: TRptPresupuestosCliente MasterSource = DADSCapitulos MasterFields = 'ID' DetailFields = 'ID_CAPITULO' - DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch] - MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates, moAllInOneFetch] + MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moAllInOneFetch] LogicalName = 'Informe_Capitulos_Detalles' IndexDefs = <> Left = 440 diff --git a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas index 0b161237..1e7c247e 100644 --- a/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas +++ b/Source/Modulos/Presupuestos de cliente/Reports/uRptPresupuestosCliente_Server.pas @@ -84,6 +84,8 @@ type tbl_Detalles: TDAMemDataTable; procedure DataModuleCreate(Sender: TObject); procedure DataModuleDestroy(Sender: TObject); + function frxReportUserFunction(const MethodName: string; + var Params: Variant): Variant; private FConnection: IDAConnection; FIdEmpresa: Integer; @@ -419,6 +421,19 @@ begin FreeANDNIL(FListaNombresClientes); end; +function TRptPresupuestosCliente.frxReportUserFunction(const MethodName: string; + var Params: Variant): Variant; +var + AText : String; +begin + Result := ''; + if (MethodName = 'PONERJUSTIFICACIONCOMPLETA') then + begin + AText := VarToStr(Params[0]); + Result := ReplaceStr(AText, '\pard', '\qj'); + end; +end; + function TRptPresupuestosCliente.GenerarInformeListadoPresupuestos( const IdEmpresa: Integer; const FechaInicio, FechaFin: Variant; const ListaIDClientes: TIntegerArray; const Desglosado: Boolean; @@ -540,6 +555,7 @@ begin raise Exception.Create (('Error Servidor: _GenerarPresupuesto, no encuentra informe ' + rptInforme)); frxReport.LoadFromFile(AInforme, True); + frxReport.AddFunction('function PONERJUSTIFICACIONCOMPLETA(ARTFText : String): String', 'User Function',''); frxReport.PrepareReport(False); finally FConnection.RollbackTransaction; //<--- Creo que no va a hacer falta. "PUES SI ES NECESARIO"