Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27189

VS 2012 listViewPrinter Error

$
0
0
Hi Guys,

Got a problem and have absolutely no clue why or how to fix it. First I have set up and slightly modified the colours of the listViewPrinter that is available on MSDN here. This works perfectly fine when I enter the listView items manually, but this is problem. I retrieve the data from a MySQL database and they all appear perfectly in the list view but then when I go to print I get this error: "InvalidArgument=Value of '2' is not valid for 'index'." For the line "e.Graphics.DrawString(items(r).SubItems(c).Text, lv.Font, Brushes.Green, cell, sf)"

If anyone has any idea, or would like me to provide some further information, please reply as it is vitally important, otherwise my entire project is f***ed!

Thanks,
Ryan

Viewing all articles
Browse latest Browse all 27189

Trending Articles