Click here to Skip to main content
16,018,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

I'm using following code to bind crystal report to crystal report viewer in WPF

C#
DSReport ds1 = new DSReport();
DataTable dataTable = ds1.DataTable1;

DataRow row = ds1.DataTable1.NewDataTable1Row();
row["Name"] = txtName.Text;
row["Address"] = txtAddress.Text;
row["CardNo"] = CardNo;
row["Phone"] = txtPhone.Text;
row["Signature"] = CoustomarSighn;

row["LibName"] = LibName;
row["LibAddress"] = LibAddress;
row["LibSignature"] = UserSighn;

ds1.DataTable1.Rows.Add(row);
//  rpt.SetDataSource(ds1);
         
Card rpt = new Card();   
rpt.Database.Tables["DataTable1"].SetDataSource((DataTable)dataTable);
rpt.SetDataSource(ds1);

RptViewCard.ViewerCore.ReportSource = rpt;

I'm getting the result only one time
if click to view another report geting an exception

"sapbusinessobjects.wpf.viewer.pdb not loaded"

rerun the code then it wors only time
please help me to solve the problem

Code block and tabluation
Posted
Updated 15-Mar-14 11:47am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900