[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Multiple Reports: Begin-Header not Breaking Properly(Using New-Reports)
- Subject: Re: [sqr-users] Multiple Reports: Begin-Header not Breaking Properly(Using New-Reports)
- From: Don Mellen <donm@ontko.com>
- Date: Tue, 3 Aug 2004 12:18:31 -0500 (EST)
- Delivery-date: Tue, 03 Aug 2004 12:20:47 -0500
- In-reply-to: <1D486AD1E6344B47BF3BAB3094A4373C0B794089@its-mail4.its.corp.gwl.com>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Is the detail wrong or is the heading wrong? It sounds to me like you are
using "&" variables in your heading procedures, but by the time it fires
(the heading fires at new-page and when the report is "closed") those
values are for the *next* key. Try saving the values you use in the
heading to "$" and "#" variables (remember to declare any that are dates)
after the "New-Report". Then use those variables in your heading
procedures instead of the "&" versions.
HTH,
Don
On Tue, 3 Aug 2004, Thompson, Carla wrote:
> SQR/6.2/UNIX Sun/SunOS 5.6/Oracle 8.1.7/Oct 29 2001
>
> We have an SQR Report that generates separate .pdf files for a Group.
> We use New-Report to specify the new report name to be used when the
> Group Number Changes.
>
> I've added "Begin-Header" to create Headers at each page Break, however,
> the reports are not "Breaking" properly. The reports are being
> generated, however, the .pdf file name is for Group #1, and the Detail
> within the report is for Group #2.
>
> I can't figure out how to keep the output file name and internal data
> information in sync.
>
> Suggestions welcomed... code below.
>
> Carla L. Thompson
> E-mail Carla.Thompson@gwl.com
>
> Begin-Program
> Do Get_Group_Level
> End-Program
>
>
> BEGIN-PROCEDURE Get_Group_Level
>
> ! Select Group Level Information
> BEGIN-SELECT DISTINCT
> T_GROUP_EXTRACT_KEY &group_extract_key () on-break print=never
> LET $report_name = '/reports/grp_ins_by_pol_' || &group_number || '_' ||
>datetostr(strtodate(&rpt_end_date,'Month DD, YYYY'),'YYYYMMDD') || '.pdf'
> New-Report $report_name
> Do Get_Detail
> T_GROUP_NUMBER &group_number
> T_GROUP_USER_DESC &group_user_desc
> T_GROUP_POLICY_DATE &group_policy_date
> T_GROUP_DESC &group_desc
> T_RPT_END_DATE &rpt_end_date
> FROM TEMP_INS_TABLE
> END-SELECT
>
> END-PROCEDURE !Get_Group_Level
>
>
> BEGIN-PROCEDURE Get_Detail
>
> LET #tot_death_benefit = 0
> LET #tot_cash_value = 0
> LET #tot_surrender_value = 0
> LET #tot_prem_paid_to_date = 0
>
> BEGIN-SELECT
> ! Select Detail Records for Group and Total Money Fields
> Alter-Printer Font=4 Point-Size=10
> T_CONTRACT &policy_number (+10,5,15)
> T_INSURED_NAME &insured_name (+,69,35)
> T_DEATH_BENEFIT &death_benefit (,248) edit
>9,999,999,999,999.99pf
> LET #tot_death_benefit = #tot_death_benefit + &death_benefit
> T_TOTAL_ACCT_VAL &cash_value (,350) edit
>9,999,999,999,999.99pf
> LET #tot_cash_value = #tot_cash_value + &cash_value
> T_CASH_SURRENDER &surrender_value (,452) edit
>9,999,999,999,999.99pf
> LET #tot_surrender_value = #tot_surrender_value + &surrender_value
> T_TOTAL_DEPOSITS &prem_paid_to_date (,554) edit
>9,999,999,999,999.99pf
> LET #tot_prem_paid_to_date = #tot_prem_paid_to_date + &prem_paid_to_date
> FROM TEMP_INS_TABLE
> WHERE T_GROUP_EXTRACT_KEY = &group_extract_key
> END-SELECT
>
> Do Print_Group_Totals
>
> END-PROCEDURE !Get_Detail
>
> BEGIN-HEADING 216 !Display_Page_Headers
> Do Display_Group
> Do Heading_1
> Do Heading_2
> END-HEADING !Display_Page_Headers
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
-----------------------------------------------------------------------
Donald Mellen | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com | "In the beginning, there was nothing, which exploded"
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users