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 SkipVought 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
0
0
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
 
how I can send a select statement constructed in data environment as a parameter to the report created in data report designer .
I designed a form and according to the user's choice the select statement will be constructed ... the problem is how to send it to the report .

thanks a lot
 
hi all
i need some help with data reports
i am using vb and access as back end
i need to retieve recoreds between a specific date
so how do i do that
do i have the field in access as datatype-date or as text
when i am sending thru vb do i send as date or as text
like
data_env_name.conn_name date1
should date1 be type Date or text
i tried using test and date type in access
it gives error datatype mismatch
please could u reply as soon as possible
tpsan@hotmail.com




 
hi Kamesenin
i am getting the same error
dont know wht to do
if u are able to fix it please let me know
tpsan@hotmail.com
 
mohammed,

you don't need a dataenvironment for that.. you can use ado and datareport to do that:

dim conn as new adodb.connection
dim rs as new adodb.recordset

conn.open (your connection string)
rs.open (insert your SQL statement here), conn
set Datareport1.datasource = rs
datareport1.show

in your datareport, don't set a datasource, and in your textboxes, set the datafield to the field name corresponding to your recordset field names.

allan (arcanist@hotmail.com)
 
Thats beautiful!

I've never used the dataenvironment, it seems so much more complex than just creating a recordset :)

But nowhere have I ever seen a description of using the data report without an environment, you are a star :)
 
Need help urgently!!!
I created a report using Datareport and Dataenvironment and print by
drpPrinting.PrintReport False 'for disable printing dialog box
but it not work !! so I use a debug breakpoint between the print calls .. It work !!
Thanks
 
Hi, I am working on the project that use database connected by SQL... I have been trying to group the data using GROUP BY, but for somereason I cannot make that work right... if any body can help me with GROUPING data, Appreciate it. thanks. BY the way I am trying to get data from two tables and let user type the name so user can only see the data he/she chose..
thanks
 
HI, I am working on a datareport without using Dataenvironment. instead, I am using select statement to get data.. But I cannot group data . everytime I try I get error... for example, Model A has 4 function which a 2 As and 2 Bs.. and I want to remove duplicates.. but show the detail like below

MODEL A
Function A detail
detail
Function B detail
detail

also I want to get that on datareport..I want to use Model A, and FUnction as group header.. if anybody can help me with this problem appreciated..


 
HEY I AM HAVING THE SAME PROBLEM WITH THE REPORT UPDATING WHEN I CREATE A EXE FILE CAN I GET SOME HELP MAYBE AN EXAMPLKE OR SOMETHING
 
sorry i'm new in the vb program
but iwant to know how make a report without using Crystal Report Designer
and i want to know how make a report between 10/11/2001 and 20/11/2001

thank's
 
sorry i'm new in the vb program
but iwant to know how make a report without using Crystal Report Designer
and i want to know how make a report between 10/11/2001 and 20/11/2001

thank's
 
I have a little problem, I have a form with multiplt text boxes and certain ones must not be blank so if the user selects a text box and doesn't put anything in it, a msgbox comes up telling them to fill the text box in. (This happens on the lost focus event). But if the user clicks on another text box that must be filled before filling in the first text box, I get stuck in an endless loop of msgboxes. This is happening because it is on the lost focus event, it has to get the focus of something else before it loses the text boxes focus and if another required text box gets focus then when it losses focus a msgbox comes up....over and over...I hope this is readable and any help would be appreciated.
 
i am having problem with data report. I am inserting a group header and place a rpttextbox there but when i run it, i am having this error, "report section do not match data source". please help me.
 
I'm new to data report. May I know how do I get a running no when displaying the records. Eg
1 ABC $4.00
2 DEB $4.50
 
I get run time errors - "Error Generating Termporary Filename" on all my executables when I try to open a data report in them. It seems as though one of my DLLs is not registered, but after making sure all that are in my references list and all that the package and deployment wizard found are registered, I don't know what to do....can anyone help?

Thanks
Kyle
 
Hi there;

Is there anyway to design a data report at run time? I need to creat a very flexible report... Please help.

Richard
 
Dear Sir,

I got your reference in Net. Recently I faced a problem regarding DataReport in VB.

I declared connection, recordset and command object in declaretion and provide the appropriate data source to datareport but don't know how dataField property of the text boxes placed in the form will be activated.


Source code declared in the form is noted below for your kind reference.

Kindly advice me about the matter.


Thanking you

Bhabesh



Dim WithEvents cn As Connection
Dim WithEvents rs As Recordset
Dim ad As New ADODB.Command

Private Sub Command1_Click()

Datareport1.Show
End Sub

Private Sub Form_Load()
'Set ad = New Command
Set cn = New Connection
Set rs = New Recordset
cn.ConnectionString = "PROVIDER=SQLOLEDB;SERVER=smi3;UID=sa;PWD=smc3c;DATABASE=Cyber"
cn.Open
ad.CommandText = "Select * from FinStatus where TotAmt=?"
ad.ActiveConnection = cn
ad.Parameters(0).Value = 590

Set rs = ad.Execute()


Set Datareport1.DataSource = rs

End Sub
 
Hello

i'd lke to tell you about a problem i have:

I'm working on a database application, that uses pictures! The pictures i use are not in the database but in a folder and i have a way to link each picture to a record in my database.

I want to get report with photo on them. But the component DataReport that goes with VB6 doesn't allow to do that dynamically. Do u know a way to get through that! Or can you tell if there is another report component that can help?

Thank for helping!
Please write to me at mankiki@yahoo.com
 
Does anyone know how I can change the font (size, type, color) on a message box?
 
Hello,

well it's obvious that i have a problem that's why i posted it here coz i believe that the problem cannot be solve if you didn't ask about ur problem.

okay this is my problem well i put a line control on my datareport i just want like a table but the problem is if the line is in horizontal position it couldn't stretch when the textbox has grown in size so every row in the table has a gap lines ... i tried to look in the RptLine properties but theres no property named "can grow" ... it makes me frustrated right now i dunno how can i solve this problem so if you have an idea and you know how to solve it i'll i appreciate it.

thanks!

Kamesenin Butan
(slave programmer)

master_butan@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top