Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic


hello every one
on a datareport linked to a dataenvironnement, i want to link my rpttextbox to their own field in the recordset,
but in my DE command, i don't know at first the number and the name of the fields generated by this command
How can i do this?
Please help

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
{SOLVED} Re: Question To Datareport FAQ; How-To Use Datareport Without Dataenvironment
Hi haahoo.
  When using a SHAPE statement you must also add the following to your connection string;

For Access db use;

For SQL server db use;

Hope this helps!

Edited by - Deke on 1/27/2004 3:01:45 PM

My biiiiig problem is if I use DataEnvironment1 in my application and connect whit DataReport, everything work fine on my PC. But when I tray to install my program on other PC, I got error message when I tray to execute this DataReport. Error message is "Failed getting rowset from current data source" Help!! What I need to install to!

Datareport Without DB
Hi all, im having a bit of a problem at the moment. I have this code in a mod

Public Type HistoryDetails
HistoryDate As String
HistoryTime As String
HistoryType As String
HistoryRegards As String
End Type

Global HistoryLog() As HistoryDetails

My program runs and HistoryLog() gets ReDimmed and data added to it so that I have a lot of data in it. e.g.

HistoryLog(1).HistoryDate = 27/01/2004
HistoryLog(1).HistoryTime = 00:00
HistoryLog(1).HistoryType = Action
HistoryLog(1).HistoryRegards = Going to sleep

Now what I want to do is display the entire contents of HistoryLog into a DataReport.

Any ideas???



I need to insert a memo field into a datarepost.But i am no able to do it. Anyone can help me?

Help On Datareport
I need to make a datareport that supports legal format (8.5 X 14) instead of the usual letter (8.5 X 11). How can I do this? Can anybody help me out here?

I need that the information in the group header of a data report be on the page header, the problem is that the information in the group header are fields from a table and in the page header does not accept these type of information, anybody has an alternate way to do this? I need that info to be the pageheader.

my e-mail is

Datareport, Is This Possible?
On my datareport, I have a unbound field.

On that unbound field I am trying to add something like this:

.Controls.Item("txtDoseage").DataField = "MEDDOSE" '& " mgs"

is that possible? if not how could I do something like this.

textbox field sits in the detail section



Can Any One Help Me With VB Datareport

i am using vb 6 and and ms access 2000.

i am having some problems using the data report.

i have created a data environment. and i am also having problem giving the command text

if i write a simple select query such as

select * from test
i get an error

[Microsoft][Microsoft ODBC access driver ] Syntax error in from clause




I am trying to number the records on a Datareport and was wondering if anyone knew how to do it?

I have a Label with the date in it, the caption for this is '%d'. Is there a similar way to this to number the records?

Also, is there a way to display the total number of records at the end of the report??

Cheers in advance for any help,


I am in my beggining in VB. My problem is that I failed to have a datareport with only the information I need. I have always the whole records in the datareport. Why VB don't take into consideration my selection.
Think you for helping me.

Need Help On DataReport
I have a VB application that displays information of a person in the organization. Now, I am trying to create a VB DataReport that prints out a person's information being displayed on the application. The parameter for the select statement of the report is PERSON_ID (primary key).

Apparently, I cannot define the select statement in the design time since the PERSON_ID wil dynamically change according to the record that I am trying to display. Could you anyone shred me some lights on how to implement this report in the run time? Any source code or sample code will be extremely helpful. Hundred thanks for your help!
Have a good day!


VB Datareport
hello sir

pblm in VB-datareport
i am developing an invoice/ biiling software.
i am displaying a report of particular invoice with its respective details.

now in mine report i am showing all the inv. detail like Sr. No., itm_desc, Qty, rate, amt in detail section of datareport.
with a box(rectangual shape) surrounding it, that is also drawn in detail section.

now my pblm is that i want to display that shape as per the requirement, that is i want to set a fixed box size.
but in my report box size is changing as the no. of records are added or decreased. ie i want to set a preprinted format within dataeport itself.

pblm in detail:

if for a particular inv. i am having three items (records) in detail section then it is showing me the size of box of three records only, if there r two record then the box size is adjusted or changed to two records.
but i want to have fixed box size which will be displayed on full paper size , and within that i want to show my detail records.

i tried so many option within datareport itself, like increasing box size, drawing boxes or line even on page header section cntd. till page footer section, but it didn't work

pls help me out, i am really in urgent need of this help
pls provide me with code and detailed explanation .
thank you
poonam jadhav

Is there any way to embed a dataReport into a form? What I would like is a form where I can pick dates up the top, and then it will show the datareport below on the same form. this possible?

DataReport In VB6.0
Here is the problem..Can a Datareport be prgrammed from code..Example....
I know you can do adodb recordsets.But Heres what I was wondering....
When you create a Data Report,you add your fields ..i.e labels(unbound) and text boxes(bound to a field) .When you do a label you write what you want to Title .....
I wonder if and how to do it in code...if you leave a label blank and when you show your report changes its caption........can this be done??????How

Any one konws how to connection report with data base??
I working with data1.

hi, I just want to know if he has any solution to set a label's caption at runtime in the section 4 ( report header section ).

When i try this line:


datareport.sections(4).controls("label1").Caption = "this is an example"
it doesn't work. I have this error:
"The objects "label1" was not found

But when i tried it in an other section, like section 2 (page header section ), it works great. Why?

SQL And Datareport
I have program that hold information on Patients and their accounts
I have a report with a command to get the patient info from the Info_tbl and then a child command to get all the account details from the Account_tbl table. This all works fine, but i want to get the dates account dates from the user via a form( frmDates)

my commandtext look like this:

"SELECT accountno,code,description,tariff,accountdate FROM accounts WHERE accountdate = '" & frmdates.dtpStart.value & "' ORDER BY accountdate"

This does not seem to work. Any ideas would be appreciated

VB DataReport
Hi all, I'm sure that some of you have had this problem before (and hopefully solved it):

My database includes 4 tables populated with data about employees: tblPersonalInfo, tblAward_Received, tblWarning_Received, and tblComment.

They are all related by a common primary key Employee_ ID. All but tblPersonalInfo may contain multiple records about the employee (e.g. an employee may obtain more than 1 award)

I have been successful in creating a report that consists of only 2 tables with:
-Group header containing tblPersonalInfo values
-Detail section containing one of the other tables
This is done by adding a child command in the Data Environment

WHAT I NEED is to create Employee reports which consist of data from the 4 tables, grouped by tblPersonal Info
-The group header should contain: tblPersonalInfo values
-The detail section should contain all: tblAward_Received, tblWarning_Received, and tblComment grouped by Employee_ID (as displayed in the group header section)

The same method wouldn't work, because Data Report doesn't support multidimensional hierarchies

Can somebody please shed a light?

DataReport Again!
Is it possible (using datareport) to cascade stored procedures i.e use stored procedures in lower commands using the retrieved values from higher commands as parameters?

I'm trying to use the Data Report but I'm new to it. How do I use stored procedures which I have already set up on SQL Server? How do I pass paramaters to them from the form from which I call the report?

I am trying to create a report in VB6 - and I need to be able to change the the text box's datafield during runtime, dependant on the query. Can I do this or am I wasting my time.

Hi, I have a form with 2 textboxes where the user inputs the initial date and the finale date. the form should then generates a report based on the query with the information inputed by the user. Problem: the form opens and it shows nothing, and I'm sure there are records in the db for the dates I input. With error trapping I get an error 0 and no description

this is the query:

strSQL = "SELECT Name_Last, Name_First, GroupName, Date_In, Housing_Unit, Date_Out FROM CONTACTS" & _
" WHERE Date_In >= #" & strDateIn & "# AND Date_Out <= #" & strDateOut & "# "

any idea?

DataReport Help
I created a DataReport using Data Environment(called DE1) and want to update the Report at run-time.
I have setup a connection to a table(called Reservation, in Access) and added a Command to this connection.

The code is:

DE1.Commands("Command1").CommandText = "Select * FROM Reservation WHERE Date='" & strDate & "'"
DataReport1.DataMember = "Command2"

I got an error "Failed getting rowset(s) from current data source!"

Please help me out of this problem. Thanks

Using SQL In DataReport
Hi pals,

I have an urgent problem here which needs to be resolved asap...
I'm currently using VB6 DataReport to generate an error report for my system. But seems like every field in the report is linked to the database and i do not know how to apply my sql in so as to filtered out certain data...can anyone help? it's urgent......

meaning,can i use a sql in Datareport? And how to use it? i might need some examples for better understanding...Thanks alot pals!


Tengo un gran problema.
Estoy utilizando el DataReport para hacer unos reportes de un sistema de compras, pero cuando trato de hacer los reportes tengo problemas con los sql y las fechas, es decir, tengo que sacar reporte de por ejemplo ordenes de compras entre el 1de septiembre y el 30 de septiembre de 2003 pero no logro armar el sql de tal manera de funcione, siempre me da error de sintaxis.
Por otro lado tambien se me presenta el problema de que no se como cambiar la sentencia de sql de un comando secundario (lo se hacer para uno primario) pero para uno secundario no consigo como hacer: Esto se puede hacer?????.
Muchas Gracias

Hi, Everybody.
I work with VB6, and trying to create run time report, I mean, I show the form to user, on which I put buttons, each button symbolize the field from db, so that user can choose which fields he want to see in report: for ex: user wish to print report, that includes the list of lecturers (last name, first name) in university, and the departments they belong to, and the sum released for the research; or another time, user wants to see the report that includes only lecturers from specific department and their status at university; or even information about specific scientist.
For this matter I catch chosen by user options from form, build SQL request, and passing parameter values on run-time.
How can I create the report, that each time will include different fields, and different number of fields?
(about standard report - I can see it, but can not change it, of course, on run time)
I will appreciate if somebody could help me.

Thank you,

About DataReport
I'm using DataReport. In designing time, I need more spaces to place my fields in the report, so I change the ReportWidth larger.. and complete my design!

When I run it, this error message appears, it says:

Report width is larger than the paper width

please, help me... how to increase the reportwidth or paper size?
I've been trying to find the paper size, but it can't help... what should I do with it..



Datareport, Please Help

Is it possible to generate a report out if an excel-table. i've also done a recordset (ADO), based on this excel-file, and filled this in a datagrid.

are there any ideas?



Help In VB6 Datareport
can anybody help me in VB6 Datareport, i finished some applications but when i setup them on other computers can not show the reports without any erroe msgs, all the reports are datareports and i always use the VB package tools

have a nice...
I have a question regarding datareport, i can use it to print data from listview? i Print only from database here my code

Private Sub cmdprint_Click()
Set rs = New ADODB.Recordset
rs.Open "select number, lastname, givenname, workplace, jobtitle from tblprofile ", cn, adOpenKeyset, adLockOptimistic
With dtActive
Set .DataSource = rs
.DataMember = rs.DataMember
.Show (vbModal)
End With
dtActive.Sections("Section2").Controls("label2").Caption = "FrmNewEmp.dtstart.Value"

Set rs = Nothing
End Sub

>>> but i want is to print first b4 saving, coz dis i have to save. i use dis for my receipt, i make POS System....

i hope u could help me...
tnx's and in advance...
God Bless.....

Help me please... I need help... My english is so bad...

I want to make a Datareport with pictures... I want a photography by each employee... With DataReport... Please... Thank you...

everyone please help I need this fast
I have used datareport in my project , I had the error "Report width is larger than the paper width" but I have instaled service pack 6 and I fixed that. But now the problem is when I compiled my project and took the exe to other PC without developer enviroment. I got that problem again "Report width is larger than the paper width" , I copied the msdbrptr.dll in system32 , but still get the error even though the dll file is ServicePack 6 file. So anyone PLS help !!!!!!!

Hy !
Can we create a datareport without define any datasource ? If i do not need any dynamic informations on it, it seems logic not to define a datasource. But when doing it, an error occurs saying datasource is not defined !!??
How could i do ? (my datareport has only static informations, no need datarecords)


I have seen there are a couple of posts about this already....but i need a more lamens intro to datareports in VB6.

I need some kind of tutorial that will start me from scratch....we all gotta learn somewhere...

if do i get started....i have never used datareports before in my life and am getting nowhere fast tryin it myself

I have a MS Access DB...which i need to pull data from to put into the report....i'm assuming that it can be done with SQL...but how?

hello all,

i am using datareport for report printing. first i am showing datareport preview window using show method. when i click print button, printer setup dialog is coming. how can i hide that dialog and instruct datareport to print directly(i want i cant use printreport method).
urgent. please help.

Hi, I'm having a little problem with datareport. I packed this application and installed it on several computers, and all is working fine. But yesterday I installed it on a new computer and the reports generated by datareport dont show up. I don't get any error messages, so I have no clue of what is happening. MDAC is installed regularly. Any ideas?


Datareport Help
please can anyone send me a little tutorial or a how to make a datareport because i am trying to make this and i dont know how to make it....

Please Help me

Datareport In Vb
hi , ive got no experience in making data reports within vb. soo..
i have created a form that has an msflexgrid, is there anyway i can pass the results to a data report, and also i need to know if i can pass the values from a text box on a form to a data report aswell.Thanks in advance

I am using and Access database and VB6 on the front end. I am also using DataReports that VB provides. In the report I have a group header, and detail sections.
I would like to create the report so that if the detail for that group doesn't fit on the same page then to page break and fit the detail on the next page.
I tried setting the page break property to before on the group header but that creates a report with a single group section per page. If I set page break for detail then each page will have only 1 row.

Any help or suggestions on how to make the report print a group on seperate page if it doesnt fit on the current one?

If it cannot be done, what are my options? Create the report using Crystal Reports or Access Reports?


Vb6 Datareport
I'm using VB6 SP6 under XP-Pro. I've got an app that has a dataenvironment and datareport in it. When i try to print a 2 page report using the rptrangeallpages it only prints the 1st page. if i do a preview and then click on the printer button, all pages report correctly. any ideas?

Hello all

possible to copy the text box value from form to report.

example. i have a text box in form.
the value of text box=myname.
"myname" will copy to datareport rpttextbox or rptlabel. this myname is not a database records.

Vb Datareport

I have created a DataReport that is bound to a DataEnvironment for it's recordsource and I have a problem with the report not refreshing until I close out of the application and get back in.

For example, before I first run the report, I can enter some data and then run the report and it's fine. Then, if I close the report (not the application), change or add data, then run the report again, it still only shows the previous data, without the latest updates. It only shows once I close out of the application completely and then get back in and run the report.

Any ideas?


Vb Datareport

I have problem in datareport how can pass the parameter in datareport any one know the this setp plz. send the mail

Datareport Help Please!!!
I am using a dataenvironment to show my datareport.
I have specified my paths perfectly but i am getting an error : Datafield not found
can someone help me please
I rechecked my database and i dont know what the problem is?
thanks for your help

Need Help In Datareport
im storing picture file name in the database. it is able to display in the form with command line.
but when using datareport, if there is multiple record how will i display the images.
if it is possible pls help

DLL Of The VB DataReport?
What are the DLLs use in VB DataReport? Thanks.

About DataReport
I'm trying to print a report that is not connected to a database but it keeps saying ( Invalid Data Source ) , must I connect the report to a database? what are the best ways to print a report without having to use a data source ?

Thank you

I don't find DataReport very good, maybe (probably) because I haven't used it much. Do you know a good website for it?

I want to use the DataReport thing to create a paper version of an order. On an order is data involving the orders customer, the different orderlines and so on. What I have to do is connect to the database and get data from several tables. So actually I will have several recordsets that I need to couple to my DataReport. Is that possible and how? This is the code (that works) that I use to get my orderlines. No problem here, but I still need my costumer on it to ...

Option Explicit
Public con As New Connection
Public rs As New Recordset

Private Sub cmdShow_Click()
Dim strSql As String
strSql = "SELECT * FROM tblOrderline"

con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=V:AANKOOPICTProjectDABdb.mdb;"
rs.Open strSql, con
Set drMyReport.DataSource = rs
drMyReport.Show vbModal

Set rs = Nothing
Set con = Nothing
End Sub

Thanks in advance!

hi, how can I set the DataReport Paper Size and Orientation in VB6? Like for the example, the Paper Size is 8.5 x 14 and its Orientation is Landscape?
Kindly help me please?

Copyright 2005-08, All rights reserved