|
-
Jun 13th, 2006, 07:09 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] VS 2005 CR11 ParameterFields.
I would like to send my dates(startDate,endDate) to CR from VB.NET but i am getting a problem with showing the report after creating the parameterfileds.
I Add a New Parameter dteStart(no prompting text,type string ).
Ok. from my form i try to pass values to it like this.
VB Code:
rdReport.ParameterFields.Item(1).CurrentValues.Clear()
rdReport.ParameterFields.Item(1).CurrentValues.AddValue(Me.dteStart.txt)
At first i thought it was the way i was passing values to it that kept it prompting me to enter the values,but when i comment the above code, it still prompts me.
What i need to know is the way am creating parameterFields the right way!!
Any Help.
-
Jun 13th, 2006, 08:42 AM
#2
Re: VS 2005 CR11 ParameterFields.
try
VB Code:
rdReport.SetParameterValue("paramnamehere",Me.dteStart.txt)
however is the param itself a date field in CR or text? you may need to cast your text as a date if its a date field (or CR may do it for you.. I can't remember)
-
Jun 13th, 2006, 09:01 AM
#3
Lively Member
Re: VS 2005 CR11 ParameterFields.
 Originally Posted by kleinma
try
VB Code:
rdReport.SetParameterValue("paramnamehere",Me.dteStart.txt)
however is the param itself a date field in CR or text? you may need to cast your text as a date if its a date field (or CR may do it for you.. I can't remember)
CR datatypes are explicit. It wants exactly what it expects. I'd cast a date as a string and make the parameter a string type if it's not used for anything just to keep it simple.
Energy can be neither created not destroyed. It can only be wasted.
Red Green
-
Jun 13th, 2006, 09:01 AM
#4
Thread Starter
Hyperactive Member
Re: VS 2005 CR11 ParameterFields.
It pops up a dialogbox telling me to enter a value for the parameter dteStart.
let the value be a simple text.
-
Jun 13th, 2006, 12:11 PM
#5
Lively Member
Re: VS 2005 CR11 ParameterFields.
 Originally Posted by maps
It pops up a dialogbox telling me to enter a value for the parameter dteStart.
let the value be a simple text.
OK then. How about trying:
rdReport.ParameterFields.GetItemByName("PARAM_NAME").AddCurrentValue cstr(dteStart.txt)
Thats the method I use, but I haven't looked at version XI yet.
HTH
Energy can be neither created not destroyed. It can only be wasted.
Red Green
-
Jun 14th, 2006, 01:39 AM
#6
Thread Starter
Hyperactive Member
Re: VS 2005 CR11 ParameterFields.
Ohhh Sorry, i think i mis-informed you. I think i am looking at passing a value to an unbound text field on CR.
The problem VS 2005 comes with CR 10, but since i have CR XI, i create my reports out of VS IDE and just add them to my project. Unlike in the CR Designer, in the IDE "unbound Fields" group is present.so from there i can drag an unbound string and drop it to my Report.
so now i am looking for a way of passing a value to an unbound field from a textbox on my form.
Any Idea?
-
Jun 14th, 2006, 03:03 AM
#7
Thread Starter
Hyperactive Member
Re: VS 2005 CR11 ParameterFields.
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
|