0
크리스털 보고서를 처음 사용하고 WPF에서 실전을 시도했지만 보고서에 데이터가 표시되지 않습니다.크리스탈 보고서에 목록의 데이터가 표시되지 않습니다.
내 코드는 여기에 있습니다 : 뒤에
<Window x:Class="CrystalReportDemo.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="800" Width="900" xmlns:my="clr-namespace:SAPBusinessObjects.WPF.Viewer;assembly=SAPBusinessObjects.WPF.Viewer" Loaded="Window_Loaded">
<Grid>
<my:CrystalReportsViewer HorizontalAlignment="Left" Margin="127,73,0,0"
Name="crystalReportsViewer1" VerticalAlignment="Top" />
</Grid>
</Window>
코드 :
private void Window_Loaded(object sender, RoutedEventArgs e)
{
FirstCrystalReport report = new FirstCrystalReport();
report.Load("DemoCrystalReport.rpt");
report.SetDataSource((from item in dataContext.tokens
select new
{
item.nvcraddress,
item.bgIntcontact_no,
item.dtDateOfToken,
item.vcrpan_no,
item.vcrplate_no,
item.token_id,
item.nvcrNameOfCustomer,
item.nvcrMiddleName,
item.nvcrLastName
}).ToList());
crystalReportsViewer1.ViewerCore.ReportSource = report;
}
그것은 오류 또는 아무것도 표시되지 않습니다. 미리 감사드립니다. 당신은 FirstCrystalReport를 사용하는
작동 중이면 –
고맙습니다. 올바르게 표시해주세요. :). –