for View the report in my Vb allplication (2017) I use this code
Dim str As String
str = "C:/Corsi/Reports/rpt1.rdl"
s.SourceRdl = str
s.Rebuild()
s.Dock = DockStyle.Fill
Me.Controls.Add(s)
and I receive the following error:
"Message
Error: XML fail: RIlevati dati non validi a livello Root Riga 1 Posizione 1"
in fylReporting.RDL.RDLparser.ctor(STRING XML)
in fylReporting.RDLViewer.RDLViewe.getReport()
the xml Report is the follows
<?xml version="1.0" encoding="UTF-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Description>
</Description>
<Author>
</Author>
<PageHeight>11in</PageHeight>
<PageWidth>8.5in</PageWidth>
<DataSources>
<DataSource Name="DS1">
<ConnectionProperties>
<DataProvider>SQL</DataProvider>
<ConnectString>Data Source=ALBERTOP6\SQLEXPRESS2017;Initial Catalog=Corsi1;Integrated Security=True;MultipleActiveResultSets=True</ConnectString>
</ConnectionProperties>
</DataSource>
</DataSources>
<Width>7.5in</Width>
<TopMargin>.25in</TopMargin>
<LeftMargin>.25in</LeftMargin>
<RightMargin>.25in</RightMargin>
<BottomMargin>.25in</BottomMargin>
<DataSets>
<DataSet Name="Data">
<Query>
<DataSourceName>DS1</DataSourceName>
<CommandText>SELECT Id, Nazione FROM tbl_Nazioni</CommandText>
</Query>
<Fields>
<Field Name="Id">
<DataField>Id</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="Nazione">
<DataField>Nazione</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
<PageHeader>
<Height>.5in</Height>
<ReportItems>
<Textbox Name="Textbox1">
<Top>.02in</Top>
<Left>.1in</Left>
<Width>6in</Width>
<Height>.25in</Height>
<Value>rpt1</Value>
<Style>
<FontSize>15pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</Textbox>
<Textbox Name="Textbox2">
<Top>.3in</Top>
<Left>0.0in</Left>
<Width>1in</Width>
<Height>.2in</Height>
<Value>Id</Value>
<Style>
<FontWeight>Bold</FontWeight>
<BorderStyle>
<Bottom>Solid</Bottom>
</BorderStyle>
<BorderWidth>
<Bottom>3pt</Bottom>
</BorderWidth>
</Style>
</Textbox>
<Textbox Name="Textbox3">
<Top>.3in</Top>
<Left>1.0in</Left>
<Width>1in</Width>
<Height>.2in</Height>
<Value>Nazione</Value>
<Style>
<FontWeight>Bold</FontWeight>
<BorderStyle>
<Bottom>Solid</Bottom>
</BorderStyle>
<BorderWidth>
<Bottom>3pt</Bottom>
</BorderWidth>
</Style>
</Textbox>
</ReportItems>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
</PageHeader>
<Body>
<Height>25pt</Height>
<ReportItems>
<List Name="List1">
<DataSetName>Data</DataSetName>
<Height>24pt</Height>
<NoRows>Query returned no rows!</NoRows>
<ReportItems>
<Textbox Name="Id">
<Top>.1in</Top>
<Left>0.0in</Left>
<Width>1in</Width>
<Height>.25in</Height>
<Value>=Fields!Id.Value</Value>
<CanGrow>false</CanGrow>
<Style>
<PaddingRight>2pt</PaddingRight>
<TextAlign>Right</TextAlign>
</Style>
</Textbox>
<Textbox Name="Nazione">
<Top>.1in</Top>
<Left>1.0in</Left>
<Width>1in</Width>
<Height>.25in</Height>
<Value>=Fields!Nazione.Value</Value>
<CanGrow>true</CanGrow>
<Style>
<PaddingLeft>2pt</PaddingLeft>
</Style>
</Textbox>
</ReportItems>
<Width>2.0in</Width>
</List>
</ReportItems>
</Body>
<PageFooter>
<Height>14pt</Height>
<ReportItems>
<Textbox Name="Textbox4">
<Top>1pt</Top>
<Left>10pt</Left>
<Height>12pt</Height>
<Width>3in</Width>
<Value>=Globals!PageNumber + ' of ' + Globals!TotalPages</Value>
<Style>
<FontSize>10pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</Textbox>
</ReportItems>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
</PageFooter>
</Report>
Any Idea?
TIA
Alberto Vitiello