I've seen postings before showing users how to set the range but I'm
still not able to get it working locally.
I have a report with one range and nothing else, it's a date range, I
need to set it and have Crystal restrict the records being displayed
on the report. It sounds simple but I can't get it working. I've
referred to CrystalDecision s and the example is written in VB.NET,
still not working...pleas e help.
The report is displayed from a CrystalReportVi ewer and is bound to a
dataset, the entire table contents. Since ASP.NET doesn't launch a
range prompt like the Windows.Forms does I understand I need to do
this programmaticall y. I've added two calendar web form objects to the
..aspx file for a start and end date, I added a submit button to
"refresh" the report after setting the Start and End dates in my
ParameterRangeV alue. I've included the following code which should be
usable in the Page_Load and Refresh_Click methods.
Most of this code is right from Crystal except for the .Clear(),
..SetDataSource () and the .RefreshReport( ).
ReportsOverView All cdReport = new ReportsOverView All();
pfdsDateRange = cdReport.DataDe finition.Parame terFields;
pfdDateRange = pfdsDateRange["cpDateRang e"];
prvDateRange.St artValue = calBeginDate.Se lectedDate;
prvDateRange.En dValue = calEndDate.Sele ctedDate;
prvDateRange.Lo werBoundType = RangeBoundType. BoundInclusive;
prvDateRange.Up perBoundType = RangeBoundType. BoundInclusive;
pvsDateRange = pfdDateRange.Cu rrentValues;
pvsDateRange.Cl ear();
pvsDateRange.Ad d(prvDateRange) ;
pfdDateRange.Ap plyCurrentValue s(pvsDateRange) ;
cdReport.SetDat aSource(dsEvals All1);
crvReportsOverv iewAll.ReportSo urce = cdReport;
crvReportsOverv iewAll.RefreshR eport();
thanks Rick
still not able to get it working locally.
I have a report with one range and nothing else, it's a date range, I
need to set it and have Crystal restrict the records being displayed
on the report. It sounds simple but I can't get it working. I've
referred to CrystalDecision s and the example is written in VB.NET,
still not working...pleas e help.
The report is displayed from a CrystalReportVi ewer and is bound to a
dataset, the entire table contents. Since ASP.NET doesn't launch a
range prompt like the Windows.Forms does I understand I need to do
this programmaticall y. I've added two calendar web form objects to the
..aspx file for a start and end date, I added a submit button to
"refresh" the report after setting the Start and End dates in my
ParameterRangeV alue. I've included the following code which should be
usable in the Page_Load and Refresh_Click methods.
Most of this code is right from Crystal except for the .Clear(),
..SetDataSource () and the .RefreshReport( ).
ReportsOverView All cdReport = new ReportsOverView All();
pfdsDateRange = cdReport.DataDe finition.Parame terFields;
pfdDateRange = pfdsDateRange["cpDateRang e"];
prvDateRange.St artValue = calBeginDate.Se lectedDate;
prvDateRange.En dValue = calEndDate.Sele ctedDate;
prvDateRange.Lo werBoundType = RangeBoundType. BoundInclusive;
prvDateRange.Up perBoundType = RangeBoundType. BoundInclusive;
pvsDateRange = pfdDateRange.Cu rrentValues;
pvsDateRange.Cl ear();
pvsDateRange.Ad d(prvDateRange) ;
pfdDateRange.Ap plyCurrentValue s(pvsDateRange) ;
cdReport.SetDat aSource(dsEvals All1);
crvReportsOverv iewAll.ReportSo urce = cdReport;
crvReportsOverv iewAll.RefreshR eport();
thanks Rick