| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|