Print Page | Close Window

ReportControl Frustration

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=7581
Printed Date: 17 November 2024 at 12:52am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ReportControl Frustration
Posted By: Nicolaus
Subject: ReportControl Frustration
Date 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




Replies:
Posted By: nvierros
Date 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


Posted By: Nicolaus
Date 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


Posted By: nvierros
Date 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
 


Posted By: SuperMario
Date 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.


Posted By: Nicolaus
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net