I am getting this compilation error when trying to run the sample TableReport.aspx.cs file. Now I modified the file to add my own colmun names and database connection string, but my modfications were minor. I'm a novice at this so I wondered where I might look. I did not modify the buildtable code.
Exception message: c:\Inetpub\wwwroot\g8Ph2\WebApp\Steve_TableReport.aspx.cs(55): error CS1502: The best overloaded method match for 'WebApp_Steve_TableReport.TableReport.BuildTable(System.Data.DataTable, ceTe.DynamicPDF.PageElements.Table)' has some invalid arguments
--Here is the unmodified code from the sample file
BuildTable(data, table);
int currentRow = 0;
int currentColumn = 0;
do
{
currentRow++;
currentColumn = 1;
AddTableToPage(document, table, currentRow, currentColumn);
Table overflowTable = table.GetOverflowColumns();
do
{
currentColumn++;
AddTableToPage(document, overflowTable, currentRow, currentColumn);
overflowTable = overflowTable.GetOverflowColumns();
} while (overflowTable != null);
table = table.GetOverflowRows();
} while (table != null);
// Cleans up database connections
data.Close();
connection.Close();
// Outputs the SimpleReport to the current web page
document.DrawToWeb( "Steve_TableExample.pdf" );
}
Overload error
Re: Overload error
Support · Sep 25, 2007Hello,
The error you are getting is because you are passing some incorrect parameters to the BuildTable method. Please double check that you are passing correct parameters.
In the above error message it shows that the BuildTable method takes the System.Data.DataTable as one of its parameters and you are using the BuildTable method from our example which takes the System.Data.SqlClient.SqlDataReader as a parameter instead of the DataTable. Please make sure that you did the required changes regarding this.
Thanks,
ceTe Software Support Team.
Re: Overload error
Forum member · Sep 25, 2007Thank you, of course.
One last question, I changed the code to use the SqlDataReader and now I get no errors but when I execute the page TableTest.aspx it comes up blank in the browser. What does that mean? I am using a stored procedure that I use in other reports. I am manually supplying the sp parameters just to test if I can get this to work. As you can see I commented out your lines to add my sp.
Here is the info I am passing--
private SqlDataReader GetContactListData( SqlConnection connection )
{
// Creates a DataReader for the report
//SqlCommand command = connection.CreateCommand();
//command.CommandText = "SELECT * FROM Products";
string from = "09/01/2007";
string to = "09/24/2007";
string siteId = "3";
string transType = "1";
SqlCommand cmd = new SqlCommand("sp_REPORT_CheckDailySumBySettleDate_DFSOPS");
cmd.Parameters.AddWithValue("@sinceWhen", from);
cmd.Parameters.AddWithValue("@untilWhen", to);
cmd.Parameters.AddWithValue("@siteid", siteId);
cmd.Parameters.AddWithValue("@transtype", transType);
SqlDataReader dataReader = cmd.ExecuteReader();
return dataReader;
}
Re: Overload error
Support · Sep 25, 2007Hello,
Can you please try adding the Visible = false; immediately after the DrawToWeb() method and see if it solves your problem?
If not please let us know the version of Acrobat Reader you are using and also version of .NET Framework.
Thanks,
ceTe Software Support Team
Re: Overload error
Forum member · Sep 25, 2007Thanks for the help. Still having some issues
Here's the entry just to confirm
// Outputs the SimpleReport to the current web page
document.DrawToWeb( "Steve_TableExample.pdf" );
Visible = false;
I'm running .NET 2.0 with security updates and
Adobe 7.0 Reader on the client
Steve
Re: Overload error
Forum member · Sep 25, 2007Here's exact ASP.NET v
ASP.NET 2.0.50727.0
Re: Overload error
Support · Sep 25, 2007Hello,
We think the problem could be related to the headers not getting set correctly. We will need to take a look at the headers from the page calling the PDF document. We recommend using ieHTTPHeaders tool which allows you to capture all IE headers. Run your example once again and send us the headers it returns. It's free to download. Following is the link: ieHTTPHeaders
.
Thanks,
ceTe Software Support Team
Re: Overload error
Forum member · Sep 25, 2007How do you want them. There are quite a few. Large than 7kb to bin to paste
Steve
Re: Overload error
Support · Sep 25, 2007Hello Steve,
You can send the headers to our Support team at [^a|mailto:support@cete.com|support@cete.com^]
Thanks,
ceTe Software Support Team