kkraljevic
Neues Mitglied
Hello everyone,
I'm new in the world of sage developers and I've got some errors while trying to open a Report from a WPF in Warenwirtschaft.
The error that it returned is this and it happens when try to execute vm.OpenReport();
This is my code to open a report
private void Btn_ArtikelMargenListe(object sender, RoutedEventArgs e)
{
try
{
var ArtikelMargenListeKey = _reportList.Where(r => r.Name == "rptArtikelOhneBestand").Select(r => r.KeyValue).First();
LoadNamedParameters();
var vm = CreateViewModel();
if (vm == null) return;
var externalViewer = new FrmExternalViewerWpf();
vm.ReportViewerControl = externalViewer.CtlViewer;
vm.ReportViewerControl.ViewModel = vm;
vm.OpenReport(
ReportingApplicationEnum.OfficeLine, _endpoint,
Properties.Settings.Default.UserName, Global.SecurePassword,
Properties.Settings.Default.ApplicationId, false,
ArtikelMargenListeKey, vm.ReportNamedParameters,
Properties.Settings.Default.Language,
false, null, string.Empty
);
_externalViewerWpf = externalViewer;
externalViewer.ShowDialog();
_externalViewerWpf = null;
}
catch (Exception ex)
{
throw;
}
}
I'm new in the world of sage developers and I've got some errors while trying to open a Report from a WPF in Warenwirtschaft.
The error that it returned is this and it happens when try to execute vm.OpenReport();
This is my code to open a report
private void Btn_ArtikelMargenListe(object sender, RoutedEventArgs e)
{
try
{
var ArtikelMargenListeKey = _reportList.Where(r => r.Name == "rptArtikelOhneBestand").Select(r => r.KeyValue).First();
LoadNamedParameters();
var vm = CreateViewModel();
if (vm == null) return;
var externalViewer = new FrmExternalViewerWpf();
vm.ReportViewerControl = externalViewer.CtlViewer;
vm.ReportViewerControl.ViewModel = vm;
vm.OpenReport(
ReportingApplicationEnum.OfficeLine, _endpoint,
Properties.Settings.Default.UserName, Global.SecurePassword,
Properties.Settings.Default.ApplicationId, false,
ArtikelMargenListeKey, vm.ReportNamedParameters,
Properties.Settings.Default.Language,
false, null, string.Empty
);
_externalViewerWpf = externalViewer;
externalViewer.ShowDialog();
_externalViewerWpf = null;
}
catch (Exception ex)
{
throw;
}
}