473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Bound/Unbound Data Report?

I have a small VB6 program that uses Random Access Files. The data is stored in type decs. Can I bind this data to the Data Report or duplicate the data into a recordset and then use this in the data report? Thanks.
Dec 1 '07 #1
2 3018
9815402440
180 100+
hi

you can show unbound datareport. use following logic.

dim rstRpt as new adodb.recordset
with rstrpt
.fields.append "fld1",adbstr
.open
.addnew
.fields(0).value = "any value"
end with

with datareport1
.datamemeber = ""
set .datasource = rstrpt
''Draw lables in datareport (in details section) and set their canGrow property to true.
''dont use textboxes in this case.
' i name details section as Det
dim i as integer
for i = 0 to 20
.sections("det").controls("lable1").caption = i & chr(13)
next
.refresh
.show
end with

use can design the report using lables only.

but the best way out is to make recordset at run time and fill it with the values you want
then bind the datareport as follows.

dim rstRpt as new adodb.recordset
with rstrpt
.fields.append "fld1",addouble
.open
dim l as long
for l = 0 to 20
.addnew
.fields(0).value = l
next
end with

with datareport1
.datamemeber = ""
set .datasource = rstrpt
.sections("det").controls("Text1").datamember = ""
.sections("det").controls("Text1").datafield = "fld1"
.refresh
.show
end with


hope this will help you

regards
manpreet singh dhillon hoshiarpur
Dec 1 '07 #2
Thanks Manpreet, just what I needed.
Dec 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
4
by: N. Graves | last post by:
Hello, Please help me I'm still a newbie. I have an unbound text box on a report that I would like to build a expression to display it on the report. Something like txtboxSearchCriteria = !!...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: Wolfgang Kreuzer | last post by:
Hello all, I am converting an Axs 2.0 application to a2k (I know A2K is not the most current version but Axs 2.0 support ended and A2K is supported in our company amd on every PC). The form is...
0
by: ZRexRider | last post by:
Hi, I have a report driven by a SQL database. I have a populated recordset having a user name and a number of data/time fields. I process these time fields in the report's Detail_Print event. ...
0
by: colleen1980 | last post by:
Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the...
1
by: Donna Richelle | last post by:
I am using Access 2003 and am having some trouble printing unbound fields on a report. When I do a Preview of the report, the data in the unbound field shows perfectly, but when I print a hardcopy,...
7
by: DeZZar | last post by:
Hi all, Unfortunately I am quite a novice with Access!! I've created a number of data bases for my work however becuase my skills are limited to really built in functionality and wizards my...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.