Desarrollo reportes

git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C560
This commit is contained in:
asaenz 2022-07-04 23:11:07 +00:00
parent 3f6e8553a6
commit 5d499a51c9
2 changed files with 162 additions and 164 deletions

View file

@ -6,12 +6,6 @@
<DataSet Name="dsRevComis"> <DataSet Name="dsRevComis">
<SharedDataSet> <SharedDataSet>
<SharedDataSetReference>dsRevComis</SharedDataSetReference> <SharedDataSetReference>dsRevComis</SharedDataSetReference>
<QueryParameters>
<QueryParameter Name="p_remesa">
<Value>=Parameters!p_remesa.Value</Value>
<rd:UserDefined>true</rd:UserDefined>
</QueryParameter>
</QueryParameters>
</SharedDataSet> </SharedDataSet>
<Fields> <Fields>
<Field Name="NUMERO_SERVICIO"> <Field Name="NUMERO_SERVICIO">
@ -60,7 +54,7 @@
<Line Name="Line1"> <Line Name="Line1">
<Left>0.0762cm</Left> <Left>0.0762cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>17.66063cm</Width> <Width>16.39062cm</Width>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@ -71,7 +65,7 @@
<Top>1.27854cm</Top> <Top>1.27854cm</Top>
<Left>0.02328cm</Left> <Left>0.02328cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>17.71354cm</Width> <Width>16.44354cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
<Style> <Style>
<Border> <Border>
@ -98,7 +92,7 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName> <rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.37896cm</Top> <Top>0.37896cm</Top>
<Left>0.89799cm</Left> <Left>0.58049cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.5cm</Width> <Width>2.5cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
@ -119,8 +113,11 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value /> <Value>=First(Fields!REMESA.Value, "dsRevComis")</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@ -128,13 +125,13 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName> <rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.37896cm</Top> <Top>0.37896cm</Top>
<Left>3.59516cm</Left> <Left>3.27766cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.19604cm</Width> <Width>1.93146cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -149,7 +146,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>RECAUDADOR</Value> <Value>RECAUDADOR:</Value>
<Style> <Style>
<FontFamily>courier New</FontFamily> <FontFamily>courier New</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@ -161,9 +158,9 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName> <rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.37896cm</Top> <Top>0.37896cm</Top>
<Left>8.97504cm</Left> <Left>6.59537cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.5cm</Width> <Width>2.52078cm</Width>
<ZIndex>4</ZIndex> <ZIndex>4</ZIndex>
<Style> <Style>
<Border> <Border>
@ -182,8 +179,11 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value /> <Value>=First(Fields!NOMBRE_RECAUDADOR.Value, "dsRevComis")</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
@ -191,13 +191,13 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox11</rd:DefaultName> <rd:DefaultName>Textbox11</rd:DefaultName>
<Top>0.37896cm</Top> <Top>0.37896cm</Top>
<Left>11.67221cm</Left> <Left>9.29254cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.19604cm</Width> <Width>6.59379cm</Width>
<ZIndex>5</ZIndex> <ZIndex>5</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -212,7 +212,7 @@
<Width>2.83263cm</Width> <Width>2.83263cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>4.06166cm</Width> <Width>5.02867cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.10854cm</Width> <Width>3.10854cm</Width>
@ -243,7 +243,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
@ -254,7 +256,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
@ -286,7 +290,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
@ -297,7 +303,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox16</rd:DefaultName> <rd:DefaultName>Textbox16</rd:DefaultName>
@ -329,7 +337,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
@ -340,7 +350,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox18</rd:DefaultName> <rd:DefaultName>Textbox18</rd:DefaultName>
@ -372,7 +384,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
@ -383,7 +397,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
@ -415,7 +431,9 @@
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox20</rd:DefaultName> <rd:DefaultName>Textbox20</rd:DefaultName>
@ -447,17 +465,21 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!NUMERO_SERVICIO.Value</Value> <Value>=Fields!NUMERO_SERVICIO.Value</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>NUMERO_SERVICIO</rd:DefaultName> <rd:DefaultName>NUMERO_SERVICIO</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -477,17 +499,22 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!FECHA_FACTURACION.Value</Value> <Value>=Fields!FECHA_FACTURACION.Value</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
<Format>d</Format>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>FECHA_FACTURACION</rd:DefaultName> <rd:DefaultName>FECHA_FACTURACION</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -507,17 +534,21 @@
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!MONTO.Value</Value> <Value>=Fields!MONTO.Value</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>MONTO</rd:DefaultName> <rd:DefaultName>MONTO</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -538,18 +569,20 @@
<TextRun> <TextRun>
<Value>=Fields!MONTO_COMISION.Value</Value> <Value>=Fields!MONTO_COMISION.Value</Value>
<Style> <Style>
<FontFamily>Arial</FontFamily> <FontFamily>courier New</FontFamily>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>MONTO_COMISION</rd:DefaultName> <rd:DefaultName>MONTO_COMISION</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -570,18 +603,20 @@
<TextRun> <TextRun>
<Value>=Fields!COM_CALC.Value</Value> <Value>=Fields!COM_CALC.Value</Value>
<Style> <Style>
<FontFamily>Arial</FontFamily> <FontFamily>courier New</FontFamily>
</Style> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>COM_CALC</rd:DefaultName> <rd:DefaultName>COM_CALC</rd:DefaultName>
<Style> <Style>
<Border> <Border>
<Color>LightGrey</Color> <Color>LightGrey</Color>
<Style>Solid</Style> <Style>None</Style>
</Border> </Border>
<PaddingLeft>2pt</PaddingLeft> <PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight> <PaddingRight>2pt</PaddingRight>
@ -615,10 +650,10 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>dsRevComis</DataSetName> <DataSetName>dsRevComis</DataSetName>
<Top>1.70188cm</Top> <Top>1.38438cm</Top>
<Left>0.81703cm</Left> <Left>0.18203cm</Left>
<Height>1.2cm</Height> <Height>1.2cm</Height>
<Width>15.64979cm</Width> <Width>16.6168cm</Width>
<ZIndex>6</ZIndex> <ZIndex>6</ZIndex>
<Style> <Style>
<Border> <Border>
@ -633,52 +668,28 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Cantidad de Recibos</Value> <Value>Cantidad de Recibos: </Value>
<Style> <Style>
<FontFamily>courier New</FontFamily> <FontFamily>courier New</FontFamily>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>=CountRows()</Value>
<Style>
<Format>0;(0)</Format>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox24</rd:DefaultName> <rd:DefaultName>Textbox24</rd:DefaultName>
<Top>4.53292cm</Top> <Top>2.94542cm</Top>
<Left>0.81703cm</Left> <Left>0.49953cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>4.16688cm</Width> <Width>4.97417cm</Width>
<ZIndex>7</ZIndex> <ZIndex>7</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox25">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox25</rd:DefaultName>
<Top>4.53292cm</Top>
<Left>5.26203cm</Left>
<Height>0.6cm</Height>
<Width>0.52917cm</Width>
<ZIndex>8</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@ -707,11 +718,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox24</rd:DefaultName> <rd:DefaultName>Textbox24</rd:DefaultName>
<Top>4.53292cm</Top> <Top>2.94542cm</Top>
<Left>6.65298cm</Left> <Left>6.09895cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.94438cm</Width> <Width>1.94438cm</Width>
<ZIndex>9</ZIndex> <ZIndex>8</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@ -729,19 +740,23 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value /> <Value>=Sum(Fields!MONTO.Value)</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox27</rd:DefaultName> <rd:DefaultName>Textbox27</rd:DefaultName>
<Top>4.53292cm</Top> <Top>2.94542cm</Top>
<Left>8.65754cm</Left> <Left>8.76337cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.52646cm</Width> <Width>3.28965cm</Width>
<ZIndex>10</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@ -759,18 +774,56 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value /> <Value>=Sum(Fields!MONTO_COMISION.Value)</Value>
<Style /> <Style>
<FontFamily>courier New</FontFamily>
</Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox27</rd:DefaultName> <rd:DefaultName>Textbox27</rd:DefaultName>
<Top>4.53292cm</Top> <Top>2.94542cm</Top>
<Left>11.74591cm</Left> <Left>13.21147cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>2.52646cm</Width> <Width>1.72236cm</Width>
<ZIndex>10</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox29">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Sum(Fields!COM_CALC.Value)</Value>
<Style>
<FontFamily>courier New</FontFamily>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox27</rd:DefaultName>
<Top>2.94542cm</Top>
<Left>15.28974cm</Left>
<Height>0.6cm</Height>
<Width>1.5475cm</Width>
<ZIndex>11</ZIndex> <ZIndex>11</ZIndex>
<Style> <Style>
<Border> <Border>
@ -993,28 +1046,10 @@
</Page> </Page>
</ReportSection> </ReportSection>
</ReportSections> </ReportSections>
<ReportParameters>
<ReportParameter Name="p_remesa">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>1945850</Value>
</Values>
</DefaultValue>
<Prompt>Remesa:</Prompt>
</ReportParameter>
</ReportParameters>
<ReportParametersLayout> <ReportParametersLayout>
<GridLayoutDefinition> <GridLayoutDefinition>
<NumberOfColumns>4</NumberOfColumns> <NumberOfColumns>4</NumberOfColumns>
<NumberOfRows>2</NumberOfRows> <NumberOfRows>2</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>p_remesa</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition> </GridLayoutDefinition>
</ReportParametersLayout> </ReportParametersLayout>
<rd:ReportUnitType>Cm</rd:ReportUnitType> <rd:ReportUnitType>Cm</rd:ReportUnitType>

View file

@ -3,14 +3,6 @@
<DataSet Name="DataSet2"> <DataSet Name="DataSet2">
<Query> <Query>
<DataSourceReference>dsOracle</DataSourceReference> <DataSourceReference>dsOracle</DataSourceReference>
<DataSetParameters>
<DataSetParameter Name="p_remesa">
<ReadOnly>false</ReadOnly>
<Nullable>false</Nullable>
<OmitFromQuery>false</OmitFromQuery>
<rd:UserDefined>true</rd:UserDefined>
</DataSetParameter>
</DataSetParameters>
<CommandText>select distinct <CommandText>select distinct
substr(a.numero_recibo,2,7) numero_servicio, substr(a.numero_recibo,2,7) numero_servicio,
max(to_date(substr(a.numero_recibo,11,8),'ddmmyyyy')) fecha_facturacion, max(to_date(substr(a.numero_recibo,11,8),'ddmmyyyy')) fecha_facturacion,
@ -26,11 +18,12 @@ from mtx_archivos_recaudadores a,
mtx_recaudadores m, mtx_recaudadores m,
ptx_cancelaciones c ptx_cancelaciones c
where to_number(a.no_autorizacion) = r.fila_cancelacion (+) where to_number(a.no_autorizacion) = r.fila_cancelacion (+)
and a.remesa = :p_remesa and rownum &lt;= 5
and a.remesa = '22020101'
and a.cod_recaudador = m.cod_recaudador and a.cod_recaudador = m.cod_recaudador
and c.fila_cancelacion = r.fila_cancelacion -- and c.fila_cancelacion = r.fila_cancelacion
and c.fila_cancelacion = to_Number(a.no_autorizacion) -- and c.fila_cancelacion = to_Number(a.no_autorizacion)
and c.numero_remesa = :p_remesa and c.numero_remesa = '10180826'
group by group by
substr(a.numero_recibo,2,7), substr(a.numero_recibo,2,7),
a.remesa, a.remesa,
@ -41,40 +34,10 @@ group by
to_number(a.no_autorizacion), to_number(a.no_autorizacion),
c.monto_comision, c.monto_comision,
round(to_Number(a.total_pagado) / 100,2) * 0.02 round(to_Number(a.total_pagado) / 100,2) * 0.02
having sum(r.monto_actualizado) &lt; 35000
UNION
select distinct
substr(a.numero_recibo,2,7) numero_servicio, </CommandText>
max(to_date(substr(a.numero_recibo,11,8),'ddmmyyyy')) fecha_facturacion,
a.remesa,
r.fila_cancelacion,
m.nombre_recaudador,
sum(r.monto_actualizado) monto,
to_number(a.no_autorizacion) autoriz_rec,
c.monto_comision,
700.00 com_calc
from mtx_archivos_recaudadores a,
ptx_recibos r,
mtx_recaudadores m,
ptx_cancelaciones c
where to_number(a.no_autorizacion) = r.fila_cancelacion (+)
and a.remesa = :p_remesa
and a.cod_recaudador = m.cod_recaudador
and c.fila_cancelacion = r.fila_cancelacion
and c.fila_cancelacion = to_Number(a.no_autorizacion)
and c.numero_remesa = :p_remesa
group by
substr(a.numero_recibo,2,7),
a.remesa,
to_number(a.no_autorizacion),
to_char(r.numero_servicio)||lpad(to_char(r.sec_nis),2,'0'),
round(to_number(a.total_pagado) / 100,2),
r.fila_cancelacion,
m.nombre_recaudador,
to_number(a.no_autorizacion),
c.monto_comision
having sum(r.monto_actualizado) &gt;= 35000
order by 1,2</CommandText>
</Query> </Query>
<Fields> <Fields>
<Field Name="NUMERO_SERVICIO"> <Field Name="NUMERO_SERVICIO">