Solved

Data Report without any data

Posted on 2002-04-12
8
147 Views
Last Modified: 2010-05-03
Is there a way to use Data Report in VB to create a form and then have the VB program fill in the fields.  The fields on the form would be unbound text fields.  I am trying to print checks but don't want to tie it to all database records.  An example would be appreciated.
0
Comment
Question by:dorinda
  • 3
  • 3
  • 2
8 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 6937309
you could have a dummy mdb file and set that as your datasource.

to have vb fill in your fields you can do something like this:

put a label named label1 in section1.
then you can do:

DataReport1.Sections("section1").Controls("label1").Caption = "Hello World"

Datareport1.show
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6937372
0
 

Author Comment

by:dorinda
ID: 6937462
I really don't want to have a database tied to it...is this possible?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6937479
i've been looking around and it seems that's it's not.
emoreau's link just shows how to bind the report at runtime
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6937487
you don't need a database to have a recordset (when using ADO). You can create an in-memory recordset. You will then be able to bind your report to this recordset.
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 6937505
emoreau is correct, you can create a dummy recordset through code and bind your datareport to it at runtime.

need an example?
0
 

Author Comment

by:dorinda
ID: 6942779
Could anyone provide an example of a dummy recordset and how I would bind my datareport to it at runtime....I guess I am not visualizing it.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 6943018
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now