Click to See Complete Forum and Search --> : user-generated reports
osemollie
Aug 11th, 2006, 04:36 AM
Hello,
Am working on a movie rental application in VB6. Am in my final stages of finalising the project. I want to incorporate user-generated reports which can give the user the status of movies in the store at any given time. How can I implement this easily using data from Ms-Access databases? Eg client report, movies in, movies out, movies over due etc.
Thanks
amolt
Aug 14th, 2006, 10:40 AM
Hi,
Hey r u working on web based project or an windows database application??
if u r working on windows database application u can show it in reports after user requests for titles in form or in reports..
Regds,
amolt.
osemollie
Aug 25th, 2006, 04:48 AM
Hi,
Hey r u working on web based project or an windows database application??
if u r working on windows database application u can show it in reports after user requests for titles in form or in reports..
Regds,
amolt.
It is a windows database application. I want to enable my users to add for example, the name and contact details of their organisations into the report before the rest of the report is displayed.
Thanks
osemollie
Aug 25th, 2006, 09:14 AM
Any ideas?
osemollie
Aug 31st, 2006, 11:24 AM
I have managed to create reports using the DataReport control. But the challenge is, assuming that my users want to add their business names/logos in the reports as title headers/footers, how can I allow them to do that?
amolt
Sep 4th, 2006, 01:48 AM
Hey actually i got u r point to some extent,
u need user updatable reports, but if the need is only for names and logos i think u should create field names in ur table tht u want to display and when runtime get the new name from user and update it to that table and though it 's connected with report it'll show the new names.
hope u got wht i want to say...
regs,
amolt
osemollie
Sep 4th, 2006, 02:22 AM
Hey actually i got u r point to some extent,
u need user updatable reports, but if the need is only for names and logos i think u should create field names in ur table tht u want to display and when runtime get the new name from user and update it to that table and though it 's connected with report it'll show the new names.
hope u got wht i want to say...
regs,
amolt
You are right, I need user updatable reports. Eg assuming company XYZ buys my application, when it comes to generating reports, they should be able to customise the reports so that when printed, the reports read XYZ COMPANY, P. O. Box 1234, wherever, in the header and footer slots.
Anyone know how to customise that?
Thanks
soulbriski
Sep 6th, 2006, 04:04 AM
I've written a view 'Dynamic' reports now that allow the end user to specify their own info.
basically, Bind the reports at run time, not design time. by doing this you can make reports very versatile and make them look different on each run or for each user etc. If you wanted the user to have their own company logo's etc, add a RptImage to the report or Page Header and then at runtime, set it to the name of the image that is the logo. The image name will be stored in a field in your database or an ini file or whatever you prefer to provide your customer with
This code is genuine working code from one of my apps
Any variables that are not declared here will have been declared globally (start with 'g') or publicly in this form. This code is fired on a toolbar buttonclick event
I may also have missed some other bits of code out like the line that set the strPDFName variable to something like "001234.pdf", the name of a PDF document that is created if this purchase order was to be emailed
Dim rs As New ADODB.Recordset
Dim rsSuppInfo As ADODB.Recordset
Dim strSQL As String, strSuppInfo As String, strSuppFax As String
Dim strPDFName As String
strSQL = "SHAPE {SELECT * FROM tblPurchaseOrders} APPEND ({SELECT * FROM tblStockPurchaseItems} AS rsPur RELATE PurchaseOrderNumber TO POINumber)"
rs.Open strSQL, cnn1, adOpenKeyset, adLockReadOnly
rs.Filter = "PurchaseOrderNumber=" & glngPOID
Set rsSuppInfo = cnn1.Execute("SELECT SupplierName, SupAddress, supFaxNum FROM tblSuppliers WHERE SupplierID=" & cboSupplier.ItemData(cboSupplier.ListIndex))
With rsSuppInfo
If Not .EOF Then
strSuppInfo = "" & !SupplierName & vbCrLf & !supAddress
strSuppFax = "" & !supFaxNum
End If
End With
Set rsSuppInfo = Nothing
With rptPO2
.Title = strPDFName
Set .DataSource = rs
.DataMember = ""
rs.MoveFirst
.Sections("secPH").Controls("lblPON").Caption = Format(rs!PurchaseOrderNumber, "000000")
With .Sections("secPH").Controls
.Item("lblSuppInfo").Caption = strSuppInfo
.Item("lblDepartment").Caption = rs!DepartmentName
.Item("lblOrderDate").Caption = rs!PODate
.Item("lblOurRef").Caption = rs!poOrderRef
.Item("lblQuoteRef").Caption = rs!POQuoteRef
.Item("lblReqDate").Caption = rs!poDelDate
End With
With .Sections("secDET")
With .Controls
With .Item("txtOrdQty")
.DataMember = "rsPur"
.DataField = "OrdQty"
End With
With .Item("txtDescription")
.DataMember = "rsPur"
.DataField = "Description"
End With
With .Item("txtpoiPartNumber")
.DataMember = "rsPur"
.DataField = "poiPartNumber"
End With
With .Item("txtItemValue")
.DataMember = "rsPur"
.DataField = "ItemValue"
End With
With .Item("txtNotes")
.DataMember = "rsPur"
.DataField = "Notes"
End With
End With
End With
With .Sections("secGRPF")
With .Controls
.Item("lblPONotes").Caption = IIf(rs!poStdMessage = "", "" & rs!PONotes, rs!poStdMessage & vbCrLf & rs!PONotes)
With .Item("fncItemValue")
.DataMember = "rsPur"
.DataField = "ItemValue"
End With
With .Item("txtBuyerName")
.DataMember = ""
.DataField = "BuyerName"
End With
End With
End With
.Refresh
.PrintReport
End With
rs.Close
Set rs = Nothing
Unload rptPO2
Sorry if it appears a bit patchy but i have tried to get just the relevant bits
Hope this helps
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.