Results 1 to 4 of 4

Thread: cr help

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    cr help

    i am using vb.net with cr 8.0

    i have inserted the cr viewer in form 10 but i need the value from the textbox1 of form7 plz tell me how to get that , i need to insert it inti the record selection formula.
    VB Code:
    1. Dim oapp As CRAXDRT.Application
    2. Dim rpt As CRAXDRT.Report
    3.  
    4. Set oapp = New CRAXDRT.Application
    5. cr1.ReportSource = rpt
    6.  
    7. rpt.RecordSelectionFormula = "{DATA2.gba}=" & val(Form7.Textbox1.Text) & ""

    i have a combobox which on load of the form takes the values from the database table now waht i want is that if i press any alphabet say "k" then combobox must open and all the values in the combo box starting with k must be shown
    Using VB.NET 2003/.NET 1.1

    If you found a post useful then please Rate it!
    Please mark you thread resolved using the Thread Tools above

  2. #2
    Addicted Member
    Join Date
    Sep 2006
    Location
    Surabaya, Indonesia
    Posts
    163

    Re: cr help

    I suggest you learn how to communicate within forms. Some users in this forum have the link on their signature.

    [code]rpt.RecordSelectionFormula = "{DATA2.gba}=" & val(Form7.Textbox1.Text) & ""[code]
    Form7 is an object. To use an object, you have to set a reference on it. What object did you use to declare as Form7 ? Also, you should modify it's access modifier to public (don't use dim or private)

    Ex. If you have
    VB Code:
    1. Public frm7 as New Form7

    You can access all frm7 objects like this:
    VB Code:
    1. frm7.textbox1.text

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Re: cr help

    Quote Originally Posted by michaelrawi
    I suggest you learn how to communicate within forms. Some users in this forum have the link on their signature.

    [code]rpt.RecordSelectionFormula = "{DATA2.gba}=" & val(Form7.Textbox1.Text) & ""[code]
    Form7 is an object. To use an object, you have to set a reference on it. What object did you use to declare as Form7 ? Also, you should modify it's access modifier to public (don't use dim or private)

    Ex. If you have
    VB Code:
    1. Public frm7 as New Form7

    You can access all frm7 objects like this:
    VB Code:
    1. frm7.textbox1.text

    i dont know y but it does not carries the value of text box with it
    Using VB.NET 2003/.NET 1.1

    If you found a post useful then please Rate it!
    Please mark you thread resolved using the Thread Tools above

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: cr help

    Depending on the version of VB you have, 9.0 comes with Pro and above.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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