Click here to Skip to main content
15,897,718 members

Comments by Vish0512 (Top 8 by date)

Vish0512 25-Apr-13 16:24pm View    
This is the strangest thing to have happened in my life as a coder till date. With utter frustration of trying so many things I left this piece of code for few days and today when I started with fresh mind after watching all the responses above. I just ran the same code (without any code for printing) and it worked fine (printing a blank page). Then I started adding code of printing one by one keeping my fingers crossed and my entire piece is running as expected.

I really can't explain what I've done as I was not even working on this Laptop for last 3 days. I've not installed or uninstalled any s/w... Just hope that it keeps working as is now and dn't trouble me any more. May be some auto update has done the wonder.

Thanks Johnny and Kschuler for taking out time and giving your valuable suggestions.

I'll post over this thread if I happen to find the root cause of issue.
Vish0512 20-Apr-13 6:42am View    
Hi Kschuler,
I'm printing the same thing in another form. Actually I first wrote code for printing in my main form (To print an invoice with sales data details) and this exception came. Then I made a test form with a button to initiate printing and copied entire printing code in that form and it worked. So there is no difference of printer setting or data or any thing. and the most important thing is that when I'm not printing any thing even then this same exception is coming!!!

Do you have any idea of what "External component" can mean going by exception stack trace which I've shared in this post?

Thanks for your help!!
Vish0512 20-Apr-13 6:37am View    
Vow!! It was that simple. and I thought that making any change in datatable will directly run query on DB.. :-P
Thanks a lot Dave. That was really helpful.
Vish0512 19-Apr-13 12:20pm View    
Hi Dave,
I was out of action for some days so delay in the response!!
See I'm totally new to VB.Net and as per my understanding when I fill my Dataset, the data is loaded from DB as per logic (our internal query for the fill method). However, in my case, I don't want to insert data in the DB and before committing, I want change in the set of data.

Let me give you complete picture. The requirement is for a project based on POS(Point of Sale) concept, where a user will select products and a record will be inserted in DGV. now if that user wants to remove any of the selected products, the system should allow him to do so before generating bill. So only one out of all uncommitted records will be removed and rest will remain visible

It is only when the user will click on Create Bill that the system should actually commit the record in DB.
Vish0512 19-Apr-13 12:10pm View    
Hi Johnny,
Thanks for suggestion. However, it is not working still. My local printer is valid and thus is it calling Print() method however, while debugging it is not even going to the first line of PrintPage method of PrintDocument1.