|
Hello
I want to put inside my VB6 DataReport some strings from VB code. I don't know how to do it.
In example. I want to put two dates, like the dates between I did the SQL query.
How can I do it?
Thanks in advance.
Jose A. Martin
|
|
|
|
|
i ve had a problem with the report generation in vb. What i need to do is to make a summary of data entered during a specified period. The structure is as follows;
.............................................................................
REPORT FOR DATA CAPTURED BETWEEN "DATE1" AND "DATE2"
(date1 and date2 are selected by the user)
PROVINCE No. OF RECORDS
1. xxxxxxx 99
TOTAL RECORDS: 99
.............................................................................
PLEASE TAKE NOTE THAT THE NUMBER OF PROVINCES IS MORE THAN 5.
hoping for quicker responses.
vb guru
|
|
|
|
|
Pass the dates as the parameters for the record set in the database.u write query as select * from Table where Date1>xxx and xxx>Date2.
|
|
|
|
|
i want to create a report that makes the database connection dynamiccaly taking the database realated parameters from the .ini file.
if neone has ne idea how to do that help me out asap.
thanks
|
|
|
|
|
my project i s student infermaction. the report for daily monthely ,year generate report .
|
|
|
|
|
Hi all,
I am using datareport+vb. There if I use group header/ footer, the error 'Report sections do not match the data source.' comes. If I remove that, report is displaying fine. But I need header & footer. So how to avoid the problem. I feel the problem with sql query which I am using in data environment.
The sql query is...
Select A.studcode, A.studname, B.studcode, B.studsub, B.studmark from student A, studinfo B where A.studcode=B.studcode and A,studcode=?
the tables stucture is...
student:
-------
(studcode, studname)
studinfo:
---------
(studcode, studsub, studmark)
If any body knows please help me soon.
Thanks & Regards .
-Rama
|
|
|
|
|
hi all,
i just want to ask about vb datareport.what can i do to repeat the different data from one field on the same page?anyone has an idea about this?plz help.thnx in advance.
|
|
|
|
|
We have two tables like... In SQL Server 2000.
1.student:
(studcode,studname)
2.studinfo:
(studcode,studsub,studmark)
The tabel values like...
studcode studname
-------- --------
IT301 Alfred
IT308 Christa Shiny
IT311 Gunasheelan
studcode studsub studmark
-------- ------- --------
IT301 Physics 56
IT301 Chemistry 45
IT308 Maths 67
IT308 Physics 64
IT308 Chemistry 69
IT311 Maths 90
IT311 Physics 61
IT311 Chemistry 72
IT311 ComputerScience 70
So we need report like...
in a form one text box and a command button. In the textbox we should enter the studcode.
then click the command button, then the report should displayed.
like..
for eaxmple... enter 'IT002' as student code in the text box, click button, the report like....
------------------------------------------------------------------------ RVS COLLEGE OF ENGINEERING Date : MAy 01'05
DINDIGUL.
------------------------------------------------------------------------
Department of information Technology.
------------------------------------------------------------------------
Student Code : IT308 Student Name : Christa Shiny
S.No Subject Marks
------------------------------------------------------------------------
1. Maths 67
2. Physics 64
3. Chemistry 69
------------------------------------------------------------------------ Total : 200
------------------------------------------------------------------------
Page : 1
Can one any one help me?
|
|
|
|
|
Simple...
Create SQL command object and then define a parameter. Once you click your command button, assigne the text box value to parameter and requery the command object, then show the data report.
e.g SELECT ..... FROM ... WHERE studCode = ?
(refer the How to refresh data report (solution) down to know how to assigne values to parameter)
|
|
|
|
|
When I do a report and put all data in detail it works fine. Then when I add a Child for grouping, I get Error Message: Relate, Compute By and Sort Operations cannot be performed on columns whose defined size is unknown or too large. Can someone tell me what is wrong. Thanks
jguinn
|
|
|
|
|
This is referring to a memo field in Access. Try changing the field to text and limiting the size to 255 characters.
|
|
|
|
|
I have designed a Data Report in VB6 but it cannot refresh the latest data whenever I preview the report. Any adea how to refresh the data source linked to this report?
|
|
|
|
|
I have designed a Data Report in VB6 but it cannot refresh the latest data whenever I preview the report. Any adea how to refresh the data source linked to this report
please chackyour code
kaka
|
|
|
|
|
hi to all,
i am using build in vb 6.0 datareport in my project
the problem is that i cannot able to refresh the data report
suppose if i have customer form then if add any record and update it and then
view the report tht record is no being shown
if i want to see it i need to close the application and then open it again
|
|
|
|
|
Try to requery your command object. That will do...
eg: dataEnv.rsCommand.Requery
I also had the same problem...
|
|
|
|
|
Hi. This seem to be a nightmare to everyone. I have the same problem. I've tried loading libraries and Service packs but no luck. "The damn Microsoft bugs!!!"
|
|
|
|
|
To do this, call the .Close() method on the recordset object for your command. The following will ensure a fresh query every time:
<br />
'VB6 Code:<br />
mdeData.rssqlTest.Close<br />
mdeData.Commands("sqlTest").CommandText = "SELECT * FROM tbl_Users" 'If you want to change the query dynamically<br />
rptDataReport.Show<br />
Example assumes you have a data enviroment named 'mdeData', an SQL command on the data enviroment called 'sqlTest', and a data report called 'rptReport' bound to 'sqlTest' in 'mdeData'.
Regards,
Matthew Hall
http://www.indarkness.co.uk
|
|
|
|
|
thanks it works with the most perfection!!!!!!!!
|
|
|
|
|
After I update a record in the form, then when I show the report, its not updated.
Very useful site
|
|
|
|
|
How to use parameter querries & grouping in data report.
A small example will be highly appreciated
|
|
|
|
|
Hi ,
I just came across ur post ... and even i'm looking for the same help . I need to generate a report by passing some parameters (from form) say date , some text and stuff like that ... Please let me know if you have any inputs on that ...
Thanks in advace,
a212
|
|
|
|
|
In your command object, user SQL statement with '?' for as parameters. Then in the parameter tab, define the data type and the input mode for them. IF you use string (VarChar) be sure that you specify the correct length as in your database.
E.g SELECT * FROM Employee WHERE empNo = ?
When you execute it, assigned parameters with values and execute the command object
e.g
With DataEnv.Commands("<name of="" the="" command="" obj="">")
.Parameters("<name of="" the="" parameter="" defined="" in="" tab="">").Value = <value to="" be="" set="">
.Execute
End with
dataEnv.rsCommand.Requery
Datareport.Show
|
|
|
|
|
In case you get a error when doing requery type this code.
If DataEnvironment1.rsCommand3.State = 0 Then
DataEnvironment1.rsCommand3.Open
End If
DataEnvironment1.rsCommand3.Requery
|
|
|
|
|
sir/madam,
i had a problem with reports generation i.e
i want to generate about 20 fields across page width
plase mail a solution
thanq
|
|
|
|
|
Hi
how can I send values (start date & end date) to existing query in MS Access, the result has to be displayed in VB Reports. Values would be excepted in variables. I am using Data environment for connection.
Please guide & help
|
|
|
|