Hello,
I'm very new to Crystal reports and currently have faced the following problems. I would much appreciate if someone helps, because googling didn't open my eyes.
Firstly, my task is to have buttons that increase/decrease decimals on reports.
I have implemented the following:
GetFieldObject to process like this:
ReportDocumentTypeOfReport rep= crystalReportViewer_.ReportSource as ReportDocumentTypeOfReport;
(
FieldObject)rep.ReportDefinition.Sections[
"DetailSection1"].ReportObjects[
"PortRetD1"].NumberFormat.DecimalPlaces = 10;
Change numberFormat for it, then refresh like:
crystalReportViewer_.ReportSource = rep;
Everything worked like a clock!
The problems started with SubReports.
If i have a subreport within my report (some of its data including numbers is shown when main report is shown). When i access subreports fields and change numberformat:
ReportDocument irscrReport = report.
Subreports[
"IRCSRReport"];
(FieldObject)irscrReport.ReportDefinition.Sections["DetailSection1"].ReportObjects["P"].NumberFormat....
(and refresh) nothing happens. When i go to that subreport, i can see that the decimals actually increased. But still no changes on the main report.
Is there a way to refresh subreport?
Also, I have not found a way to determine if i'm in a subreport to select it after i change decimals, because right now i'm switched to the main report.
Any help is MUCH appreciated (the deadline for the task is close).
Marina