The report element was not found.

The report element was not found.

Forum member · Jan 7, 2010
Hi, I've updated the reportwriter from v4.x to v5.1. When I open my dplx files I get the message: "This DPLX file was created using a previous version of DynamicPDF Designer. Would you like to upgrade it to version 5.1? Upgrading by clicking 'Yes' is recommended. If 'No' is selected, an attempt to open the file in the appropriate version of Designer will be made." I've selected "Yes" and then I saved the document. After this I try to create a PDF and I get the error message: "The report element was not found." Any idea what might be causing this problem? Regards, Fabian

Re: The report element was not found.

Support · Jan 7, 2010
Hello Fabian, Can you please make sure that you are using the latest build dll in the application which actually came along with the dplx file version? It looks like you are using the latest dplx file with some old version dll files. Please try using the latest dll and the dplx file. If you are still having any problem then please send over the dplx file to our [^a|mailto:support@cete.com|Support Team^] so that they can look into it further. Thanks, ceTe Software Support Team.

Re: The report element was not found.

Forum member · Jan 8, 2010
Hi Team, Thank you!! That was the problem. But now I see that "ceTe.DynamicPDF.ReportWriter.Data.Query" doesn't contain a defenition for ConnectionString. My code looks like this: ParameterDictionary Parameters = new ParameterDictionary(); string Query = @"select .....FROM ...; Parameters.Add("OrderID", Query); DocumentLayout report = new DocumentLayout(AppDomain.CurrentDomain.BaseDirectory + "/Templates/Invoice.dplx"); ceTe.DynamicPDF.ReportWriter.Data.Query rpQuery = (ceTe.DynamicPDF.ReportWriter.Data.Query)report.GetQueryById("Query"); rpQuery.ConnectionString = ConfigurationManager.AppSettings["ConnectionString"]; Is there another way to do this now?

Re: The report element was not found.

Support · Jan 8, 2010
Hello, Yes, there has been few changes in our API. You can use the below code for setting the connection string from code. DocumentLayout layout = new DocumentLayout(@"C:\Temp\test.dplx"); SqlQuery query = (SqlQuery)layout.GetQueryById("Query1"); query.ConnectionString = connectionStringVariable; Document doc = layout.Run(); doc.Draw(@"C:\Temp\Test.pdf"); Thanks, ceTe Software Support Team.

Re: The report element was not found.

Forum member · Jan 8, 2010
Hi Team, Thanks again!!! Regards, Fabian