I recently had to switch gears on my crystal reports and have the table names used be dynamic. I wrote a stored procedure to pass the table name as a parameter and that is now my datasource for the crystal reports. Works fine except you can't interact with the reports when viewing in the browser. I get the error "no valid report source" when I but logic in to handle postback. If I take it out works fine but it goes through the code to set the datasource each time the page loads which seems wrong to me but I'm not an expert. So I googled it and found a solution to add the crystal report to the session. Still not working; course I could have the code wrong to save it to the session. I was wondering what the most optimal and efficent way is to handing vary table names. The server and database are always the same but the table names are different per user. Also if I am actually doing it correctly by using a parameter for the table name how do i solve the error?
CrystalDecisions.CrystalReports.Engine.ReportDocument cr = new
CrystalReportViewer1.ReportSource = cr;
ReportDocument cr = (ReportDocument)(Session["cr"]);