I'm going to dazzle you with my technical prowess here ...
It's an ActiveReport ... it just prints/outputs the data ... (yeah, profound right? haha).
My knowledge is limited to the fact that you just kind of point/link the field(s) in the report design to the appropriate field in the database...
In my COMPARE_REC table on the SQL Server side there are 5 records.
The reports should resemble (these figures obviously don't add-up) :
Dept FY04XP FY05XP FY06XP
ABC 123.45 234.56 345.67
BCD 456.78 567.89...
I have only 5 records in my table but when I run the following code below (without) the loop, it prints only the first record in the table and with the loop it prints only the last record in my table to the report.
How can I move through (print) all the records in my table to my report...
Thanks for your responses ... I just got back from my vacation last night (5/25 - 6/2 - as you can image I'm exhausted ... not that anyone cares!).
In any case, Jerry's explanation is correct ... the problem is that there will be multiple records that do have the same remark (my search field)...
Thanks Bob for responding.
Unfortunately it didn't work - the list is still blank. I'm sure I messed up something.
Private Sub List1_Click()
Dim Template As String
Template = "[ERemark] = '" & List1.List(List1.ListIndex) & "'"
rs.Filter Template
'With List1
'rs.Filter = "[ERemark] = '" &...
I'm trying to extract the info from the SQL server. The query on the SQL side is kind of huge so here's a small piece of it:
SELECT
dbo.ALLOCATED.*, dbo.OBLandEXPD.*,
dbo.ALLOCATED.SumOfASal * .4344 AS SE_ASal,
dbo.ALLOCATED.SumOfASal * .5656 AS RE_ASal,
dbo.ALLOCATED.SumOfAAwd * .4344 AS...
I have multiple records grouped by Branch which rolls all records in the "View table" up into 5 records(again grouped by Branch).
When I used the DAO control I was able to generate one report with all 5 branches (on separate pages) with:
Private Sub ghBranch_Format()
ghBranch.NewPage =...
I hope I can explain the issue I'm having suffiently ... in any case here it is:
I connected to the SQL server successfully but I'm having problems generating my reports anyway. And I suspect it's due to the & "" below ... but if I remove them I get an error too.
Field1.DataValue =...
How can I find a record in a recordset (connected to the SQL Server via code)
I modified my code to look like:
Private Sub List1_Click()
Dim Template As String
Template = "[ERemark] = " & Chr$(34) & List1.List(List1.ListIndex) & Chr$(34)
rs.Find Template
End Sub
Result: the list was blank...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.