Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Data Report Designer 4

Status
Not open for further replies.

Sam13

Technical User
May 31, 2001
5
US
Hi there, I'm relatively new to working with VB and databases. I'm working on a project that is using the Data Environment and the Data Report Designer to create reports. This is my first time using these aspects of VB. I've stumbled my way through setting up some reports but I'm having trouble with a few things.

First, How do you get the report to show in a landscape format rather than portrait? Is this option even available??

My second question Is a bit more involved. Basically when I create the reports, I'm using the data environment connection to create a query of my tables using parent/child commands and SQL statements. The issue is that When my parent item has no data in the child portion then the report still creates a line item for the parent. I want to eliminate this line item and only have the report show parent data that has child data. I hope I'm being clear. I'm a bit lost on how to do this.

My third question is can the Data Report Designer be used with an ADO control? Basically I want to be able to search the database on criteria the user enters and print a report using the recordset returned by the search. Any thoughts on the best way to print such a report would be great.

Thanks in advance for the help.

Sam
 
Hello, I am trying to create a Data Report that will be generated from parameters received through input. I am using the following command to pass the data.
Private Sub Command2_Click()
Dim sql As String, User As String
sql = "select * from main"
User = Text1.Text
sql = sql & " where user = '" & User & "'"
DataEnvironment1.Commands("Command1").CommandText = sql
DataReport1.Show
End Sub
This command works find until I add groupings to the Data Environment Command1. When I do this I get an error when I run this code. I think I need additional code but am not sure what it would be. Any help would be appreicated.
Thank you
 
Need Help to Use Data Reports.

I want to print 10 lines of output on a standard
page using a standard dot matrix printer and then
stop printing. Also the page should not eject to
the next page.

 
Hi!!!

Can anyone tell me how to suppress repeating values in the detail section of the report? Is it possible? If not, how can i have two group section in one report? Hope you can help me guys. Thanks!!!

This is the sample i want my report to look like.

Accout no. Invoice items amount

1111111111 2aaaaaaa xxxxxx 1250.20
3aaaaaaa ffffff 250.25
zzzzzz 255.00

2222222222 4ddddddd yyyyyy 253.35

 
Hi .. if ur using SQL query u can use "SELECT DISTICNT field1,field2 FROM tablename WHERE CLAUSE"

This way ur recordset will return only values once .. no duplicates ..
 
hello,

Is it possible to design a datareport at run time? What I try to do is to create a very flexible report to have different coloumn names and amount of coloumns to display at the report.

Report Example 1

Column1 Column2 Column3 Column4

Report Example 2

Column1 Column2 Column3


As you can see, the report is not set with a exact amount of coloumns, and each coloumn might have different names. Instead of having design all the different combination of reports at design time, which could be many, can I just create it by using codes..

Hopes you know what I try to say

Thanks for all your help

smita
 
Anybody know how to disable the print and export controls in the datareport. I want users to be able to view a report but not print or export it?


Appreciated.
 
Does anybody know how to create a Mailing Labels report by using Visual Basic Data Report Designer?
 
Can any one tell me how can I generate any data report with serial no.. not Field in the Database Table
 
I'm have an Access database with different variables that will determine what report I will be printing. However, I define a variable as a DataReport and I can't get the .show command to appear. Here's my code:

Dim sReportName As DataReport

With rsReportList
.Index = "SecondaryKey"
.Seek "=", sRptLbl, sRptCat, sRptName, sRptSort, sRptFilter
sReportName = !TechName
End With


I want to add sReportName.show but the .show command won't appear. Any thoughts?
 
J'ai besoin d'installer un exécutable contenant un report. Mon exécutable(contenant juste un data environment et un data report) fonctionne parfaitement sur mon poste qui a VB 6.0 pro. Si je l'installe l'exe avec le runtime de VB sur un autre poste:pb de classe non enregistrée
Quels sont les outils exacts à installer sur un pc qui n'a que le runtime de VB 6.0 de façon à pouvoir utiliser les reports correctement?
Faut-il ajouter des adresses dans la base de registre?
Quelles sont les dll et ocx à installer en plus du runtime?
 
The orientation of a printed VB report is set to the current state of the default printer at the time of printing (Portrait or Landscape) the report, to programmatically change this before printing, ensure that you have VB service pack 5 installed and use the following line of code

DataReport.Orientation = [value]

Where [Value] can be any of the following constants:

vbPRORPortrait (For portrait)
vbPRORLandscape (For Landscape)
 
Good day

i've been working with my project in about two months now i solve the landscape problem but how can you enlarge your report width to match the long bond paper size?

have suggestions! please post it 4 me thanks!

Jampaz

 
I have a recordset that was generated by a ADOs command with commandtype=storeprocedure, this is the source that i use for datareport, the problem is that in the rptTextbox the information start since the second register, so if i have a recordset with one register doesn't appear anything...
somebody can help me...
jenriquecastilla@hotmail.com
 
I have a recordset that was generated by a ADOs command with commandtype=storeprocedure, this is the source that i use for datareport, the problem is that in the rptTextbox the information start since the second register, so if i have a recordset with one register doesn't appear anything...
somebody can help me...
jenriquecastilla@hotmail.com
 
I've just started working with Data Environments and Reports and will appreciate some help. I set up the data environ and report but when I try to run/preview the report, I get the message "Failed getting Rowset(s) from current data source". I've tested the connection and it's good. Can anyone suggest a solution, please??
 
Thanks for the info on using Datareport designer shall try it out and strike back with similiar kind of questions . Expecting all ya people cooperation. Thanks in advance.

regards
Prashant.P.R.
 
dontee,

That's because, by default, queries aren't defined as returning recordsets. I had the same problem. To fix it:

Select your Data Environment.
View the control.
Right click the command, select properties.
Click the 'Advanced' tab
Turn on the 'Recordset Returning' check box.

Jim

 
I am writing a report in the vb6 data report. I understand how it works, but I would like to manipulate the group headers to print one heading on page one of the report and another heading on page 2. How would I set this up? Thanks in advance
 
I have a question regarding parameters to child commands in the DataEnvironment. I will try to explain the problem with a simple example.
Example:
Parent-
Table:petOwner
ID
Name
Adress
Child-
Table:pet
ID
Name
Gender
Age

The relation is ID = ID ofcourse.
I would like to use the same report to show:
1) PetOwner and his/hers pets with an age < 2
2) PetOwner and his/hers pets with name = 'Peter'
3) PetOwner and his/hers pets with Gender = male

Is it possible to have some variables/parameters for this or do I have to do three different reports?

(I guess that this is something that is very common?!)
 
I have had the same problem. I try to pass parameters in the data environment, but I have it doesn't work trying to pass the parameters to the child table if those fields are not in the parent table. If you find out how to do this, please let me know.

If you use the Child table as the parent table, then you can run as many parameters as you want (1 report using 3 parameters). I don't know if this answers your question or not?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top