Results 1 to 8 of 8

Thread: user-generated reports

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    475

    user-generated reports

    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

  2. #2
    Lively Member amolt's Avatar
    Join Date
    Aug 2006
    Location
    INDIA
    Posts
    80

    Re: user-generated reports

    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.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    475

    Re: user-generated reports

    Quote Originally Posted by amolt
    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

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    475

    Re: user-generated reports

    Any ideas?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    475

    Re: user-generated reports

    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?

  6. #6
    Lively Member amolt's Avatar
    Join Date
    Aug 2006
    Location
    INDIA
    Posts
    80

    Thumbs up Re: user-generated reports

    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

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    May 2006
    Posts
    475

    Re: user-generated reports

    Quote Originally Posted by amolt
    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

  8. #8
    New Member soulbriski's Avatar
    Join Date
    Jul 2006
    Location
    Manchester
    Posts
    6

    Re: user-generated reports

    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


    VB Code:
    1. Dim rs As New ADODB.Recordset
    2. Dim rsSuppInfo As ADODB.Recordset
    3. Dim strSQL As String, strSuppInfo As String, strSuppFax As String
    4. Dim strPDFName As String
    5.  
    6. strSQL = "SHAPE  {SELECT * FROM tblPurchaseOrders} APPEND ({SELECT * FROM tblStockPurchaseItems} AS rsPur RELATE PurchaseOrderNumber TO POINumber)"
    7.  
    8. rs.Open strSQL, cnn1, adOpenKeyset, adLockReadOnly
    9. rs.Filter = "PurchaseOrderNumber=" & glngPOID
    10.        
    11. Set rsSuppInfo = cnn1.Execute("SELECT SupplierName, SupAddress, supFaxNum FROM tblSuppliers WHERE SupplierID=" & cboSupplier.ItemData(cboSupplier.ListIndex))
    12.  
    13. With rsSuppInfo
    14.     If Not .EOF Then
    15.         strSuppInfo = "" & !SupplierName & vbCrLf & !supAddress
    16.         strSuppFax = "" & !supFaxNum
    17.     End If
    18. End With
    19.  
    20. Set rsSuppInfo = Nothing
    21.  
    22. With rptPO2
    23.     .Title = strPDFName
    24.     Set .DataSource = rs
    25.     .DataMember = ""
    26.     rs.MoveFirst
    27.     .Sections("secPH").Controls("lblPON").Caption = Format(rs!PurchaseOrderNumber, "000000")
    28.  
    29.     With .Sections("secPH").Controls
    30.         .Item("lblSuppInfo").Caption = strSuppInfo
    31.         .Item("lblDepartment").Caption = rs!DepartmentName
    32.         .Item("lblOrderDate").Caption = rs!PODate
    33.         .Item("lblOurRef").Caption = rs!poOrderRef
    34.         .Item("lblQuoteRef").Caption = rs!POQuoteRef
    35.         .Item("lblReqDate").Caption = rs!poDelDate
    36.     End With
    37.    
    38.     With .Sections("secDET")
    39.         With .Controls
    40.             With .Item("txtOrdQty")
    41.                 .DataMember = "rsPur"
    42.                 .DataField = "OrdQty"
    43.             End With
    44.             With .Item("txtDescription")
    45.                 .DataMember = "rsPur"
    46.                 .DataField = "Description"
    47.             End With
    48.             With .Item("txtpoiPartNumber")
    49.                 .DataMember = "rsPur"
    50.                 .DataField = "poiPartNumber"
    51.             End With
    52.             With .Item("txtItemValue")
    53.                 .DataMember = "rsPur"
    54.                 .DataField = "ItemValue"
    55.             End With
    56.             With .Item("txtNotes")
    57.                 .DataMember = "rsPur"
    58.                 .DataField = "Notes"
    59.             End With
    60.         End With
    61.     End With
    62.            
    63.     With .Sections("secGRPF")
    64.         With .Controls
    65.             .Item("lblPONotes").Caption = IIf(rs!poStdMessage = "", "" & rs!PONotes, rs!poStdMessage & vbCrLf & rs!PONotes)
    66.             With .Item("fncItemValue")
    67.                 .DataMember = "rsPur"
    68.                 .DataField = "ItemValue"
    69.             End With
    70.             With .Item("txtBuyerName")
    71.                 .DataMember = ""
    72.                 .DataField = "BuyerName"
    73.             End With
    74.         End With
    75.     End With
    76.  
    77.     .Refresh
    78.     .PrintReport
    79. End With
    80.  
    81. rs.Close
    82. Set rs = Nothing
    83.  
    84. Unload rptPO2

    Sorry if it appears a bit patchy but i have tried to get just the relevant bits

    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width