Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2106

How to pass Date Parameter to SubReport

$
0
0

Hi,

 

In my VB.NET database, I am recording exam results for a class and print a report using Crystal Reports filtered by term periods.

There can be two or more exams per year.

 

Problem is that I cannot find a method to pass date range filter to sub report using report viewer

 

Main report contains the student info selected by StudentID that is passed as a parameter

Sub report contains the exam date and results information.


The exam dates are in tblClassEvent on subreport.


rptViewer.SetParameterValue("theID", m_theID)

 

DateRange is also passed into text fields

 

            Dim sTermPeriod As Object

            Dim sTermDays As Object

            sTermPeriod = rptViewer.ReportDefinition.ReportObjects("txtTermPeriod")

            sTermPeriod.Text = m_strTermStart & "   To: " & m_strTermEnd

            sTermDays = rptViewer.ReportDefinition.ReportObjects("txtTermDays")

            sTermDays.Text = m_iPosAtt

 

 

Please advise on either improving on this approach or provide an alternative more sensible approach

 

All help is appreciated.


Viewing all articles
Browse latest Browse all 2106

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>