CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 22nd, 2005, 09:18 AM
    Nickoteen Nickoteen is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 16
    Nickoteen is an unknown quantity at this point (<10)
    And yet another parameter field problem

    Hiya, again

    Let's try and find a solution to this one:

    I have a report (CR 8.0) and it works just fine. It's called from within a VB project. Now, the thing that troubles me is this:

    In the report, I created a parameter field called "Selection" and under Edit parameter field -> set default values I enter my default values ( 4 of them to be exact ). Now, in VB, I created 4 checkboxes, called Option1 thru Option 4. Whenever I click on any of these boxes (If chkbox1.value = vbChecked ) a string variable gets a value equal to the default values entered in the Parameter field default values section, and what it does, it allows me to control the Reports selection criteria ( select expert: {SpPrintQuery.Code1} = {?@Selection} ). Now, it all works fine except for one minor detail:

    Since the report will generate data in correspondence with the values specified within the parameter field ( and there are none specified until I check one of the chkboxes ), first time generated, the report comes up empty.


    This is the code I use ( and was written by someone else working here before me ), to generate the report for the first time:

    Sirovine = "010"
    Ambalaza = "100"
    Energija = "110"
    Rsnaga = "230"

    Report.ParameterFields(4).AddCurrentValue Sirovine
    Report.ParameterFields(4).AddCurrentValue Ambalaza
    Report.ParameterFields(4).AddCurrentValue Energija
    Report.ParameterFields(4).AddCurrentValue Rsnaga

    CRViewer1.ReportSource = Report
    CRViewer1.ViewReport

    Is there some simple solution to avoid ( deactivate, bypass or something ) the parameter field when the report comes up, and then later trigger it somehow ?

    Uhf, I hope u can make some sence out of all this .. Thnx!
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 10:04 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009