[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

Printing Question

I have to write a report which 2 pages: the first one is the customer record, and the second one is a table with all the activities of the customer in the last month(kind of a grid table). I have no problems with the first page, but when I tried to deal with second page, i could figure out how can I align and limit the size of the fields so all the rows for a specific colimn will start on the same X. I tried to use the currentX/Currenty but it didn't work.
Can someone help me, please

Alon
0
oak022097
Asked:
oak022097
1 Solution
 
mark2150Commented:
Umm, as you print, don't advance the cursor:

Printer.print "col1";
printer.currentx = ... set to column two
printer.print "col2";

The ; at the end of the line will prevent the print cursor from advancing.

You can also force the issue:

TempY = Printer.CurrentY
Printer.Print "Col1"
Printer.CurrentY = TempY
Printer.CurrentX = Col2X
Printer.Print "Col2"

Same technique lets you right align. Say you had to print something at 5" that would
place you at 7220 twips in from the left.

txt = "Text to print Right"
Printer.CurrentX = 7220 - text.width(txt)
Printer.Print Txt

etc.

Remember text prints DOWN and to RIGHT of CurrentX/CurrentY and that there are 1440 twips in one inch. (1 inch = 6 Picas = 72 Points = 1440 Twips)

0
 
watyCommented:
You could use my Print Preview OCX. It does everything :

 Web Site : http://www.geocities.com/ResearchTriangle/6311/ 
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now