|
Hi,
I have the following problem: I want to do these steps:
1. load a report 2. export it as html 3. analyse the html 4. edit the report data 5. export it as pdf
because i have to edit the report data, I want to store it in a dataset in order to manipulate it and push it in the report again.
this is my code:
SqlConnection conn = new SqlConnection("Data Source=server;Database=dbname;Integrated Security=SSPI"); SqlCommand command = new SqlCommand("storedProcName", conn); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@param1", SqlDbType.NVarChar).Value = "test"; conn.Open(); SqlDataAdapter adapter = new SqlDataAdapter(command); DataSet ds = new DataSet(); adapter.Fill(ds); ReportDocument rptClass = new ReportDocument(); rptClass.Load("filename"); rptClass.SetDataSource(ds); ... rptClass.Export() <---------- askes for DB login and parameters
But if I use this code, I get asked for the DB login and parameters and the report
loads from db again but not from the dataset. But I don't want CR to load the report data from DB again. I want it to use the dataset and not asking for any login stuff.
what am I doing wrong?
Thanks Juergen
|