Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2004
    Location
    UK/Germany
    Posts
    4

    Question Unanswered: Format Controls on Dynamic Created Report!

    I have mastered creating a report on the fly based on a SQL Statement, however its boring and plain and would love to be able to add font formating and font sizes and stuff

    heres an example of the Control I have created:
    Code:
    Set ctlLabel1 = CreateReportControl(reportname:=strReportName, Section:=acPageHeader, _
         ControlType:=acLabel, Left:=(intDataX + 1440), Top:=0, _
         Width:=1440, Height:=240)
         ctlLabel1.Name = "lblTest"
         Set ctllabel2 = CreateReportControl(reportname:=strReportName, Section:=acPageHeader, _
         ControlType:=acLabel, Left:=(intDataX + 2800), Top:=0, _
         Width:=1440, Height:=240)
         ctllabel2.Name = "lblTest2"
    I just want to be able to make the Text bigger

  2. #2
    Join Date
    Dec 2003
    Location
    The Netherlands
    Posts
    98

    Re: Format Controls on Dynamic Created Report!

    Hi,

    Can't you just use the Report tool and the click on the design button? If so you can change things like colour, font, size etc. by clicking on the object and using the possibilities shown at the top of the form.

    If you don't want to use the report tool, would you tell me why?

    Good luck

  3. #3
    Join Date
    Feb 2004
    Posts
    199
    ctlLabel1.FontSize=[anysize]
    thats all

  4. #4
    Join Date
    Feb 2004
    Location
    UK/Germany
    Posts
    4

    Re: Format Controls on Dynamic Created Report!

    Originally posted by charlottevk
    Hi,

    Can't you just use the Report tool and the click on the design button? If so you can change things like colour, font, size etc. by clicking on the object and using the possibilities shown at the top of the form.

    If you don't want to use the report tool, would you tell me why?

    Good luck
    The reason why is because I intend to create the Report and then print it and delete it again. that way when the user chooses what fields he whats in the report, they can be passed to the report, and then it can be deleted, instead of having 500 different reports to allow for every combination or table output.

    I hope this makes sense

  5. #5
    Join Date
    Feb 2004
    Location
    UK/Germany
    Posts
    4
    Originally posted by Kakha
    ctlLabel1.FontSize=[anysize]
    thats all
    Thanks Kakha, do you happen to know how to change the colour and font face?

    thanks again

  6. #6
    Join Date
    Feb 2004
    Posts
    199
    can't say by hard but, you can use control's properties collection to figure out the properties that can be manipulated via code.


    for i =0 to control.properties.count-1
    debug.print control.properties(i).name
    next i

    include this code in report load event and see a results prointed out

  7. #7
    Join Date
    Feb 2004
    Location
    UK/Germany
    Posts
    4
    THANKS mate, I have managed to sort out what i was doing,
    my only problem now is to work out how to fill and pass the contents of an array, to the new form. should be fun

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •