Solution: Linked Parameter causes "Operation illegal on linked parameter"

来源:互联网 发布:一号防线监控网络ip 编辑:程序博客网 时间:2024/05/22 15:46

Solution: Linked Parameter causes "Operation illegal on linked parameter"

Dec 22, 2004 03:16 PM|LINK

I was killing myself over this problem, which only appears when you use the "ApplyLogOnInfo" I found out though that Cr.NET thought that the Linked Parameter was an actual parameter and I was trying to set it's value. The problem I had was the linked parameter has the same name as the actual parameter I was using, and I couldn't tell which one was the actual Parameter and which one was the linked one. I looked around and someone suggested using the "If ParameterFields.Item(i).IsLinked = False Then" BUT Cr.NET's IsLinked doesn't work as per the Crystal Website.. they suggest looking for "Pm-" in the parameter name. Maybe I'm doing something wrong, but no linked parameter has PM- in it.. so then I was stuck again.. BUT after a long time of trying everything I tried this: Dim sName As String = oRpt.DataDefinition.ParameterFields.Item(i).PromptText And found out that when the item is a Linked Parameter sName is nothing! YAY! So now I run: If sName is Nothing then 'Parameter is a linked parameter, so do not pass a value to it. Else 'Valid Parameter assign a value to it. End If Fantastic.


Error Information:


How to build relation between master report and sub report:
             

Sub report linked parameter definition:
             


原创粉丝点击