Torna al Thread

Try reportdoc = New ReportDocument() Console.WriteLine("Elenco tabelle in " & "(" & rptname & ")") reportdoc.Load(rptname, OpenReportMethod.OpenReportByDefault) For i = 0 To reportdoc.ReportClientDocument.DatabaseController.Database.Tables.Count - 1 tbname = reportdoc.ReportClientDocument.DatabaseController.Database.Tables.Item(i).QualifiedName Console.WriteLine("Table(" & CStr(i) & "): " & tbname) kv = GetKeyValue(tbname, ".") If kv(0) = "SCHEMA_DA_SOSTITUIRE" Then kv(0) = "NUOVO_SCHEMA" tbname = kv(0) & "." & kv(1) reportdoc.ReportClientDocument.DatabaseController.Database.Tables.Item(i).QualifiedName = tbname rptname &= ".new.rpt" reportdoc.SaveAs(rptname, False) End If Next If rptname.EndsWith(".new.rpt") Then 'ExeLauncher(My.Application.Info.DirectoryPath & "\" & My.Application.Info.AssemblyName & ".exe", "-rpt:" & rptname, True) End If Catch ex As Exception Console.WriteLine(ex.Message & vbCrLf & ex.StackTrace) Finally If Not reportdoc Is Nothing Then reportdoc.Close() End If Console.ReadKey() End Try
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5