Correcciones de Reporte de PS y su Detalle

This commit is contained in:
janeth arvizu
2019-08-28 12:59:08 -07:00
parent 50082ad2a8
commit 83f0959bf2
2 changed files with 188 additions and 177 deletions

View File

@@ -309,23 +309,25 @@ Partial Class Compras_RepProductosServicios
If DdlGrupo.SelectedValue = "6" Then ' cuando es Año
'-1/01
If e.Row.DBCampo("Anio") = "-1/01" Then
FechaI = $"01/01/{e.Row.DBCampo("Anio")}"
If e.Row.DBCampo("Anio") = "-1" Then
FechaI = "-1"
FechaF = "-1"
Else
FechaI = $"01/01/{e.Row.DBCampo("Anio")}".ToDate.FirstDayOfMonth.ToShortDateString
FechaI = $"01/01/{e.Row.DBCampo("Anio")}"
FechaF = $"01/12/{e.Row.DBCampo("Anio")}".ToDate.LastDayOfMonth.ToShortDateString
End If
FechaF = $"01/12/{e.Row.DBCampo("Anio")}".ToDate.LastDayOfMonth.ToShortDateString
End If
If DdlGrupo.SelectedValue = "8" Then ' cuando es Año/Mes
If e.Row.DBCampo("AnioMes") = "-1/01" Then
FechaI = $"{e.Row.DBCampo("AnioMes")}/01"
If e.Row.DBCampo("AnioMes") = "-1" Then
FechaI = "-1"
FechaF = "-1"
Else
FechaI = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.FirstDayOfMonth.ToShortDateString
FechaI = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.ToShortDateString
FechaF = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.LastDayOfMonth.ToShortDateString
End If
FechaF = $"{e.Row.DBCampo("AnioMes")}/01".ToDate.LastDayOfMonth.ToShortDateString
End If
@@ -337,9 +339,8 @@ Partial Class Compras_RepProductosServicios
If Not e.Row.DBCampo("GpoID") = "1" Then
e.Row.Cells(0).Text = String.Format("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", Liga, If(e.Row.DBCampo("GpoID") = "1", e.Row.DBCampo("Moneda"), e.Row.DBCampo("GPO")))
e.Row.Cells(1).Text = String.Format("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", Liga, e.Row.DBCampo("Cantidad").FormatoNumero)
End If
e.Row.Cells(1).Text = String.Format("<a class=""Texto"" target=""_blank"" href=""{0}"">{1}</a>", Liga, e.Row.DBCampo("Cantidad").FormatoNumero)
'Si son igual a cero se limpia el campo
If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.Cells(2).Text = ""
@@ -482,7 +483,7 @@ Partial Class Compras_RepProductosServicios
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
params.Add(New ReportParameter("Filtros", $"{Proveedor}{FechaInicio}{FechaFin}{Grupo}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}"))
params.Add(New ReportParameter("Filtros", $"{Grupo}{Proveedor}{FechaInicio}{FechaFin}{TipoGasto}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{TipoAF}{SubTipoAF}{AF}"))
'params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.Text))
'params.Add(New ReportParameter("FechaInicio", txtFechaI.Text))
'params.Add(New ReportParameter("FechaFin", txtFechaF.Text))

View File

@@ -5,9 +5,6 @@
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>1.60749cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.70081cm</Width>
</TablixColumn>
@@ -15,73 +12,40 @@
<Width>1.92431cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.73987cm</Width>
<Width>4.71883cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
<Width>1.41521cm</Width>
</TablixColumn>
<TablixColumn>
<Width>4.74981cm</Width>
<Width>2.95064cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.3231cm</Width>
<Width>1.69352cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.88058cm</Width>
<Width>1.84871cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.70617cm</Width>
<Width>1.65325cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.82697cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.70625cm</Width>
<Width>1.65333cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.85343cm</Width>
<Width>3.70551cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.47879cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>SerieFolio</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox16">
@@ -163,7 +127,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor</Value>
<Value>Producto/Servicio</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -199,7 +163,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Sub Proyecto</Value>
<Value>AF</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -235,7 +199,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Producto/Servicio</Value>
<Value>Clasificación</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -271,7 +235,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>AF</Value>
<Value>PU</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -307,7 +271,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Clasificación</Value>
<Value>Cantidad</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -343,7 +307,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>PU</Value>
<Value>SubTotal</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -379,7 +343,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Cantidad</Value>
<Value>Total</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -415,7 +379,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>SubTotal</Value>
<Value>SerieFolio</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -451,7 +415,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Total</Value>
<Value>Proveedor</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -478,36 +442,34 @@
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.42588cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="SerieFolio1">
<Textbox Name="Textbox4">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=iif(CInt(Fields!CveCompra.Value)&lt;1, Fields!GPO.Value,Fields!SerieFolio.Value)</Value>
<Value>SubProyecto</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SerieFolio1</rd:DefaultName>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
@@ -516,6 +478,11 @@
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.42588cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="FechaCompra">
@@ -587,14 +554,14 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="RazonSocial">
<Textbox Name="PS1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!RazonSocial.Value</Value>
<Value>=IIf(Fields!CveCompra.Value &lt;= 0, IIf(Fields!GPO.Value = "", Fields!SerieFolio.Value, Fields!GPO.Value),Fields!PS.Value)</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
@@ -605,7 +572,7 @@
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>RazonSocial</rd:DefaultName>
<rd:DefaultName>PS1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -621,14 +588,14 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubProyecto">
<Textbox Name="CodigoAF1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SubProyecto.Value</Value>
<Value>=Fields!CodigoAF.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
@@ -636,10 +603,12 @@
</Style>
</TextRun>
</TextRuns>
<Style />
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubProyecto</rd:DefaultName>
<rd:DefaultName>CodigoAF1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -655,14 +624,14 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="PS">
<Textbox Name="Clasificacion1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!PS.Value</Value>
<Value>=Fields!Clasificacion.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
@@ -674,7 +643,7 @@
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>PS</rd:DefaultName>
<rd:DefaultName>Clasificacion1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -690,81 +659,7 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="CodigoAF">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!CodigoAF.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>CodigoAF</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Clasificacion">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Clasificacion.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Clasificacion</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="PU">
<Textbox Name="PU1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
@@ -775,7 +670,7 @@
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;-#,0.00;'-'</Format>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
@@ -785,7 +680,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>PU</rd:DefaultName>
<rd:DefaultName>PU1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -801,7 +696,7 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Cantidad">
<Textbox Name="Cantidad1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
@@ -812,7 +707,7 @@
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;(#,0.00);'-'</Format>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
@@ -822,7 +717,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cantidad</rd:DefaultName>
<rd:DefaultName>Cantidad1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -838,7 +733,8 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubTotal">
<Textbox Name="SubTotal1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
@@ -858,7 +754,7 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubTotal</rd:DefaultName>
<rd:DefaultName>SubTotal1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -874,7 +770,8 @@
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Total1">
<Textbox Name="Total">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
@@ -884,7 +781,7 @@
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Format>#,0.00;(#,0.00);'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
@@ -894,7 +791,116 @@
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Total1</rd:DefaultName>
<rd:DefaultName>Total</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubProyecto">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SerieFolio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;-#,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubProyecto</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="RazonSocial1">
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!RazonSocial.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Format>#,0.00;- #,0.00;'-'</Format>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>RazonSocial1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<BackgroundColor>=iif(Fields!CveCompra.Value = "", "#67809F", "Transparent")</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SubProyecto1">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SubProyecto.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>=iif(Fields!CveCompra.Value = "", "Bold", "Normal")</FontWeight>
<Color>=iif(Fields!CveCompra.Value= "", "White", "Black")</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>SubProyecto1</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
@@ -942,7 +948,7 @@
<Top>0.70583cm</Top>
<Left>0.06614cm</Left>
<Height>0.90467cm</Height>
<Width>27.51879cm</Width>
<Width>27.59109cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -1372,6 +1378,10 @@
<DataField>GPO</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Moneda">
<DataField>Moneda</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName>