USE [TryNFeOnline]
GO

ALTER TABLE [dbo].[Fatura] ADD 
[idViagemTransporte] [int] NULL
GO
ALTER TABLE [dbo].[NFseItens] ADD 
[percRedBCInss] [decimal] (18,4) NULL
GO
CREATE TABLE [dbo].[NaturezaNFSeOperacao]
(
	[codigoNaturezaNFSe] [int] NOT NULL,
	[descricaoNaturezaNFSe] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL,
	[padraoNFSe] [varchar] (20) COLLATE Latin1_General_CI_AS NOT NULL,
	[idCidade] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Fatura] ADD CONSTRAINT [FK_Fatura_ViagemTransporte] FOREIGN KEY
	(
		[idViagemTransporte]
	)
	REFERENCES [dbo].[ViagemTransporte]
	(
		[id]
	)
GO
INSERT [dbo].[ReportsGrupos] ([descricao], [idnInativo]) VALUES (N'Viagem', 0)
GO

INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Analitico', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /></Parameters><Bands><Item1 Ref="23" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="24" ControlType="DetailBand" Name="Detail" HeightF="0" Visible="false" /><Item3 Ref="25" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="26" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="27" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="28" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="29" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="30" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="32" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="34" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="36" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="37" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="38" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="39" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="40" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="41" UseFont="false" /></Item8><Item9 Ref="42" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="43" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="44" ControlType="DetailReportBand" Name="DetailReport3" Level="0" DataMember="Query.QueryQueryMotoristas" DataSource="#Ref-0"><Bands><Item1 Ref="45" ControlType="DetailBand" Name="Detail4" HeightF="23"><Controls><Item1 Ref="46" ControlType="XRLabel" Name="label24" Multiline="true" Text="label24" TextAlignment="MiddleLeft" SizeF="475.83313,23" LocationFloat="66.25005,0" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="47" EventName="BeforePrint" PropertyName="Text" Expression="[razaoSocial]" /></ExpressionBindings><StylePriority Ref="48" UseBorders="false" UseTextAlignment="false" /></Item1></Controls></Item1><Item2 Ref="49" ControlType="ReportHeaderBand" Name="ReportHeader3" HeightF="32.9999733" KeepTogether="true"><Controls><Item1 Ref="50" ControlType="XRLabel" Name="label25" Multiline="true" Text="Motoristas" TextAlignment="MiddleLeft" SizeF="475.83313,23" LocationFloat="66.2500839,9.999974" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="51" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item1></Controls></Item2></Bands></Item5><Item6 Ref="52" ControlType="DetailReportBand" Name="DetailReport4" Level="1" DataMember="Query.QueryQueryReservas" DataSource="#Ref-0"><Bands><Item1 Ref="53" ControlType="DetailBand" Name="Detail5" HeightF="25"><Controls><Item1 Ref="54" ControlType="XRTable" Name="table1" TextAlignment="MiddleLeft" SizeF="726.9999,25" LocationFloat="10.000102,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="55" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="56" ControlType="XRTableCell" Name="tableCell1" Weight="1.6597886386605643" Multiline="true" Text="[parceiro]" /><Item2 Ref="57" ControlType="XRTableCell" Name="tableCell2" Weight="1.5657949859820608" Multiline="true" Text="tableCell2"><ExpressionBindings><Item1 Ref="58" EventName="BeforePrint" PropertyName="Text" Expression="[vendedor]" /></ExpressionBindings></Item2><Item3 Ref="59" ControlType="XRTableCell" Name="tableCell3" Weight="0.46767478515537436" TextFormatString="{0:N2}" Multiline="true" Text="tableCell3"><ExpressionBindings><Item1 Ref="60" EventName="BeforePrint" PropertyName="Text" Expression="[valorAssento]" /></ExpressionBindings></Item3><Item4 Ref="61" ControlType="XRTableCell" Name="tableCell4" Weight="0.30674159020200037" Multiline="true" Text="tableCell4"><ExpressionBindings><Item1 Ref="62" EventName="BeforePrint" PropertyName="Text" Expression="[assento]" /></ExpressionBindings></Item4></Cells></Item1></Rows><StylePriority Ref="63" UseTextAlignment="false" /></Item1></Controls></Item1><Item2 Ref="64" ControlType="ReportHeaderBand" Name="ReportHeader2" HeightF="28.2502" KeepTogether="true"><Controls><Item1 Ref="65" ControlType="XRLabel" Name="label18" Multiline="true" Text="Assento" TextAlignment="MiddleLeft" SizeF="55.7503052,23" LocationFloat="681.2497,5.2502" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="66" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="67" ControlType="XRLabel" Name="label8" Multiline="true" Text="Vendedor" TextAlignment="MiddleLeft" SizeF="284.5833,23" LocationFloat="311.666565,5.2502" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="68" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="69" ControlType="XRLabel" Name="label7" Multiline="true" Text="Valor" TextAlignment="MiddleLeft" SizeF="84.99985,23" LocationFloat="596.2499,5.2502" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="70" UseBorders="false" UseTextAlignment="false" /></Item3><Item4 Ref="71" ControlType="XRLabel" Name="label6" Multiline="true" Text="Parceiro" TextAlignment="MiddleLeft" SizeF="301.666534,23" LocationFloat="10.000102,5.2502" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="72" UseBorders="false" UseTextAlignment="false" /></Item4></Controls></Item2><Item3 Ref="73" ControlType="GroupFooterBand" Name="GroupFooter2" HeightF="34.5415764"><Controls><Item1 Ref="74" ControlType="XRLabel" Name="label30" Multiline="true" Text="Total Veículo:" TextAlignment="MiddleRight" SizeF="85.20859,23" LocationFloat="511.04126,1.5415827" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="75" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="76" ControlType="XRLine" Name="line3" LineStyle="Dash" SizeF="746.9999,2.083334" LocationFloat="0.000254313141,28.166708" /><Item3 Ref="77" ControlType="XRLabel" Name="label23" TextFormatString="{0:R$0.00}" Multiline="true" Text="label23" TextAlignment="MiddleLeft" SizeF="140.750122,23" LocationFloat="596.2499,1.54158258" Padding="2,2,0,0,100" Borders="All"><Summary Ref="78" Running="Group" /><ExpressionBindings><Item1 Ref="79" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="80" UseBorders="false" UseTextAlignment="false" /></Item3></Controls></Item3></Bands></Item6><Item7 Ref="81" ControlType="GroupHeaderBand" Name="GroupHeader1" HeightF="34.375" KeepTogether="true"><GroupFields><Item1 Ref="82" FieldName="idViagemVeiculo" /></GroupFields><Controls><Item1 Ref="83" ControlType="XRLabel" Name="label21" Multiline="true" Text="Nº DACTE:" TextAlignment="MiddleLeft" SizeF="75.9999847,23" LocationFloat="309.8332,6" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><StylePriority Ref="84" UseFont="false" UseTextAlignment="false" /></Item1><Item2 Ref="85" ControlType="XRLabel" Name="label20" Multiline="true" Text="Placa:" TextAlignment="MiddleLeft" SizeF="100,23" LocationFloat="93.79161,6" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><StylePriority Ref="86" UseFont="false" UseTextAlignment="false" /></Item2><Item3 Ref="87" ControlType="XRLabel" Name="label5" Multiline="true" Text="label5" TextAlignment="MiddleLeft" SizeF="100,23" LocationFloat="193.791611,6" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="88" EventName="BeforePrint" PropertyName="Text" Expression="[placa]" /></ExpressionBindings><StylePriority Ref="89" UseTextAlignment="false" /></Item3><Item4 Ref="90" ControlType="XRLabel" Name="label10" Multiline="true" Text="label10" TextAlignment="MiddleLeft" SizeF="100,23" LocationFloat="385.8332,6" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="91" EventName="BeforePrint" PropertyName="Text" Expression="[numeroDacte]" /></ExpressionBindings><StylePriority Ref="92" UseTextAlignment="false" /></Item4></Controls></Item7><Item8 Ref="93" ControlType="GroupHeaderBand" Name="GroupHeader2" GroupUnion="WholePage" Level="1" HeightF="59.375" KeepTogether="true"><GroupFields><Item1 Ref="94" FieldName="id" /></GroupFields><Controls><Item1 Ref="95" ControlType="XRLabel" Name="label11" Multiline="true" Text="label11" TextAlignment="MiddleLeft" SizeF="262.166351,23.0000019" LocationFloat="195.625015,32.41677" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="96" EventName="BeforePrint" PropertyName="Text" Expression="[cidadeUfOrigem]" /></ExpressionBindings><StylePriority Ref="97" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="98" ControlType="XRLabel" Name="label12" Multiline="true" Text="label12" TextAlignment="MiddleLeft" SizeF="288.166718,23.0000019" LocationFloat="457.7914,32.41677" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="99" EventName="BeforePrint" PropertyName="Text" Expression="[cidadeUfDestino]" /></ExpressionBindings><StylePriority Ref="100" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="101" ControlType="XRLabel" Name="label9" Multiline="true" Text="label9" TextAlignment="MiddleLeft" SizeF="97.08327,22.9999981" LocationFloat="98.54175,32.41677" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="102" EventName="BeforePrint" PropertyName="Text" Expression="[status]" /></ExpressionBindings><StylePriority Ref="103" UseBorders="false" UseTextAlignment="false" /></Item3><Item4 Ref="104" ControlType="XRLabel" Name="label4" Multiline="true" Text="label4" TextAlignment="MiddleLeft" SizeF="98.54177,22.9999981" LocationFloat="0,32.41677" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="105" EventName="BeforePrint" PropertyName="Text" Expression="[id]" /></ExpressionBindings><StylePriority Ref="106" UseBorders="false" UseTextAlignment="false" /></Item4><Item5 Ref="107" ControlType="XRLabel" Name="label16" Multiline="true" Text="Cidade Destino" TextAlignment="MiddleLeft" SizeF="288.166718,23" LocationFloat="457.7914,9" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="108" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item5><Item6 Ref="109" ControlType="XRLabel" Name="label19" Multiline="true" Text="Status Viagem" TextAlignment="MiddleLeft" SizeF="97.0832443,23" LocationFloat="98.54177,9" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="110" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item6><Item7 Ref="111" ControlType="XRLabel" Name="label17" Multiline="true" Text="Codigo Viagem" TextAlignment="MiddleLeft" SizeF="98.54177,23" LocationFloat="0,9" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="112" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item7><Item8 Ref="113" ControlType="XRLabel" Name="label15" Multiline="true" Text="Cidade Origem" TextAlignment="MiddleLeft" SizeF="262.166382,23" LocationFloat="195.625015,9" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="114" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item8></Controls></Item8><Item9 Ref="115" ControlType="GroupFooterBand" Name="GroupFooter1" Level="1" HeightF="36.3749237"><Controls><Item1 Ref="116" ControlType="XRLabel" Name="label28" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="585.8335,3.37492633" Padding="2,2,0,0,100" Borders="All"><Summary Ref="117" Running="Group" /><ExpressionBindings><Item1 Ref="118" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([QueryQueryReservas].[valorAssento])" /></ExpressionBindings><StylePriority Ref="119" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="120" ControlType="XRLabel" Name="label29" Multiline="true" Text="Total Viagem:" TextAlignment="MiddleRight" SizeF="90.91641,23" LocationFloat="494.9169,3.37492633" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="121" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="122" ControlType="XRLine" Name="line1" SizeF="746.9999,2.083334" LocationFloat="0,28.3749256" /></Controls></Item9><Item10 Ref="123" ControlType="ReportFooterBand" Name="ReportFooter" HeightF="34.4167061"><Controls><Item1 Ref="124" ControlType="XRLabel" Name="label27" Multiline="true" Text="Total Valor:" TextAlignment="MiddleRight" SizeF="90.91647,23" LocationFloat="494.916779,0" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="125" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="126" ControlType="XRLabel" Name="label26" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="585.8335,0" Padding="2,2,0,0,96" Borders="All"><Summary Ref="127" Running="Report" /><ExpressionBindings><Item1 Ref="128" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([QueryQueryReservas].[valorAssento])" /></ExpressionBindings><StylePriority Ref="129" UseBorders="false" UseTextAlignment="false" /></Item2></Controls></Item10></Bands><ParameterPanelLayoutItems><Item1 Ref="130" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="131" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="132" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="133" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="134" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="135" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="136" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="137" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="138" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="140" Value="#Ref-139" Description="Todos" /><Item2 Ref="142" Value="#Ref-141" Description="Aberto" /><Item3 Ref="144" Value="#Ref-143" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="139" Content="Todos" Type="System.String" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="141" Content="Aberto" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="143" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO
INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Agrupado Por Vendedor', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /><Item10 Ref="24" Description="Exibir Detalhes" ValueInfo="True" Name="idnExibirDetalhes" Type="#Ref-23" /></Parameters><Bands><Item1 Ref="25" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="26" ControlType="DetailBand" Name="Detail" HeightF="16.6666679"><Controls><Item1 Ref="27" ControlType="XRTable" Name="table2" SizeF="748.0002,16.6666679" LocationFloat="0,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="28" ControlType="XRTableRow" Name="tableRow2" Weight="1"><Cells><Item1 Ref="29" ControlType="XRTableCell" Name="tableCell5" Weight="1.0053667924626104" Multiline="true" Text="[id]" /><Item2 Ref="30" ControlType="XRTableCell" Name="tableCell8" Weight="1.0694270661973986" Multiline="true" Text="tableCell8"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[idViagemVeiculo]" /></ExpressionBindings></Item2><Item3 Ref="32" ControlType="XRTableCell" Name="tableCell6" Weight="1.0065532398560897" Multiline="true" Text="tableCell6"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[assento]" /></ExpressionBindings></Item3><Item4 Ref="34" ControlType="XRTableCell" Name="tableCell7" Weight="1.0231410994598757" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell7"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[valorAssento]" /></ExpressionBindings></Item4></Cells></Item1></Rows></Item1></Controls><ExpressionBindings><Item1 Ref="36" EventName="BeforePrint" PropertyName="Visible" Expression="?idnExibirDetalhes" /></ExpressionBindings></Item2><Item3 Ref="37" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="38" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="39" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="40" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="41" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="42" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="43" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="44" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="45" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="46" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="47" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="48" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="49" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="50" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="51" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="52" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="53" UseFont="false" /></Item8><Item9 Ref="54" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="55" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="56" ControlType="GroupHeaderBand" Name="GroupHeader2" GroupUnion="WholePage" HeightF="69.7916641" KeepTogether="true"><GroupFields><Item1 Ref="57" FieldName="idvendedor" /></GroupFields><Controls><Item1 Ref="58" ControlType="XRTable" Name="table1" SizeF="748,19.7916679" LocationFloat="0,47.9166679" Padding="2,2,0,0,96"><Rows><Item1 Ref="59" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="60" ControlType="XRTableCell" Name="tableCell1" Weight="0.99882271288201452" Multiline="true" Text="Código Viagem" /><Item2 Ref="61" ControlType="XRTableCell" Name="tableCell4" Weight="1.0624650293725455" Multiline="true" Text="Código Viagem Veículo" /><Item3 Ref="62" ControlType="XRTableCell" Name="tableCell2" Weight="1" Multiline="true" Text="Assento" /><Item4 Ref="63" ControlType="XRTableCell" Name="tableCell3" Weight="1.0164800576685278" Multiline="true" Text="Valor" /></Cells></Item1></Rows></Item1><Item2 Ref="64" ControlType="XRLabel" Name="label5" Multiline="true" Text="label5" TextAlignment="MiddleLeft" SizeF="582.708,23" LocationFloat="98.54177,9.416771" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="65" EventName="BeforePrint" PropertyName="Text" Expression="[vendedor]" /></ExpressionBindings><StylePriority Ref="66" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="67" ControlType="XRLabel" Name="label16" Multiline="true" Text="VENDEDOR:" TextAlignment="MiddleLeft" SizeF="88.54167,23" LocationFloat="10.000102,9.416771" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="68" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item3></Controls></Item5><Item6 Ref="69" ControlType="GroupFooterBand" Name="GroupFooter1" HeightF="36.3749237"><Controls><Item1 Ref="70" ControlType="XRLabel" Name="label28" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="561.5436,3.37492633" Padding="2,2,0,0,100" Borders="All"><Summary Ref="71" Running="Group" /><ExpressionBindings><Item1 Ref="72" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="73" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="74" ControlType="XRLabel" Name="label29" Multiline="true" Text="Total Viagem:" TextAlignment="MiddleRight" SizeF="90.91641,23" LocationFloat="470.626984,3.37492633" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="75" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="76" ControlType="XRLine" Name="line1" SizeF="746.9999,2.083334" LocationFloat="0,28.3749256" /></Controls></Item6><Item7 Ref="77" ControlType="ReportFooterBand" Name="ReportFooter" HeightF="34.4167061"><Controls><Item1 Ref="78" ControlType="XRLabel" Name="label27" Multiline="true" Text="Total Valor:" TextAlignment="MiddleRight" SizeF="90.91647,23" LocationFloat="408.458435,0" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="79" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="80" ControlType="XRLabel" Name="label26" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="499.375153,0" Padding="2,2,0,0,100" Borders="All"><Summary Ref="81" Running="Report" /><ExpressionBindings><Item1 Ref="82" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="83" UseBorders="false" UseTextAlignment="false" /></Item2></Controls></Item7></Bands><ParameterPanelLayoutItems><Item1 Ref="84" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="85" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="86" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="87" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="88" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="89" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="90" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="91" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="92" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="94" Value="#Ref-93" Description="Todos" /><Item2 Ref="96" Value="#Ref-95" Description="Aberto" /><Item3 Ref="98" Value="#Ref-97" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="23" Content="System.Boolean" Type="System.Type" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="93" Content="Todos" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="95" Content="Aberto" Type="System.String" /><Item13 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="97" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO
INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Agrupado por Motorista', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /><Item10 Ref="24" Description="Exibir Detalhes" ValueInfo="True" Name="idnExibirDetalhes" Type="#Ref-23" /></Parameters><Bands><Item1 Ref="25" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="26" ControlType="DetailBand" Name="Detail" HeightF="16.6666679"><Controls><Item1 Ref="27" ControlType="XRTable" Name="table2" SizeF="748.0002,16.6666679" LocationFloat="0,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="28" ControlType="XRTableRow" Name="tableRow2" Weight="1"><Cells><Item1 Ref="29" ControlType="XRTableCell" Name="tableCell5" Weight="1.0053667924626104" Multiline="true" Text="[id]" /><Item2 Ref="30" ControlType="XRTableCell" Name="tableCell8" Weight="1.0694270661973986" Multiline="true" Text="tableCell8"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[idViagemVeiculo]" /></ExpressionBindings></Item2><Item3 Ref="32" ControlType="XRTableCell" Name="tableCell6" Weight="1.0065532398560897" Multiline="true" Text="tableCell6"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[assento]" /></ExpressionBindings></Item3><Item4 Ref="34" ControlType="XRTableCell" Name="tableCell7" Weight="1.0231410994598757" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell7"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[valorAssento]" /></ExpressionBindings></Item4></Cells></Item1></Rows></Item1></Controls><ExpressionBindings><Item1 Ref="36" EventName="BeforePrint" PropertyName="Visible" Expression="?idnExibirDetalhes" /></ExpressionBindings></Item2><Item3 Ref="37" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="38" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="39" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="40" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="41" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="42" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="43" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="44" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="45" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="46" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="47" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="48" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="49" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="50" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="51" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="52" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="53" UseFont="false" /></Item8><Item9 Ref="54" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="55" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="56" ControlType="GroupHeaderBand" Name="GroupHeader2" GroupUnion="WholePage" HeightF="69.7916641" KeepTogether="true"><GroupFields><Item1 Ref="57" FieldName="idMotorista" /></GroupFields><Controls><Item1 Ref="58" ControlType="XRTable" Name="table1" SizeF="748,19.7916679" LocationFloat="0,47.9166679" Padding="2,2,0,0,96"><Rows><Item1 Ref="59" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="60" ControlType="XRTableCell" Name="tableCell1" Weight="0.99882271288201452" Multiline="true" Text="Código Viagem" /><Item2 Ref="61" ControlType="XRTableCell" Name="tableCell4" Weight="1.0624650293725455" Multiline="true" Text="Código Viagem Veículo" /><Item3 Ref="62" ControlType="XRTableCell" Name="tableCell2" Weight="1" Multiline="true" Text="Assento" /><Item4 Ref="63" ControlType="XRTableCell" Name="tableCell3" Weight="1.0164800576685278" Multiline="true" Text="Valor" /></Cells></Item1></Rows></Item1><Item2 Ref="64" ControlType="XRLabel" Name="label5" Multiline="true" Text="label5" TextAlignment="MiddleLeft" SizeF="552,23" LocationFloat="121.875,9.416771" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="65" EventName="BeforePrint" PropertyName="Text" Expression="[motorista]" /></ExpressionBindings><StylePriority Ref="66" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="67" ControlType="XRLabel" Name="label16" Multiline="true" Text="MOTORISTA" TextAlignment="MiddleLeft" SizeF="111.8749,23" LocationFloat="10.000102,9.416771" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="68" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item3></Controls></Item5><Item6 Ref="69" ControlType="GroupFooterBand" Name="GroupFooter1" HeightF="36.3749237"><Controls><Item1 Ref="70" ControlType="XRLabel" Name="label28" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="561.5436,3.37492633" Padding="2,2,0,0,100" Borders="All"><Summary Ref="71" Running="Group" /><ExpressionBindings><Item1 Ref="72" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="73" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="74" ControlType="XRLabel" Name="label29" Multiline="true" Text="Total Viagem:" TextAlignment="MiddleRight" SizeF="90.91641,23" LocationFloat="470.626984,3.37492633" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="75" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="76" ControlType="XRLine" Name="line1" SizeF="746.9999,2.083334" LocationFloat="0,28.3749256" /></Controls></Item6><Item7 Ref="77" ControlType="ReportFooterBand" Name="ReportFooter" HeightF="34.4167061"><Controls><Item1 Ref="78" ControlType="XRLabel" Name="label27" Multiline="true" Text="Total Valor:" TextAlignment="MiddleRight" SizeF="90.91647,23" LocationFloat="408.458435,0" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="79" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="80" ControlType="XRLabel" Name="label26" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="499.375153,0" Padding="2,2,0,0,100" Borders="All"><Summary Ref="81" Running="Report" /><ExpressionBindings><Item1 Ref="82" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="83" UseBorders="false" UseTextAlignment="false" /></Item2></Controls></Item7></Bands><ParameterPanelLayoutItems><Item1 Ref="84" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="85" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="86" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="87" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="88" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="89" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="90" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="91" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="92" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="94" Value="#Ref-93" Description="Todos" /><Item2 Ref="96" Value="#Ref-95" Description="Aberto" /><Item3 Ref="98" Value="#Ref-97" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="23" Content="System.Boolean" Type="System.Type" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="93" Content="Todos" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="95" Content="Aberto" Type="System.String" /><Item13 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="97" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO
INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Agrupado por Veiculo', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /><Item10 Ref="24" Description="Exibir Detalhes" ValueInfo="True" Name="idnExibirDetalhes" Type="#Ref-23" /></Parameters><Bands><Item1 Ref="25" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="26" ControlType="DetailBand" Name="Detail" HeightF="16.6666679"><Controls><Item1 Ref="27" ControlType="XRTable" Name="table2" SizeF="748.0002,16.6666679" LocationFloat="0,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="28" ControlType="XRTableRow" Name="tableRow2" Weight="1"><Cells><Item1 Ref="29" ControlType="XRTableCell" Name="tableCell5" Weight="1.0053667924626104" Multiline="true" Text="[id]" /><Item2 Ref="30" ControlType="XRTableCell" Name="tableCell8" Weight="1.0694270661973986" Multiline="true" Text="tableCell8"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[idViagemVeiculo]" /></ExpressionBindings></Item2><Item3 Ref="32" ControlType="XRTableCell" Name="tableCell6" Weight="1.0065532398560897" Multiline="true" Text="tableCell6"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[assento]" /></ExpressionBindings></Item3><Item4 Ref="34" ControlType="XRTableCell" Name="tableCell7" Weight="1.0231410994598757" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell7"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[valorAssento]" /></ExpressionBindings></Item4></Cells></Item1></Rows></Item1></Controls><ExpressionBindings><Item1 Ref="36" EventName="BeforePrint" PropertyName="Visible" Expression="?idnExibirDetalhes" /></ExpressionBindings></Item2><Item3 Ref="37" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="38" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="39" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="40" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="41" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="42" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="43" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="44" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="45" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="46" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="47" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="48" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="49" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="50" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="51" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="52" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="53" UseFont="false" /></Item8><Item9 Ref="54" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="55" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="56" ControlType="GroupHeaderBand" Name="GroupHeader2" GroupUnion="WholePage" HeightF="69.7916641" KeepTogether="true"><GroupFields><Item1 Ref="57" FieldName="placa" /></GroupFields><Controls><Item1 Ref="58" ControlType="XRTable" Name="table1" SizeF="748,19.7916679" LocationFloat="0,47.9166679" Padding="2,2,0,0,96"><Rows><Item1 Ref="59" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="60" ControlType="XRTableCell" Name="tableCell1" Weight="0.99882271288201452" Multiline="true" Text="Código Viagem" /><Item2 Ref="61" ControlType="XRTableCell" Name="tableCell4" Weight="1.0624650293725455" Multiline="true" Text="Código Viagem Veículo" /><Item3 Ref="62" ControlType="XRTableCell" Name="tableCell2" Weight="1" Multiline="true" Text="Assento" /><Item4 Ref="63" ControlType="XRTableCell" Name="tableCell3" Weight="1.0164800576685278" Multiline="true" Text="Valor" /></Cells></Item1></Rows></Item1><Item2 Ref="64" ControlType="XRLabel" Name="label5" Multiline="true" Text="label5" TextAlignment="MiddleLeft" SizeF="614.168457,23" LocationFloat="98.54177,9.416771" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="65" EventName="BeforePrint" PropertyName="Text" Expression="[placa]" /></ExpressionBindings><StylePriority Ref="66" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="67" ControlType="XRLabel" Name="label16" Multiline="true" Text="Veículo" TextAlignment="MiddleLeft" SizeF="88.54167,23" LocationFloat="10.000102,9.416771" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="68" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item3></Controls></Item5><Item6 Ref="69" ControlType="GroupFooterBand" Name="GroupFooter1" HeightF="36.3749237"><Controls><Item1 Ref="70" ControlType="XRLabel" Name="label28" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="561.5436,3.37492633" Padding="2,2,0,0,100" Borders="All"><Summary Ref="71" Running="Group" /><ExpressionBindings><Item1 Ref="72" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="73" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="74" ControlType="XRLabel" Name="label29" Multiline="true" Text="Total Viagem:" TextAlignment="MiddleRight" SizeF="90.91641,23" LocationFloat="470.626984,3.37492633" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="75" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="76" ControlType="XRLine" Name="line1" SizeF="746.9999,2.083334" LocationFloat="0,28.3749256" /></Controls></Item6><Item7 Ref="77" ControlType="ReportFooterBand" Name="ReportFooter" HeightF="34.4167061"><Controls><Item1 Ref="78" ControlType="XRLabel" Name="label27" Multiline="true" Text="Total Valor:" TextAlignment="MiddleRight" SizeF="90.91647,23" LocationFloat="408.458435,0" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="79" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="80" ControlType="XRLabel" Name="label26" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="499.375153,0" Padding="2,2,0,0,100" Borders="All"><Summary Ref="81" Running="Report" /><ExpressionBindings><Item1 Ref="82" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="83" UseBorders="false" UseTextAlignment="false" /></Item2></Controls></Item7></Bands><ParameterPanelLayoutItems><Item1 Ref="84" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="85" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="86" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="87" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="88" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="89" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="90" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="91" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="92" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="94" Value="#Ref-93" Description="Todos" /><Item2 Ref="96" Value="#Ref-95" Description="Aberto" /><Item3 Ref="98" Value="#Ref-97" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="23" Content="System.Boolean" Type="System.Type" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="93" Content="Todos" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="95" Content="Aberto" Type="System.String" /><Item13 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="97" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO
INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Agrupado Por Parceiro', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /><Item10 Ref="24" Description="Exibir Detalhes" ValueInfo="True" Name="idnExibirDetalhes" Type="#Ref-23" /></Parameters><Bands><Item1 Ref="25" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="26" ControlType="DetailBand" Name="Detail" HeightF="16.6666679"><Controls><Item1 Ref="27" ControlType="XRTable" Name="table2" SizeF="748.0002,16.6666679" LocationFloat="0,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="28" ControlType="XRTableRow" Name="tableRow2" Weight="1"><Cells><Item1 Ref="29" ControlType="XRTableCell" Name="tableCell5" Weight="1.0053667924626104" Multiline="true" Text="[id]" /><Item2 Ref="30" ControlType="XRTableCell" Name="tableCell8" Weight="1.0694270661973986" Multiline="true" Text="tableCell8"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[idViagemVeiculo]" /></ExpressionBindings></Item2><Item3 Ref="32" ControlType="XRTableCell" Name="tableCell6" Weight="1.0065532398560897" Multiline="true" Text="tableCell6"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[assento]" /></ExpressionBindings></Item3><Item4 Ref="34" ControlType="XRTableCell" Name="tableCell7" Weight="1.0231410994598757" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell7"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[valorAssento]" /></ExpressionBindings></Item4></Cells></Item1></Rows></Item1></Controls><ExpressionBindings><Item1 Ref="36" EventName="BeforePrint" PropertyName="Visible" Expression="?idnExibirDetalhes" /></ExpressionBindings></Item2><Item3 Ref="37" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="38" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="39" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="40" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="41" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="42" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="43" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="44" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="45" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="46" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="47" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="48" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="49" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="50" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="51" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="52" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="53" UseFont="false" /></Item8><Item9 Ref="54" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="55" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="56" ControlType="GroupHeaderBand" Name="GroupHeader2" GroupUnion="WholePage" HeightF="69.7916641" KeepTogether="true"><GroupFields><Item1 Ref="57" FieldName="idParceiro" /></GroupFields><Controls><Item1 Ref="58" ControlType="XRTable" Name="table1" SizeF="748,19.7916679" LocationFloat="0,47.9166679" Padding="2,2,0,0,96"><Rows><Item1 Ref="59" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="60" ControlType="XRTableCell" Name="tableCell1" Weight="0.99882271288201452" Multiline="true" Text="Código Viagem" /><Item2 Ref="61" ControlType="XRTableCell" Name="tableCell4" Weight="1.0624650293725455" Multiline="true" Text="Código Viagem Veículo" /><Item3 Ref="62" ControlType="XRTableCell" Name="tableCell2" Weight="1" Multiline="true" Text="Assento" /><Item4 Ref="63" ControlType="XRTableCell" Name="tableCell3" Weight="1.0164800576685278" Multiline="true" Text="Valor" /></Cells></Item1></Rows></Item1><Item2 Ref="64" ControlType="XRLabel" Name="label5" Multiline="true" Text="label5" TextAlignment="MiddleLeft" SizeF="582.708,23" LocationFloat="98.54177,9.416771" Padding="2,2,0,0,100" Borders="All"><ExpressionBindings><Item1 Ref="65" EventName="BeforePrint" PropertyName="Text" Expression="[parceiro]" /></ExpressionBindings><StylePriority Ref="66" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="67" ControlType="XRLabel" Name="label16" Multiline="true" Text="PARCEIRO:" TextAlignment="MiddleLeft" SizeF="88.54167,23" LocationFloat="10.000102,9.416771" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="68" UseFont="false" UseBorders="false" UseTextAlignment="false" /></Item3></Controls></Item5><Item6 Ref="69" ControlType="GroupFooterBand" Name="GroupFooter1" HeightF="36.3749237"><Controls><Item1 Ref="70" ControlType="XRLabel" Name="label28" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="561.5436,3.37492633" Padding="2,2,0,0,100" Borders="All"><Summary Ref="71" Running="Group" /><ExpressionBindings><Item1 Ref="72" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="73" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="74" ControlType="XRLabel" Name="label29" Multiline="true" Text="Total Viagem:" TextAlignment="MiddleRight" SizeF="90.91641,23" LocationFloat="470.626984,3.37492633" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="75" UseBorders="false" UseTextAlignment="false" /></Item2><Item3 Ref="76" ControlType="XRLine" Name="line1" SizeF="746.9999,2.083334" LocationFloat="0,28.3749256" /></Controls></Item6><Item7 Ref="77" ControlType="ReportFooterBand" Name="ReportFooter" HeightF="34.4167061"><Controls><Item1 Ref="78" ControlType="XRLabel" Name="label27" Multiline="true" Text="Total Valor:" TextAlignment="MiddleRight" SizeF="90.91647,23" LocationFloat="408.458435,0" Padding="2,2,0,0,100" Borders="All"><StylePriority Ref="79" UseBorders="false" UseTextAlignment="false" /></Item1><Item2 Ref="80" ControlType="XRLabel" Name="label26" Multiline="true" Text="label26" TextAlignment="MiddleLeft" SizeF="151.166565,23" LocationFloat="499.375153,0" Padding="2,2,0,0,100" Borders="All"><Summary Ref="81" Running="Report" /><ExpressionBindings><Item1 Ref="82" EventName="BeforePrint" PropertyName="Text" Expression="sumSum([valorAssento])" /></ExpressionBindings><StylePriority Ref="83" UseBorders="false" UseTextAlignment="false" /></Item2></Controls></Item7></Bands><ParameterPanelLayoutItems><Item1 Ref="84" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="85" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="86" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="87" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="88" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="89" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="90" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="91" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="92" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="94" Value="#Ref-93" Description="Todos" /><Item2 Ref="96" Value="#Ref-95" Description="Aberto" /><Item3 Ref="98" Value="#Ref-97" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="23" Content="System.Boolean" Type="System.Type" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="93" Content="Todos" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="95" Content="Aberto" Type="System.String" /><Item13 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="97" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO
INSERT [dbo].[Reports] ([descricao], [idReportsGrupo], [xml]) VALUES (N'Relatório Analitico de Custos por Viagem', (select id from ReportsGrupos where descricao = 'Viagem'), N'<XtraReportsLayoutSerializer SerializerVersion="22.2.6.0" Ref="1" ControlType="DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v22.2, Version=22.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Name="XtraReport" ScriptsSource="using System.IO;&#xD;&#xA;using DevExpress.DataAccess.Sql;&#xD;&#xA;using System.Drawing;&#xD;&#xA;&#xD;&#xA;private void pictureBox1_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) &#xD;&#xA;{&#xD;&#xA;    string image = &quot;&quot;;&#xD;&#xA;    var source = DataSource as SqlDataSource;  &#xD;&#xA;    source.Fill(&quot;Emitentes&quot;);  &#xD;&#xA;    DevExpress.DataAccess.Sql.DataApi.ITable table = source.Result[&quot;Emitentes&quot;];&#xD;&#xA;    var parametroValor = (int)this.Parameters[&quot;idEmitente&quot;].Value;&#xD;&#xA;    foreach(DevExpress.DataAccess.Sql.DataApi.IRow row in table) &#xD;&#xA;    {&#xD;&#xA;        int catID = (int)row[&quot;id&quot;];&#xD;&#xA;        if(parametroValor == catID)&#xD;&#xA;        {&#xD;&#xA;            byte[] imageLogo = (byte[])row[&quot;logotipo&quot;];&#xD;&#xA;            using(MemoryStream ms = new MemoryStream(imageLogo))&#xD;&#xA;            {&#xD;&#xA;                pictureBox1.Image = Image.FromStream(ms);&#xD;&#xA;            }&#xD;&#xA;        }&#xD;&#xA;    }   &#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;" Margins="57, 45, 41.6666679, 59.3332939" PageWidth="850" PageHeight="1100" Version="22.2" DataMember="Query" DataSource="#Ref-0"><Parameters><Item1 Ref="4" Description="Motorista" ValueSourceSettings="#Ref-2" ValueInfo="0" Name="idMotorista" Type="#Ref-3" /><Item2 Ref="6" Description="Cidade Origem" ValueSourceSettings="#Ref-5" ValueInfo="0" Name="idCidadeOrigem" Type="#Ref-3" /><Item3 Ref="8" Description="Cidade Destino" ValueSourceSettings="#Ref-7" ValueInfo="0" Name="idCidadeDestino" Type="#Ref-3" /><Item4 Ref="10" Description="Vendedor" ValueSourceSettings="#Ref-9" ValueInfo="0" Name="idVendedor" Type="#Ref-3" /><Item5 Ref="13" Description="Status" ValueSourceSettings="#Ref-11" ValueInfo="Todos" Name="status" /><Item6 Ref="15" Description="Emitente" ValueSourceSettings="#Ref-14" ValueInfo="0" Name="idEmitente" Type="#Ref-3" /><Item7 Ref="17" Description="Data Inicial" ValueInfo="2025-04-24" Name="dataIni" Type="#Ref-16"><ExpressionBindings><Item1 Ref="18" PropertyName="Value" Expression="AddDays(Today(),-30)" /></ExpressionBindings></Item7><Item8 Ref="19" Description="Data Final" ValueInfo="2025-04-24" Name="dataFin" Type="#Ref-16"><ExpressionBindings><Item1 Ref="20" PropertyName="Value" Expression="Today()" /></ExpressionBindings></Item8><Item9 Ref="22" Description="Parceiro" ValueSourceSettings="#Ref-21" ValueInfo="0" Name="idParceiro" Type="#Ref-3" /></Parameters><CalculatedFields><Item1 Ref="23" Name="PercentualLucro" Expression="([valorReceitaViagem]-[valorDespesasViagem])/[valorDespesasViagem]" DataMember="Query" /></CalculatedFields><Bands><Item1 Ref="24" ControlType="TopMarginBand" Name="TopMargin" HeightF="41.6666679" /><Item2 Ref="25" ControlType="DetailBand" Name="Detail" HeightF="22.916666"><Controls><Item1 Ref="26" ControlType="XRTable" Name="table1" SizeF="748,22.916666" LocationFloat="0,0" Padding="2,2,0,0,96"><Rows><Item1 Ref="27" ControlType="XRTableRow" Name="tableRow1" Weight="1"><Cells><Item1 Ref="28" ControlType="XRTableCell" Name="tableCell1" Weight="0.7075535167347301" Multiline="true" Text="tableCell1"><ExpressionBindings><Item1 Ref="29" EventName="BeforePrint" PropertyName="Text" Expression="[idViagemTransporte]" /></ExpressionBindings></Item1><Item2 Ref="30" ControlType="XRTableCell" Name="tableCell2" Weight="0.98328936163754388" Multiline="true" Text="tableCell2"><ExpressionBindings><Item1 Ref="31" EventName="BeforePrint" PropertyName="Text" Expression="[situacao]" /></ExpressionBindings></Item2><Item3 Ref="32" ControlType="XRTableCell" Name="tableCell4" Weight="0.84124339710582385" Multiline="true" Text="tableCell4"><ExpressionBindings><Item1 Ref="33" EventName="BeforePrint" PropertyName="Text" Expression="[idEmitente]" /></ExpressionBindings></Item3><Item4 Ref="34" ControlType="XRTableCell" Name="tableCell5" Weight="1.2924461160751588" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell5"><ExpressionBindings><Item1 Ref="35" EventName="BeforePrint" PropertyName="Text" Expression="[valorReceitaViagem]" /></ExpressionBindings></Item4><Item5 Ref="36" ControlType="XRTableCell" Name="tableCell3" Weight="1.3425777863691197" TextFormatString="{0:R$0.00}" Multiline="true" Text="tableCell3"><ExpressionBindings><Item1 Ref="37" EventName="BeforePrint" PropertyName="Text" Expression="[valorDespesasViagem]" /></ExpressionBindings></Item5><Item6 Ref="38" ControlType="XRTableCell" Name="tableCell6" Weight="0.83288982207762363" TextFormatString="{0:0.00%}" Multiline="true" Text="tableCell6"><ExpressionBindings><Item1 Ref="39" EventName="BeforePrint" PropertyName="Text" Expression="[PercentualLucro]" /></ExpressionBindings></Item6></Cells></Item1></Rows></Item1></Controls></Item2><Item3 Ref="40" ControlType="BottomMarginBand" Name="BottomMargin" HeightF="59.3332939" /><Item4 Ref="41" ControlType="ReportHeaderBand" Name="ReportHeader" HeightF="114.583336"><Controls><Item1 Ref="42" ControlType="XRLine" Name="line2" SizeF="747,2" LocationFloat="0,111.000023" /><Item2 Ref="43" ControlType="XRLabel" Name="label22" Multiline="true" Text="label22" SizeF="137.499985,23" LocationFloat="226.041672,87.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="44" EventName="BeforePrint" PropertyName="Text" Expression="[telefoneEmitente]" /></ExpressionBindings></Item2><Item3 Ref="45" ControlType="XRLabel" Name="label14" Multiline="true" Text="label14" SizeF="100,23" LocationFloat="121.875,88.00002" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="46" EventName="BeforePrint" PropertyName="Text" Expression="[bairroEmitente]" /></ExpressionBindings></Item3><Item4 Ref="47" ControlType="XRLabel" Name="label13" Multiline="true" Text="label13" SizeF="377.4999,23.0000076" LocationFloat="121.875,62" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="48" EventName="BeforePrint" PropertyName="Text" Expression="[logradouroEmitente] + '', '' + [numeroEmitente]" /></ExpressionBindings></Item4><Item5 Ref="49" ControlType="XRLabel" Name="label3" Multiline="true" Text="label3" SizeF="209.791656,23" LocationFloat="376.041656,35.9999962" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="50" EventName="BeforePrint" PropertyName="Text" Expression="[inscricaoEstadualEmitente]" /></ExpressionBindings></Item5><Item6 Ref="51" ControlType="XRLabel" Name="label2" Multiline="true" Text="label2" SizeF="241.666656,23.0000038" LocationFloat="121.875,36.0000076" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="52" EventName="BeforePrint" PropertyName="Text" Expression="[cnpjEmitente]" /></ExpressionBindings></Item6><Item7 Ref="53" ControlType="XRPageInfo" Name="pageInfo1" SizeF="54.166687,23" LocationFloat="683.8333,10.0000067" Padding="2,2,0,0,100" /><Item8 Ref="54" ControlType="XRLabel" Name="label1" Multiline="true" Text="label1" SizeF="463.9583,23" LocationFloat="121.875,10.0000067" Font="Times New Roman, 9.75pt, style=Bold" Padding="2,2,0,0,100"><ExpressionBindings><Item1 Ref="55" EventName="BeforePrint" PropertyName="Text" Expression="[Query].[razaoSocialEmitente]" /></ExpressionBindings><StylePriority Ref="56" UseFont="false" /></Item8><Item9 Ref="57" ControlType="XRPictureBox" Name="pictureBox1" Sizing="ZoomImage" SizeF="100,100" LocationFloat="10.000102,10.0000067"><Scripts Ref="58" OnBeforePrint="pictureBox1_BeforePrint" /></Item9></Controls></Item4><Item5 Ref="59" ControlType="PageHeaderBand" Name="PageHeader" HeightF="39.5833359"><Controls><Item1 Ref="60" ControlType="XRTable" Name="table2" SizeF="748,22.916666" LocationFloat="0,16.6666679" Padding="2,2,0,0,96"><Rows><Item1 Ref="61" ControlType="XRTableRow" Name="tableRow2" Weight="1"><Cells><Item1 Ref="62" ControlType="XRTableCell" Name="tableCell7" Weight="0.7075535167347301" Multiline="true" Text="Cód. Viagem" /><Item2 Ref="63" ControlType="XRTableCell" Name="tableCell8" Weight="0.98328899444743256" Multiline="true" Text="Status" /><Item3 Ref="64" ControlType="XRTableCell" Name="tableCell9" Weight="0.84124376429593506" Multiline="true" Text="Cód. Emitente" /><Item4 Ref="65" ControlType="XRTableCell" Name="tableCell10" Weight="1.2924466056619739" Multiline="true" Text="Valor Receita" /><Item5 Ref="66" ControlType="XRTableCell" Name="tableCell11" Weight="1.3425777863691197" Multiline="true" Text="Valor Despesa" /><Item6 Ref="67" ControlType="XRTableCell" Name="tableCell12" Weight="0.83288933249080888" Multiline="true" Text="Percentual" /></Cells></Item1></Rows></Item1></Controls></Item5></Bands><ParameterPanelLayoutItems><Item1 Ref="68" LayoutItemType="Parameter" Parameter="#Ref-4" /><Item2 Ref="69" LayoutItemType="Parameter" Parameter="#Ref-6" /><Item3 Ref="70" LayoutItemType="Parameter" Parameter="#Ref-8" /><Item4 Ref="71" LayoutItemType="Parameter" Parameter="#Ref-10" /><Item5 Ref="72" LayoutItemType="Parameter" Parameter="#Ref-13" /><Item6 Ref="73" LayoutItemType="Parameter" Parameter="#Ref-15" /><Item7 Ref="74" LayoutItemType="Parameter" Parameter="#Ref-17" /><Item8 Ref="75" LayoutItemType="Parameter" Parameter="#Ref-19" /><Item9 Ref="76" LayoutItemType="Parameter" Parameter="#Ref-22" /></ParameterPanelLayoutItems><ComponentStorage><Item1 Ref="0" ObjectType="DevExpress.DataAccess.Sql.SqlDataSource,DevExpress.DataAccess.v22.2" Name="sqlDataSource1" Base64=" " /></ComponentStorage><ObjectStorage><Item1 Ref="2" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Motoristas" ValueMember="id" DisplayMember="razaosocial" SortMember="id" SortOrder="Ascending" /><Item2 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="3" Content="System.Int32" Type="System.Type" /><Item3 Ref="5" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item4 Ref="7" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Cidades" ValueMember="id" DisplayMember="descricao" SortMember="descricao" SortOrder="Ascending" /><Item5 Ref="9" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Vendedores" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item6 Ref="11" ObjectType="DevExpress.XtraReports.Parameters.StaticListLookUpSettings, DevExpress.Printing.v22.2.Core"><LookUpValues><Item1 Ref="78" Value="#Ref-77" Description="Todos" /><Item2 Ref="80" Value="#Ref-79" Description="Aberto" /><Item3 Ref="82" Value="#Ref-81" Description="Encerrado" /></LookUpValues></Item6><Item7 Ref="14" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Emitentes" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item8 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="16" Content="System.DateTime" Type="System.Type" /><Item9 Ref="21" ObjectType="DevExpress.XtraReports.Parameters.DynamicListLookUpSettings, DevExpress.Printing.v22.2.Core" DataSource="#Ref-0" DataMember="Parceiros" ValueMember="id" DisplayMember="razaosocial" SortMember="razaosocial" SortOrder="Ascending" /><Item10 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="77" Content="Todos" Type="System.String" /><Item11 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="79" Content="Aberto" Type="System.String" /><Item12 ObjectType="DevExpress.XtraReports.Serialization.ObjectStorageInfo, DevExpress.XtraReports.v22.2" Ref="81" Content="Encerrado" Type="System.String" /></ObjectStorage></XtraReportsLayoutSerializer>')
GO

INSERT [dbo].[selecao] ([tabela], [descricao], [camposListar], [campoChave], [campoRetorno], [joins], [filtro], [ordem], [campoChaveClasse], [prefixoTabela], [prefixoTabelaJoin], [campoChaveClasseFiltro], [campoChaveClasseFiltroRetorno], [campoRetornoFiltro], [nomeTela], [campoChaveAlternativo]) VALUES (N'ViagemTransporte', N'Controle Viagem', N'vt.id as id = Código|50, upper(em.razaosocial) as emitente = Emitente|200, upper(cio.descricao) as cidadeOrigem = Cidade Origem|200, upper(cid.descricao) as cidadeDestino = Cidade Destino|200, vt.dataviagem as dataViagem = Data Viagem|120', N'id', N'dataViagem', N'inner join cidade cio on cio.id = vt.idCidadeInicio inner join cidade cid on cid.id = vt.idCidadeDestino inner join Emitente em on em.id = vt.idemitente', N'', NULL, NULL, N'vt', N'cio', NULL, NULL, NULL, NULL, NULL)
GO

insert into NaturezaNFSeOperacao values (1, '1 - Tributação no Município', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (2, '2 - Tributação fora do Município', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (3, '3 - Isenção', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (4, '4 - Imune', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (5, '5 - Exigibilidade Suspensa por Decisão Judicial', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (6, '6 - Exigibilidade Suspensa por Procedimento Administrativo', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (7, '7 - Não Incidência', 'DEFAULT', null)
GO
insert into NaturezaNFSeOperacao values (1, '01 ISS devido para Município', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (2, '02 ISS devido para outro município', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (3, '03 ISS Fixo (Soc. Profissionais)', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (4, '04 ISS retido pelo tomador/intermediário', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (5, '05 Operação imune, isenta ou não tributada', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (11, '11 ISS devido para município (simples nacional)', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (12, '12 ISS devido para outro município (SimplesNacional)', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (14, '14 ISS retido pelo tomador (SimplesNacional)', 'PUBLICA', 3483)
GO
insert into NaturezaNFSeOperacao values (101, '101 ISS devido para Município', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (111, '111 ISS devido para outro município', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (121, '121 ISS Fixo (Soc. Profissionais)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (201, '201 ISS retido pelo tomador/intermediário', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (301, '301 Operação imune, isenta ou não tributada', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (501, '501 ISS devido para município (simples nacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (511, '511 ISS devido para outro município (SimplesNacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (541, '541 ISS retido pelo tomador (SimplesNacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (551, '551 ISS retido pelo tomador (SimplesNacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (601, '601 ISS retido pelo tomador (SimplesNacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (701, '701 ISS retido pelo tomador (SimplesNacional)', 'PUBLICA', 4539)
GO
insert into NaturezaNFSeOperacao values (53, '53 - Imposto recolhido pelo regime único de arrecadação (SIMPLES NACIONAL)', 'THEMA', 4221)
GO
INSERT INTO VERSAO(VERSAO, VERSAOATUALIZACAO, DATAATUALIZACAO, REVISAO) VALUES(547, 805, GETDATE(),1);