as I said in title I have issue when I try to export crystal report to PDF, or anything like that, also when I try to print it I am having same issue, before anything I will post you screenshot to explain it more detailed:
I loaded report with my data from database and everything looks fine, reports is opened I can see my data, but when I try to export it to pdf or to print it I am seeing that Error, I've been trying for few hours to solve it, but unfortunately I couldn't make it working..
I have to mention, that I did next thing before this:
I set EnableDatabaseLogonPromt to False because before I did that, everytime I tried to do print or export I received this popup (so should I leave it setted to false to avoid this popup?)
HERE IS MY CODE:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
var x = Server.MapPath("~");
int playerId = Convert.ToInt32(Request.QueryString["playerID"]);
PlayersDataSet players= new PlayersDataSet ();
PlayersDataSet.PlayersTableDataTable playersDT = new PlayersDataSet.PlayersTableDataTable ();
var player= Players.Data.Services.DAPlayers.GetByPlayerId(playerId);
string clubname= Players.Data.Services.DAPlayers.GetClubNameByClubID(Convert.ToInt32(player.ClubID));
playersDT.AddPlayersTableRow(player.FirstName, player.LastName, player.IDNUMBER, clubname, player.Photo, player.IDSerialNumber.ToString());
players.Tables["PlayersTable"].Merge(playersDT);
rpt_Players RPT = new rpt_Players ();
RPT.SetDataSource(players);
CrystalReportViewer1.ReportSource = RPT;
}
Any kind of help would be great! Thank you guys, Cheers
回答我自己的问题很愚蠢,但是经过数小时的搜索和尝试许多不同的事情,我发现这是一个解决方案:删除此条件:if(!ispostback){},导出等都可以了。 ::)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.