我以前使用的是AR16版本,现在升级到了AR18版本,但是报表不兼容。
在修改引用的AR18的包后,相关的引用如下
<PackageReference Include="Gcef.Data.DataEngine" Version="4.0.2" />
<PackageReference Include="Gcef.Data.ExpressionInfo" Version="4.0.2" />
<PackageReference Include="Gcef.Data.VBFunctionLib" Version="4.0.2" />
<PackageReference Include="GrapeCity.ActiveReports" Version="18.2.1" />
<PackageReference Include="GrapeCity.ActiveReports.Aspnetcore.Designer" Version="18.2.1" />
<PackageReference Include="GrapeCity.ActiveReports.Aspnetcore.Viewer" Version="18.2.1" />
<PackageReference Include="GrapeCity.ActiveReports.Chart" Version="18.0.4" />
<PackageReference Include="GrapeCity.ActiveReports.Core.DataProviders" Version="3.1.2" />
<PackageReference Include="GrapeCity.ActiveReports.Core.Document" Version="4.6.2" />
<PackageReference Include="GrapeCity.ActiveReports.Core.Document.Drawing.Gc" Version="4.6.2" />
<PackageReference Include="GrapeCity.Documents.Imaging" Version="7.2.3" />
发布后进行报表设计时,报如下错误
.rdlx文件如下
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition">
<dd:Name xmlns:dd="http://schemas.datadynamics.com/reporting/2005/02/reportdefinition">defaultTemplate.rdlx</dd:Name>
<Body>
<ColumnSpacing>0in</ColumnSpacing>
<Height>0in</Height>
</Body>
<BottomMargin>1in</BottomMargin>
<LeftMargin>1in</LeftMargin>
<PageHeight>11in</PageHeight>
<PageWidth>8.5in</PageWidth>
<RightMargin>1in</RightMargin>
<TopMargin>1in</TopMargin>
<Width>2pt</Width>
<ReportParameters>
<ReportParameter Name="zz1DateStart">
<DataType>DateTime</DataType>
<Prompt>zz1DateStart</Prompt>
<UsedInQuery>True</UsedInQuery>
<DefaultValue>
<Values>
<Value>=DateAdd("d", -7, Now())</Value>
</Values>
</DefaultValue>
</ReportParameter>
<ReportParameter Name="zz1DateEnd">
<DataType>DateTime</DataType>
<Prompt>zz1DateEnd</Prompt>
<UsedInQuery>True</UsedInQuery>
<DefaultValue>
<Values>
<Value>=Now()</Value>
</Values>
</DefaultValue>
</ReportParameter>
</ReportParameters>
<DataSources>
<DataSource Name="zz1DataSource">
<ConnectionProperties>
<ConnectString>="jsondoc= http://localhost:8061/api/**/**?reportId=c1a3c314-1766-4f08-ab21-dcdb984c6ef9&dataSourceName=zz1&dateStart=" & Parameters!zz1DateStart.Value & "&dateEnd=" & Parameters!zz1DateEnd.Value & ";method=GET;headers={""Content-Type"": ""application/json"",""Authorization"":""Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1YTRiNjc5ZC1kN2U1LTQzM2QtOGNhMS0zODAyNDc1OWFlYTMiLCJ1bmlxdWVfbmFtZSI6ImRyaXZlckBzY2FkYS5jb20iLCJnaXZlbl9uYW1lIjoiZHJpdmVyQHNjYWRhLmNvbSIsImp0aSI6IjEzOWZjZmU0LTllZmUtNGFhZi1hOGRhLTE5YTI5MmNlMjNlMiIsImlhdCI6IjEyLzEyLzIwMjQgMDY6NTQ6MzUiLCJiaW5kaW5nX3R5cGUiOiJOb25lIiwibmJmIjoxNzMzOTg2NDc1LCJleHAiOjIwNDkzNDY0NzUsImlzcyI6IlNjYWRhUG9ydGFsIiwiYXVkIjoiU2NhZGFQb3J0YWxXZWJBUEkifQ.A6DnfS9F3t_jBYfGZgWgrOOnBDrbeHLCvWDeoXoGacw""};"</ConnectString>
<DataProvider>JSON</DataProvider>
</ConnectionProperties>
</DataSource>
</DataSources>
<DataSets>
<DataSet Name="zz1">
<Fields>
<Field Name="Path">
<DataField>Path</DataField>
</Field>
<Field Name="Time">
<DataField>Time</DataField>
</Field>
<Field Name="Value">
<DataField>Value</DataField>
</Field>
</Fields>
<Query>
<CommandText>$.</CommandText>
<DataSourceName>zz1DataSource</DataSourceName>
</Query>
</DataSet>
</DataSets>
<CustomProperties>
<CustomProperty>
<Name>DisplayType</Name>
<Value>Page</Value>
</CustomProperty>
<CustomProperty>
<Name>SizeType</Name>
<Value>Default</Value>
</CustomProperty>
<CustomProperty>
<Name>PaperOrientation</Name>
<Value>Portrait</Value>
</CustomProperty>
</CustomProperties>
<Code>
Function GetValue(ByVal value As String, Byval value2 As Integer) As String
Dim a As String = value
Dim index As String = value2
Dim name As String = ""
If(a.Length > 0) Then
name = a.Split(".")(index)
Return name
Else
Return ""
End If
End Function
</Code>
</Report>
|