Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7983607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:00:41+00:00 2026-06-04T11:00:41+00:00

I have a record with several child records on a page. I have a

  • 0

I have a record with several child records on a page. I have a button on the page that triggers a report through XML Publisher via rowset. The problem I am having is the rowset I am passing to the report contains everything in the buffer — I want only the current context to show on the report. What I have right now:

&rs_resp = CreateRowset(Record.AVZ_JD_RESP_TBL);
&rs_expr = CreateRowset(Record.AVZ_JD_EXPR_TBL);
&rs_skls = CreateRowset(Record.AVZ_JD_SKLS_TBL);
&rs_dtl = CreateRowset(Record.AVZ_JD_DTL_TBL, &rs_resp, &rs_expr, &rs_skls   

&RS0 = GetLevel0().GetRow(1).GetRowset(Scroll.AVZ_JD_DTL_TBL);
&RS0.CopyTo(&rs_dtl);

Then I kick off the report:

&oReportDefn.SetRuntimeDataRowset(&rs_dtl);   
&oReportDefn.ProcessReport(&MyTemplate, &LanguageCd, &AsOfDate, &OutFormat);

I was previously using a Rowset.Fill on each of the rowsets (parent and child), but I the copyto method somehow seemed “cleaner” (certainly less code 🙂 ). Is there a way to copy the current context only?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:00:42+00:00Added an answer on June 4, 2026 at 11:00 am

    I think all the rows would have got copied when you perform the rowset copy –

        &RS0.CopyTo(&rs_dtl);

    You can control creating new pages for each row on the report, by using page-break in the for-each loop (that you would be using to traverse through the rowset in the template):
       <?split-by-page-break:?>

    In case you want to print only the latest effdt rows, copy only the latest effdt rows to the &rs_dtl rowset.
    You could do this by first sorting the &RS0 rowset based on the keys using
        &RS0.sort(keyfield1,keyfield2,"A");

    and then loop through the sorted rowset checking for max effdt for a given set of keys.

    Use the insert row function to insert the row into &rs_dtl.
        &rs_dtl.Insertrow(&rownumber);

    Do tell me if this works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that contains a parent record and several children records. There
I have a mysql table that have several records linked to one particular tag.
I have a large disk file (around 8 GB) containing several million records that
I have this query that, due to the number of records, is taking several
I have several web sequential pages which will modify a record and its child
I have a form that I use to display several fields from a record
Each modx_site_content record may have several records in modx_site_tmplvar_contentvalues. I need to retrieve both
I have several records from the DB for a corresponding record in a file.
ihave a simple table that it has some record that There have been several
I have an application that writes several billion records into Cassandra and removes duplicates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.