Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all -
I'm working using VSTO to create an excel 2007 application. I'm using C# as the programming language. Background: I've dragged a DataGridView control onto a worksheet and the DataGridView is bound to a data table. The data in the data table and hence the DataGridView's content changes when an SQL select statment is executed. I've a do-loop that executes the SQL statement and then prints the worksheet that contains the DataGridView. The C# print statement looks like: Globals.Sheet1.PrintOutEx(1, 1, 1, missing, missing, missing, missing, missing, missing); Problem: The contents in the DataGridView doesn't show up on the printed page. It's black or sometimes it has the column headings with no data. It's like whatever the contents of the first SQL select statement is there on the first execution is what it prints for each iteration. The DataGridview doesn't update. Executing the SQL select and printing manually (i.e., Office Button - Print - Print), the contents show up just fine. Is there something special about printing an embeded control? Any ideas are always appreciated. Thanks, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Winform Exporting Data to Excel form Datagridview | Excel Programming | |||
Shows blank worksheet but ok in print preview | Excel Discussion (Misc queries) | |||
How can I print a worksheet excluding blank rows? | Excel Worksheet Functions | |||
program excel worksheet to automatically not print blank rows | Excel Discussion (Misc queries) | |||
program excel worksheet to automatically not print blank rows | Excel Programming |