Link to home
Start Free TrialLog in
Avatar of Rorc
RorcFlag for United States of America

asked on

Format a Document for Printing

Does anyone have any good links/information on how to format a document for printing within VB.NET?

Thanks in advance,

Rorc
ASKER CERTIFIED SOLUTION
Avatar of Ralf Klatt
Ralf Klatt
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rorc

ASKER

That helps explian somewhat, but what I'm trying to do is:

Take data from my objects (the objects each contain 8 entries and are in an array)

Format this so that my sheet will look something like:

Object1.Name
Object1.ItemA                   Object.ItemB
Object1.ItemC                   Object.ItemD
Hi,

Your question was "Does anyone have any good links/information on how to format a document for printing within VB.NET?" and I provided a link that helped explain ... if you have problems with an array then please provide the code you've already prepared so I may have a look on it ...


Best regards,
Raisor
Avatar of Rorc

ASKER

This is the item I am trying to print:
         
TheTest(i).Question = DataBank.Tables(0).Rows(CurrentQuestion).Item(1)
TheTest(i).OptionA = DataBank.Tables(0).Rows(CurrentQuestion).Item(2)
TheTest(i).OptionB = DataBank.Tables(0).Rows(CurrentQuestion).Item(3)
TheTest(i).OptionC = DataBank.Tables(0).Rows(CurrentQuestion).Item(4)
TheTest(i).OptionD = DataBank.Tables(0).Rows(CurrentQuestion).Item(5)
TheTest(i).Answer = DataBank.Tables(0).Rows(CurrentQuestion).Item(6)

TheTest(i) is an array of a user defined objects (Questions)
The question contains 8 items, Question, 4 options, the answer, the user's selection, and a flag to say if the user has already answered the question

My final printout should result in an output as such:

Question
Option 1                   Option 2
Option 3                   Option 4

The user's selection

then the correct answer

sorry if there was any confusion.
Avatar of Rorc

ASKER

oh, I forgot to mention, I dump the Databank.Tables(0) object after I finish reading from it.
Hi,

Thanks for posting the required peaces of code!

While looking at the provided code it looks to me as there isn't another way to refer to the example I've shown you above.

You may think that my answer to your question is "too poor" to accept ... but what I gave you is an example on how to print a table out of a dataset ... you may take that example and shape it to your dataset (DataBank) ... there are certainly more ways ... even thinking about Crystal Reports ... to format a "printing solution" ... sorry, but sitting here and preparing you the "final solution" you're looking for would be something like doing your homework ...


Best regards,
Raisor
Avatar of Rorc

ASKER

I guess I'll just have to live with that and take a look elsewhere,

Thanks for the help though,

Rorc
Hi,

Having had a second glance at your question "Does anyone have any good links/information on how to format a document for printing within VB.NET?" and being bound to the EE Guidelines ... I respect and accept your comment and also your grading!

I'm sure that if you'll have a second look at the provided code you'll be able to do the coding without someone else doing the work for you!


Best regards,
Raisor
Avatar of Rorc

ASKER

Raisor,

Sorry about the C grade. After another look through the link you gave me, I noticed some information that lead me to the proper answer.

I've asked in community support to get your grade raised.


Rorc