Click here to Skip to main content
15,891,951 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: ajax controls Pin
Yusuf8-Apr-09 5:36
Yusuf8-Apr-09 5:36 
GeneralRe: ajax controls Pin
Abhijit Jana8-Apr-09 5:37
professionalAbhijit Jana8-Apr-09 5:37 
QuestionHow to remove assciation of .Net 2008 Web page application from VSS Pin
nilam24778-Apr-09 0:53
nilam24778-Apr-09 0:53 
AnswerRe: How to remove assciation of .Net 2008 Web page application from VSS Pin
VijayVishwakarma8-Apr-09 1:06
VijayVishwakarma8-Apr-09 1:06 
AnswerRe: How to remove assciation of .Net 2008 Web page application from VSS Pin
Abhijit Jana8-Apr-09 1:18
professionalAbhijit Jana8-Apr-09 1:18 
QuestionRe: How to remove assciation of .Net 2008 Web page application from VSS Pin
nilam24778-Apr-09 2:51
nilam24778-Apr-09 2:51 
AnswerRe: How to remove assciation of .Net 2008 Web page application from VSS Pin
Abhijit Jana8-Apr-09 3:58
professionalAbhijit Jana8-Apr-09 3:58 
Questionmissing parameter valeus error in crstal report with asp.net Pin
dineshmvpa8-Apr-09 0:50
dineshmvpa8-Apr-09 0:50 
Hi
i am using crystal report 10 in my asp.net2005 application.
my crystal report file contains multiple sub reports, all are designed using <i>command</i> .
my problems is, when generating the report from my asp.net web application ,i am getting one error message saying 'missing parameter values'
the report will work fine if there is no sub report.
also this will work if the database name is same as the one which used at the time of report design.Its troubling me only when the dtabase name is different.

i searched in different forum but i didnt get a solution for my problem.
Even one earlier message related the same issue in code project also not working in my case


Please anybody can give me some hint.

my code is as below

Dim repdoc As New ReportDocument
    Dim coninfo As New ConnectionInfo
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            repdoc.Load(Server.MapPath("Reports\CrPatSummRpt.rpt"))
            'Connection details:database name,username, password
            coninfo.ServerName = "Server"
            coninfo.DatabaseName = "TDB"
            coninfo.UserID = "sa"
            coninfo.Password = "sa"
            fnSetLogonInfoSubreport(coninfo, repdoc)
            fnSetLogonInfo(coninfo, repdoc)
            'Setting parameter which are passring fronm code behind to crystal report
            fnSetReportParameters()
            'Binding report
           'assigning report document to report viwer control
            crPatSummRpt.ReportSource = repdoc
        Catch ex As Exception

        End Try
End Sub


 Private Sub fnSetLogonInfo(ByVal subConinfo As ConnectionInfo, ByRef m_reportDoc As ReportDocument)
        Try
            Dim tblLogonInfos As New TableLogOnInfos
            Dim tabs As Tables = repdoc.Database.Tables
            For Each tab As Table In tabs
                Dim logininfo As TableLogOnInfo = tab.LogOnInfo
                logininfo.ConnectionInfo = coninfo
            Next
        Catch ex As Exception
        End Try
    End Sub

    Private Sub fnSetLogonInfoSubreport(ByVal subConinfo As ConnectionInfo, ByVal _reportDoc As ReportDocument)
        Dim sects As Sections = m_reportDoc.ReportDefinition.Sections
        For Each sect As Section In sects
            Dim repObjects As ReportObjects = sect.ReportObjects
            For Each repObject As ReportObject In repObjects

                If repObject.Kind = ReportObjectKind.SubreportObject Then
                    Dim subRepObj As SubreportObject = repObject
                    Dim subRep As ReportDocument = subRepObj.OpenSubreport(subRepObj.SubreportName)
                    fnSetLogonInfo(subConinfo, subRep)
                    subRep.VerifyDatabase()
                End If
            Next

        Next
    End Sub
 Private Sub fnSetReportParameters()
        ' all the parameter fields will be added to this collection 
        Dim paramFields As ParameterFields = New ParameterFields()
        ' the parameter fields to be sent to the report 
        Dim pfpatId As ParameterField = New ParameterField()
        Dim pfidSumm As ParameterField = New ParameterField()
        Dim pfOffID As ParameterField = New ParameterField()
Dim dcPatId As ParameterDiscreteValue = New ParameterDiscreteValue()
        Dim dcIDSumm As ParameterDiscreteValue = New ParameterDiscreteValue()
        Dim dcOffID As ParameterDiscreteValue = New ParameterDiscreteValue()

        pfpatId.ParameterFieldName = "PatId"
        pfidSumm.ParameterFieldName = "IdSumm"
        pfOffID.ParameterFieldName = "officeId"
        dcPatId.Value = 155
        dcIDSumm.Value = 897
        dcOffID.Value = 1
        pfpatId.CurrentValues.Add(dcPatId)
        pfidSumm.CurrentValues.Add(dcIDSumm)
        pfOffID.CurrentValues.Add(dcOffID)

        paramFields.Add(pfpatId)
        paramFields.Add(pfidSumm)
        paramFields.Add(pfOffID)
       crPatSummRpt.ParameterFieldInfo = paramFields
end sub


Thanks in advance
Questiondisplay images from Oracle Blob field. Pin
vkumar098-Apr-09 0:08
vkumar098-Apr-09 0:08 
QuestionAccessing the datalist list values on selection Pin
desireddyravi7-Apr-09 23:42
desireddyravi7-Apr-09 23:42 
Questiontreeview problems Pin
roshid7-Apr-09 23:26
roshid7-Apr-09 23:26 
GeneralError creating System.Type from System.Int32 Pin
Brady Kelly7-Apr-09 23:24
Brady Kelly7-Apr-09 23:24 
QuestionTinymce Editor Pin
decontrol7-Apr-09 23:02
decontrol7-Apr-09 23:02 
QuestionWeb User Controls Pin
Hristiyan7-Apr-09 22:33
Hristiyan7-Apr-09 22:33 
QuestionWhy javascript error showing only in IE not in Firefox Pin
meeram3957-Apr-09 22:26
meeram3957-Apr-09 22:26 
AnswerRe: Why javascript error showing only in IE not in Firefox Pin
Alok Sharma ji7-Apr-09 22:40
Alok Sharma ji7-Apr-09 22:40 
Questionspecial characters Pin
venu6567-Apr-09 22:24
venu6567-Apr-09 22:24 
QuestionCOM Dll working with window app, but not with ASP.NET Pin
puneet_shadija7-Apr-09 21:47
puneet_shadija7-Apr-09 21:47 
QuestionAdd problem of HttpCookie Pin
gopinathtamil7-Apr-09 21:37
gopinathtamil7-Apr-09 21:37 
AnswerRe: Add problem of HttpCookie Pin
Rajeesh MP8-Apr-09 2:06
Rajeesh MP8-Apr-09 2:06 
Questionpaging? Pin
Karthick_gc7-Apr-09 21:33
Karthick_gc7-Apr-09 21:33 
AnswerRe: paging? Pin
Alok Sharma ji8-Apr-09 0:31
Alok Sharma ji8-Apr-09 0:31 
AnswerRe: paging? Pin
kishorgh8-Apr-09 20:44
kishorgh8-Apr-09 20:44 
Questiontrigger event for nonalphanumeric keys Pin
billcodes7-Apr-09 20:39
billcodes7-Apr-09 20:39 
AnswerRe: trigger event for nonalphanumeric keys Pin
Abhijit Jana7-Apr-09 20:45
professionalAbhijit Jana7-Apr-09 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.