nuevo reporte para impresión del documento detalle

This commit is contained in:
Antonio Gonzalez
2020-08-27 15:07:33 -07:00
parent 761bf1e222
commit 72db432b5e
4 changed files with 93 additions and 53 deletions

View File

@@ -52,10 +52,10 @@
<Width>4.42895cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.2021cm</Width>
<Width>3.06732cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.36938cm</Width>
<Width>3.6031cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.89562cm</Width>
@@ -156,7 +156,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Fecha Ven.</Value>
<Value>Fecha Vencimiento.</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -191,7 +191,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Movto.</Value>
<Value>Cheque.</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -226,14 +226,14 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Abono</Value>
<Value>Abonado</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Right</TextAlign>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
@@ -250,47 +250,14 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<ColSpan>2</ColSpan>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Style>
<Border>
<Color>Silver</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 />
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.6cm</Height>
<Height>0.46771cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
@@ -303,7 +270,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , (Fields!Banco.Value &amp; " - " &amp; Fields!NumCuenta.Value),Fields!SerieFolio.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -336,7 +304,8 @@
<TextRun>
<Value>=Fields!Fecha.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
@@ -372,7 +341,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value), Fields!FechaDocumento.Value,Fields!FechaVencimiento.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
@@ -408,7 +378,8 @@
<TextRun>
<Value>= IIF( IsNothing(Fields!CveVenta.Value) , Fields!FolioCobro.Value,"")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -441,7 +412,8 @@
<TextRun>
<Value>=Fields!ImporteAbonado.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
<Format>'$'#,0.00;('$'#,0.00)</Format>
</Style>
</TextRun>
@@ -478,7 +450,8 @@
<TextRun>
<Value>=IIF(Fields!CveVenta.Value &gt; 0,Fields!MonedaVenta.Value, Fields!MonedaIE.Value)</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<FontWeight>=IIF( IsNothing(Fields!CveVenta.Value), "Bold","Normal")</FontWeight>
</Style>
</TextRun>
</TextRuns>
@@ -527,8 +500,8 @@
<DataSetName>DataSet1</DataSetName>
<Top>1.00112cm</Top>
<Left>0.12912cm</Left>
<Height>1.2cm</Height>
<Width>19.74272cm</Width>
<Height>1.06771cm</Height>
<Width>19.84166cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>

View File

@@ -209,7 +209,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>SubProyecto</Value>
<Value>=Parameters!SubProyectoHeader.Value</Value>
<Style>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -1485,6 +1485,12 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyectoHeader">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Language>es-MX</Language>
<rd:ReportUnitType>Cm</rd:ReportUnitType>

View File

@@ -16,7 +16,17 @@
<li>
<asp:LinkButton runat="server" ID="LkbNuevaVersion" OnClick="LkbNuevaVersion_Click" data-toggle="tooltip" data-placement="left" title="Agregar una nueva versión de este documento" Text="<i class='fa fa-plus'></i>Crear Nueva Versión"></asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LkbPDF" OnClick="LkbPDF_Click" data-toggle="tooltip" data-placement="left" title="ImprimirPDF" Text="<i class='fa fa-file-pdf-o'></i> PDF"></asp:LinkButton>
</li>
<li>
<asp:LinkButton runat="server" ID="LkbExcel" OnClick="LkbExcel_Click" data-toggle="tooltip" data-placement="left" title="ImprimirExcel" Text="<i class='fa fa-file-excel-o'></i> Excel"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LkbPDF"/>
<asp:PostBackTrigger ControlID="LkbExcel"/>
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">

View File

@@ -8,6 +8,7 @@ using Extensiones;
using System.Data;
using System.IO;
using System.Text;
using Microsoft.Reporting.WebForms;
public partial class OI_DocumentoDetalle : ClsPaginas
{
@@ -89,6 +90,19 @@ public partial class OI_DocumentoDetalle : ClsPaginas
ViewState["CveAsignacion"] = value;
}
}
private DataTable DtUsuariosParticipantes
{
get
{
return ((DataTable) ViewState["DtUsuariosParticipantes"]);
}
set
{
ViewState["DtUsuariosParticipantes"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
@@ -149,6 +163,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
if (ObjOI.GetDocumentoAutorizacion(this.CveDocumento))
{
GvUsuarios.DataSource = ObjOI.DtResultados;
DtUsuariosParticipantes = ObjOI.DtResultados;
UsuariosAux = ObjOI.DtResultados;
}
ObjOI.Dispose();
@@ -300,7 +315,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
bool MostrarSegunEnProceso = (LblEstatus.Text == "Estatus: En Proceso");
LkbActualizar.Visible = !(MostrarSegunRechazado) && (UsuarioActual.CveUsuario == this.CveUsuarioResponsable);
DivBotonesAcciones.Visible = !(MostrarSegunAprobado || MostrarSegunRechazado);
UpAgregar.Visible = MostrarSegunAprobado;
LkbNuevaVersion.Visible = MostrarSegunAprobado;
}
private void CargarCategorias()
@@ -832,7 +847,7 @@ public partial class OI_DocumentoDetalle : ClsPaginas
}
#endregion
#region "Rechazar"
#region "RECHAZAR"
protected void LkbRechazar_Click(object sender, EventArgs e)
{
ClsOIEventos ObjOI = new ClsOIEventos();
@@ -845,4 +860,40 @@ public partial class OI_DocumentoDetalle : ClsPaginas
Response.Redirect(string.Format("/OI/DocumentoDetalle.aspx?CveDocumento={0}&Mensaje={1}", this.CveDocumento, "Rechazado"));
}
#endregion
#region "IMPRIMIR"
private void Imprimir(string Formato)
{
List<ReportParameter> Params = new List<ReportParameter>();
Params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
Params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
Params.Add(new ReportParameter("LogoPath", ""));
Params.Add(new ReportParameter("Descripcion", TxtDescripcion.Text));
Params.Add(new ReportParameter("Categoria", DdlCategoria.SelectedItem.Text));
Params.Add(new ReportParameter("SubCategoria", DdlSubCategoria.SelectedItem.Text));
Params.Add(new ReportParameter("Estatus", LblEstatus.Text.Substring(9)));
Params.Add(new ReportParameter("Version", TxtVersion.Text));
Params.Add(new ReportParameter("Responsable", TxtResponsable.Text));
Params.Add(new ReportParameter("Observaciones", TxtObs.InnerText));
Params.Add(new ReportParameter("Documento", this.ArchivoAdjuntoNombre));
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
string LogoRuta = (Imagen.Exists) ? logouri : "" ;
Params.Add(new ReportParameter("LogoPath", LogoRuta));
ImprimirPDF("Empresas/Grales/Formatos/RepDocumentos.rdlc", this.DtUsuariosParticipantes, Params, "Detalle del documento", Formato);
}
protected void LkbPDF_Click(object sender, EventArgs e)
{
Imprimir("PDF");
}
protected void LkbExcel_Click(object sender, EventArgs e)
{
Imprimir("Excel");
}
#endregion
}