473,396 Members | 2,016 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,396 software developers and data experts.

DataReport is giving error

Good Day,

Below is my codes:

Expand|Select|Wrap|Line Numbers
  1. Private Sub btnRpt1_Click()
  2.     Dim strBC, strDBI, strDBN, strJouFrm, strJouTo, strSQL, strTransDate, recCou As String
  3.     strIndex = cmbDBR.ListIndex + 1
  4.     strDBI = Check_DB(strIndex, "ID")
  5.     strDBN = Check_DB(strIndex, "NM")
  6.     strBC = txtBCR.Text
  7.     strJouFrm = txtJouFrmR.Text
  8.     strJouTo = txtJouToR.Text
  9.     strTransDate = strPayDate2
  10.     If txtBCR.Text = "" Or txtJouFrmR.Text = "" Or txtJouToR.Text = "" Then
  11.         MsgBox "Please Key In All The Field !", vbOKOnly, "Validation"
  12.     Else
  13.         Screen.MousePointer = 11
  14.  
  15.         On Error Resume Next
  16.  
  17.         Dim de As New dtenvRpt
  18.         Dim QryDef As New ADODB.Recordset
  19.  
  20.         strSQL = "select * from table_name"
  21.  
  22.         Call OpenConnection
  23.         QryDef.Open strSQL, conn
  24.         recCou = QryDef.RecordCount
  25.  
  26.         Set de = New dtenvRpt
  27.         Set rptSum.DataSource = de
  28.  
  29.             If recCou = 0 Then
  30.                 MsgBox "No Data. Please check your inputs.", vbOKOnly, "REPORTS"
  31.                 Exit Sub
  32.             Else
  33.                 With rptSum.Sections("pageheader")
  34.                     .Controls("lblPayDateVal").Caption = strTransDate
  35.                 End With
  36.  
  37.                 rptSum.Show
  38.  
  39.                 Err = 0
  40.                 Set de = Nothing
  41.                 Unload dtenvRpt
  42.             End If
  43.  
  44.         CloseConnection
  45.     End If
  46. End Sub
  47.  
I am trying to pass a value to report which is date selected by user but the report is not opening. It gives me error; "failed getting rowset(s) from current data source".

Please guide me, thank you. :)
Sep 13 '11 #1
0 1137

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

Similar topics

10
by: Lakshmi Narayanan.R | last post by:
Hi Experts, Using keyword "To" in select case giving error.The following code is got from www.microsrosoft.com itself. What is the wrong with this?. <% Dim Number1 Number1 = 7 ' Initialize...
1
by: krish_4u_only | last post by:
Hi, I have designed a subreport - record source is on crosstab query. crosstab query is designed on union query. The sub report is working fine when it is opened individually. but if i place it on...
7
by: erin.sebastian | last post by:
Hello Everyone, This is my first attempt at coding using an abstract class and i am getting an error i can't figure out. Here is the back ground. I have a project that contains an abstract...
0
by: trialproduct2004 | last post by:
Hi all i have developed one windows service in c#.net. But when i try to open properties windows of that service throuch service control manager, i am getting following error '...
3
by: ashishg77 | last post by:
Hi I have some business requirement for which i need to format some query which will be something like this SELECT B.D_INCDNT ,B.L_INCDNT_TYP ...
1
by: Rahul Bhate | last post by:
Hello Sir My problem is in dos giving error that javac is not recognised.Tell me the steps for debugging.I have already set the CLASSPTH through command line & also set the PATH.But still giving...
4
by: mukeshrasm | last post by:
<?php // create new document pdf_new(); $pdf = pdf_new(); pdf_open_file($pdf); pdf_begin_page($pdf, 500, 700); // define a font $font = pdf_findfont($pdf, "Courier", "host", 0);
4
by: Abubakar | last post by:
Hi, I'm working on an application whose code was written by some other developer and I dont completely understand its source code right now. In one of the pages where I'm writing a test code, at...
7
gskoli
by: gskoli | last post by:
Error - working in IE and MOzilla but giving error null or not a object: Guys i am giving you snippet of code , where it is javascript digital clock , It is showing time and working properly but...
1
by: vikram k | last post by:
I have SQL serve 2005 running on Win Server 2003 machine. To that, I am issuing a bcp command from my machine which is Win XP SP3. I get the error: SQLState = 08001, NativeError = 21 Error =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.