Crosstable column cannot be assigned as a target of dbr.report

(2 posts) (2 voices)

Tags:

No tags yet.

  1. jasmondluk, Member

    Hi,

    I am trying to achieve when user click on the number in the table, it will popup the details. Hence I tried to add the following line

    select 'dbr.report', 'sp_DBR_teacher_student_class_count_details','[Payment/Revenue month 月份]','popup', 'Center=(Center)';

    However I got the error "Crosstable column cannot be assigned as a target of dbr.report".

    May I know how can I resolve this?

    Thanks.

    select 'dbr.export.options', 'orientation', 'landscape';

    select 'DBR.text' as 'DBR.text', 'Eye Level ELITE - Laguna City' as 'group_concat( centername )';

    select 'dbr.text', 'From: 2022-05-01 to 2022-07-31';
    select 'dbr.text', 'Actual Class Date 按上課日子';
    select 'dbr.text', '1 - Total revenue corresponding to the classes within the months(s) 當月課堂所計算盈利';
    select 'dbr.text', '2 - Total paid revenue corresponding to the classes within the months(s) 當月課堂所計算盈利(只包括已繳款發票)';
    select 'dbr.text', '3 - Total payment received within the month(s) 當月收款';
    select 'dbr.text', ' ';

    select 'dbr.search', 1;

    select 'dbr.subtitle', 'Monthly Revenue/Payment received 每月盈利/收款';

    select 'dbr.crosstab', 'Payment/Revenue month 月份';
    select 'dbr.hsum', '[value]';

    select 'dbr.colstyle', '[value]', '[white-space:pre; width:1000]';
    select 'dbr.colstyle', 'Type 類別', '[white-space:nowrap]';

    select '1 - Revenue 盈利 (All invoice 全部發票)' as 'Type 類別', '2022-05' as 'Payment/Revenue month 月份', 226666.5 as '[value]'
    union all
    select '2 - Revenue 盈利 (Paid invoice only 只包括已繳款發票)', '2022-05', 226191.5
    union all
    select '3 - Payment received 收款 ', '2022-05', 239395.0
    union all
    select '1 - Revenue 盈利 (All invoice 全部發票)', '2022-06', 204040.5
    union all
    select '2 - Revenue 盈利 (Paid invoice only 只包括已繳款發票)', '2022-06', 201940.5
    union all
    select '3 - Payment received 收款 ', '2022-06', 202795.5
    union all
    select '1 - Revenue 盈利 (All invoice 全部發票)', '2022-07', 217884.5
    union all
    select '2 - Revenue 盈利 (Paid invoice only 只包括已繳款發票)', '2022-07', 199622.0
    union all
    select '3 - Payment received 收款 ', '2022-07', 128669.0;

  2. myDBR Team, Key Master

    The error "Crosstable column cannot be assigned as a target of dbr.report" means that you are trying to assign a report to a crosstab column (month) that is a header column.

    Assign the column into he data itself (in your case the value-column). You can then use the momth column as a key to the click (which month's data is to be shown).

    As an example if you want to attach a popup report to each of the numbers in the table, you assign the report to the value-column and can use the month-column as a parameter to the report.

    select 'dbr.report', 'sp_DBR_drilldown_to_a_month', '[value]', 'popup', 'inMonth=month';
    
    select '1 - Revenue 盈利 (All invoice 全部發票)' as 'Type 類別', '2022-05' as 'Payment/Revenue month 月份[month]', 226666.5 as '[value]';

    --
    myDBR Team


Reply

You must log in to post.