473,432 Members | 1,573 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,432 software developers and data experts.

DataReport - How to display expression

34
Hi all... i have a set of record to display in my data report.. and i would like to use the "Select count (*) fromm XXXX " statement to count number of record that i've chosen..
The problem is.. How can i make it appear in my Data report..? Using command1 in property i've coded and tested using SQL Builder.. i paste the data field on to my report.. but it doesnt appear and some error message... e.g "Express 1000 is empty/.."
Can anyone tell me how can i solve this.. Tq
Oct 1 '07 #1
7 2523
creative1
274 100+
can u telll what you have in coded? and where it prompts you for error
Oct 1 '07 #2
QVeen72
1,445 Expert 1GB
Hi,

Place a Label on the datareport and Query from the VB6 Form and pass the value as a passive text..before calling the datareport to show..:

Expand|Select|Wrap|Line Numbers
  1.     'Write Code To Open RecordSet RST here...
  2.     DataReport1.Sections(2).Controls("MyLabel1").Caption = (RST(0) & "")
  3.     DataReport1.Refresh
  4.     DataReport1.Show
  5.  
The abive code assuming, there is no Group section, if u have any, change Section Index accordingly..

Regards
Veena
Oct 1 '07 #3
GROG
34
hi.. i have a Dataenvironment consisting a connection, 3 command, (parent, 1st child,2nd child) my aim of my report is to get a set of record based on the two table(i.e parent (group header) and 1st child(details)) .. and it went well.. (based on ur "dynamic Report " write up..thanks again)

so. now i have a set of record and, i want to put in my report , how many record affected when the query executed.. so.. i come up wif another command (2nd child) and from the property, i've selected the source of data from SQL Statement "Select Count (*) from XXXX" .. and i didn't relate it with the first child.. (tried to relate no joy..)

I paste the data field (rptTextbox) on my report.. and run it.. "datafield Command1.express 1000 not found"
Oct 1 '07 #4
GROG
34
veen, thanks, tried.. no joy.. still trying...
Oct 1 '07 #5
QVeen72
1,445 Expert 1GB
veen, thanks, tried.. no joy.. still trying...
did u open the connection and recset properly what SQL Query did u use..?

Regards
Veena
Oct 1 '07 #6
creative1
274 100+
If you get count on form try to store it in a variable and then display it on report using code posted by Veena. It might work for you.
Oct 1 '07 #7
GROG
34
Hi all , this is the connection and recset used...

Conn.CursorLocation = adUseClient
Conn.ConnectionString = DEnviroPeribadi.Connection1
Conn.Open

// Query// ( "Select * from XXX where name= xxx ..") <-- this is fine.. but the problem is.. to get the count of how many rows affected.. can i paste the code here? or there's other method..

RS.Open query, Conn, adOpenForwardOnly
Set Peribadi_rpt.DataSource = RS

... did i got the rite idea..?
Oct 2 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: berthelot samuel | last post by:
Hi everyone, I am currently trying to write a report based on a View of SQL Server. Basically, I have 3 tables : Hardware, SoftwareInstalled and Software with SoftwareInstalled that keeps track of...
5
by: anoopgopal007 | last post by:
Hi, I am using vb6 and datareport. I am updating the tables whle the program running. But the datareport doesnot show the updated information. Its always shows the previous value. But...
3
by: anoopgopal007 | last post by:
Hi, I am using vb6 and msaccess as back end. i want to display some report using datareport. The report printing at first time only. After i updating my table i can't get the updated...
2
dnb
by: dnb | last post by:
In VB When we store boolean value(True/False) in database then in datareport it displays -1 / 0 in report. How can we display Yes/No or True/False instead of -1 / 0. Please help me....Thanx In...
3
dnb
by: dnb | last post by:
How can we display a particular number of records in a datareport on one page? Any code for that or we have to set any property of datareport in VB? Thanks in advance.......
0
by: hnpatel | last post by:
Hi.... How to set perticular number of records to display on one page of datareport in vb6.0? I want to display 10 records on one page of datareport. Yes i want to display 5 or 10 records per...
9
smartchap
by: smartchap | last post by:
I have a table having 3 fields viz. SNo, FName and LName. The table has 10 records having SNo from 1 to 10. In DataReport I have 3 labels and 3 textboxes. I want to display all records from 1 to 10...
1
by: MaryKJolly | last post by:
I got this sample project from a website. But there is some syntax error in the statement which contains the CDate function. I can't detect the error? Can enybody help me? SUMMARY This article...
0
by: girishp | last post by:
i am using the access database to store the image path and want to display the all images in datareport as per the records are entered. kindly give me the source code.
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.