/// <summary> /// Handles the OpeningRecordSet event of the innerReport control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> protected void innerReport_OpeningRecordSet(object sender, OpeningRecordSetEventArgs e) { RecordIndex++; UpdateProgress("Processing..."); int?personId = null; int groupId = 0; personId = e.LayoutWriter.RecordSets.Current["PersonId"].ToString().AsIntegerOrNull(); groupId = e.LayoutWriter.RecordSets.Current["GroupId"].ToString().AsInteger(); string uriParam; if (personId.HasValue) { uriParam = string.Format("api/FinancialTransactions/GetContributionTransactions/{0}/{1}", groupId, personId); } else { uriParam = string.Format("api/FinancialTransactions/GetContributionTransactions/{0}", groupId); } DataSet transactionsDataSet = _rockRestClient.PostDataWithResult <object, DataSet>(uriParam, _contributionStatementOptionsREST); _transactionsDataTable = transactionsDataSet.Tables[0]; e.RecordSet = new DataTableRecordSet(_transactionsDataTable); }
/// <summary> /// Handles the OpeningRecordSet event of the orgInfoQuery control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> protected void orgInfoQuery_OpeningRecordSet(object sender, OpeningRecordSetEventArgs e) { // everytime the OrgInfoSubReport is called, just give it a one row dataset with a Location object List <Rock.Client.Location> orgInfoList = new List <Rock.Client.Location>(); orgInfoList.Add(_organizationAddressLocation); e.RecordSet = new EnumerableRecordSet(orgInfoList); }
/// <summary> /// Handles the OpeningRecordSet event of the query control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> protected void mainQuery_OpeningRecordSet(object sender, OpeningRecordSetEventArgs e) { e.RecordSet = new DataTableRecordSet(_personGroupAddressDataTable); SubReport innerReport = e.LayoutWriter.DocumentLayout.GetReportElementById("InnerReport") as SubReport; if (innerReport == null) { throw new MissingReportElementException("Report requires a QueryElement named 'InnerReport'"); } innerReport.Query.OpeningRecordSet += innerReport_OpeningRecordSet; }
/// <summary> /// Handles the OpeningRecordSet event of the transactionDetailReport control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> public void transactionDetailReport_OpeningRecordSet( object sender, OpeningRecordSetEventArgs e ) { var detailsDataSet = e.LayoutWriter.RecordSets.Current["Details"] as DataTable; e.RecordSet = new DataTableRecordSet( detailsDataSet ); }
/// <summary> /// Handles the OpeningRecordSet event of the innerReport control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> protected void innerReport_OpeningRecordSet( object sender, OpeningRecordSetEventArgs e ) { RecordIndex++; UpdateProgress( "Processing..." ); int? personId = null; int groupId = 0; personId = e.LayoutWriter.RecordSets.Current["PersonId"].ToString().AsIntegerOrNull(); groupId = e.LayoutWriter.RecordSets.Current["GroupId"].ToString().AsInteger(); string uriParam; if ( personId.HasValue ) { uriParam = string.Format( "api/FinancialTransactions/GetContributionTransactions/{0}/{1}", groupId, personId ); } else { uriParam = string.Format( "api/FinancialTransactions/GetContributionTransactions/{0}", groupId ); } DataSet transactionsDataSet = _rockRestClient.PostDataWithResult<Rock.Net.RestParameters.ContributionStatementOptions, DataSet>( uriParam, _contributionStatementOptionsREST ); _transactionsDataTable = transactionsDataSet.Tables[0]; e.RecordSet = new DataTableRecordSet( _transactionsDataTable ); }
/// <summary> /// Handles the OpeningRecordSet event of the query control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> protected void mainQuery_OpeningRecordSet( object sender, OpeningRecordSetEventArgs e ) { e.RecordSet = new DataTableRecordSet( _personGroupAddressDataTable ); SubReport innerReport = e.LayoutWriter.DocumentLayout.GetReportElementById( "InnerReport" ) as SubReport; if ( innerReport == null ) { throw new MissingReportElementException( "Report requires a QueryElement named 'InnerReport'" ); } innerReport.Query.OpeningRecordSet += innerReport_OpeningRecordSet; // Transaction Detail (Accounts Breakout) SubReport transactionDetailReport = e.LayoutWriter.DocumentLayout.GetReportElementById( "TransactionDetailReport" ) as SubReport; if ( transactionDetailReport == null ) { throw new MissingReportElementException( "Report requires a QueryElement named 'TransactionDetailReport'" ); } transactionDetailReport.Query.OpeningRecordSet += transactionDetailReport_OpeningRecordSet; }
/// <summary> /// Handles the OpeningRecordSet event of the orgInfoQuery control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> protected void orgInfoQuery_OpeningRecordSet( object sender, OpeningRecordSetEventArgs e ) { // everytime the OrgInfoSubReport is called, just give it a one row dataset with a Location object List<Rock.Client.Location> orgInfoList = new List<Rock.Client.Location>(); orgInfoList.Add( _organizationAddressLocation ); e.RecordSet = new EnumerableRecordSet( orgInfoList ); }
/// <summary> /// Handles the OpeningRecordSet event of the transactionDetailReport control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="OpeningRecordSetEventArgs"/> instance containing the event data.</param> public void transactionDetailReport_OpeningRecordSet(object sender, OpeningRecordSetEventArgs e) { var detailsDataSet = e.LayoutWriter.RecordSets.Current["Details"] as DataTable; e.RecordSet = new DataTableRecordSet(detailsDataSet); }