Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - ReportControl Frustration
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ReportControl Frustration

 Post Reply Post Reply
Author
Message
Nicolaus View Drop Down
Newbie
Newbie


Joined: 28 June 2007
Location: Germany
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nicolaus Quote  Post ReplyReply Direct Link To This Post Topic: ReportControl Frustration
    Posted: 11 July 2007 at 9:14am
I'm completely frustrated after hours of experimenting with
the ReportControl.

I'm using "Access XP" and I tried to build an absolute
simple app with one ReportContrl and a few test records.

Dim Column      As ReportColumn
Dim Record      As ReportRecord
Dim Item        As ReportRecordItem

Set Column = wndReportControl.Columns.Add(101, "Column 1", 100, False)
Column.AllowDrag = False

Set Record = wndReportControl.Records.Add
Set Item = Record.AddItem("First Item")
wndReportControl.Populate

However, the ReportControl is always empty showing only
an empty record line.

Any ideas?
Cheers
Nick

Back to Top
nvierros View Drop Down
Groupie
Groupie
Avatar

Joined: 02 July 2006
Location: Australia
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote nvierros Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 9:47am
Hey Nick,
 
This code seems to work on for me.
 
Dim Column As ReportColumn
Dim record As ReportRecord
 
Set Column = ReportControl.Columns.Add(0, "Customer ID", 80, True)
Column.AllowDrag = False
 
Set Column = ReportControl.Columns.Add(1, "Name", 80, True)
Column.AllowDrag = False

Set record = ReportControl.Records.Add()
 
record.AddItem "C0000001"
record.AddItem "Nick"

ReportControl.Populate
 
Cheers
Back to Top
Nicolaus View Drop Down
Newbie
Newbie


Joined: 28 June 2007
Location: Germany
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nicolaus Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 9:54am
Thanks a lot mate!

You really saved my day.

It works for me too, although I don't quite understand why
my own sample didn't.

Cheers
Nick
Back to Top
nvierros View Drop Down
Groupie
Groupie
Avatar

Joined: 02 July 2006
Location: Australia
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote nvierros Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 10:02am

Hey Nick,

On further analysis of your code, i changed:

Set Column = wndReportControl.Columns.Add(101, "Column 1", 100, False)
 
TO:
 
Set Column = wndReportControl.Columns.Add(0, "Column 1", 100, False)
 
and that seemed to fix the problem, not sure why it does this though..
 
Cheers
 
Nick
 
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 10:39am
It is because you put index of column to 101.  The first param is an index not an id.
Back to Top
Nicolaus View Drop Down
Newbie
Newbie


Joined: 28 June 2007
Location: Germany
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nicolaus Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 12:08pm
Ah.. the light just went on. Got it.

btw. has anyone an idea how to use a groupbox with radiobuttons
with Access XP?

It doesn't seem to be possible to insert the radio buttons in the groupbox and if I try to use the radio buttons alone then it's not possible for me to enable a radio button more than once.

Strange behaviour indeed.
Cheers
nick
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.