|
-
Jan 11th, 2004, 09:59 PM
#1
Thread Starter
Hyperactive Member
Parameters
I am relatively new to vb .net and crystal reports. I have developed some reports in crystal reports by using both the wizards and by manually creating them. I am interested now in passing parameters from a user interface (combo boxes, text boxes) to the reports and viewing them through the report viewer. Do you have to use unbound fields, or parameter fields? and how to you pass values to the report and refresh it? I could use some help finding a starting point.
-
Jan 12th, 2004, 09:39 AM
#2
PowerPoster
You have a few options.
The easiest is to use a selection statement when you invoke the report:
Report.RecordSelectionFormula = "{BOLHeader.BOL} = " & CLng(glbProductNumber)
Another option is to set up parameters and set the value when you run the report:
Report.ParameterFields.Item(1).AddCurrentValue glbReply2
The other option is to just ask for the parameter value as part of the report. That si VB calls up the report and the report requests the papramter value.
I hope this is what you are looking for.
-
Jan 12th, 2004, 12:22 PM
#3
Thread Starter
Hyperactive Member
Yes, that does help. Thank you.
Can you also "push" data onto a report that is already created (one that has field names instead of parameter or unbound fields) by changing the dataset? In other words, if I have created a report using a database and tables, can I somehow change the dataset at run time, as long as the table defs and field defs are the same? Please let me know if this makes any sense?!?
-
Jan 12th, 2004, 12:35 PM
#4
PowerPoster
I believe you can, although I've never done it. What I tend to do is create a temporary db structure and base the report on it. Then, my VB app manipulates the necessary data and places it in this reporting structure. In that way, I can do anything I want (with the VB) and the report doesn't need to be changed.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|