Difficulty with Subreports in C1Report Winforms.

Originally Posted 2 August 2017, 11:12 pm EST

  • Originally Posted 2 August 2017, 11:12 pm EST

    I have the need to create a P/L sheet based on a summarization provided in a dataset attached to the report (we use VistaDB and you still don't directly support it).

    The dataset has one datatable in it. It looks like this:

    Seq Type Account Amount AcctSer AcctParentSer Level
    30000000 Income Revenues 51029.4849 1 NULL 1
    30100000 Income Stud Fees 58337.9063 2 1 2
    30200000 Income Puppy Sales 467321.9699 3 1 2
    40000000 Expense Expenses 51910.6628 4 NULL 1
    40100000 Expense Puppy Shots 51647.5303 5 4 2
    40200000 Expense Food 51351.3361 6 4 2
    40300000 Expense Medical 0 10 4 2
    40301000 Expense Veterinary 0 11 10 3
    40302000 Expense Boarding 0 12 10 3
    40400000 Expense Utilities 0 13 4 2
    40401000 Expense Electric 272.92 14 13 3
    40402000 Expense Telephone 131.55 15 13 3
    40403000 Expense Gas 111.55 16 13 3
    40404000 Expense Internet 0 17 13 3
    40404010 Expense Web 4472.99 18 17 4
    40404020 Expense Email 11.12 19 17 4
    40404030 Expense Domain Names 15.95 20 17 4

    Level = 1 appears in the detail of the main report.
    The detail also has a subreport which has a filter on the same datatable in the subreport's datasource and filters level=2 and the subreport's linked on detail's AcctSer = The subreport's AcctParentSer.
    This subreport has a subreport that filters level=3 and linked as above, and so forth through to level five, where there is no subreport.

    It doesn't work.

    IT does the first row of level 1, then the first two subs and then it stops. I can't get the sum of the subreport up to the main report. I am completely flustered. Is there a working completely validated sample of a report as utterly common as a P&L or a balance sheet? This is child's play in Crystal reports or SSRS.

    How exactly do I make this report carry up the totals and not stop after the first level 1 row it hits? I have no ability to union up multiple datasets and should not have to do so. Exactly how do I do this? Every single post I see on subreports is cryptic or over 10 years old.

    Please help me?
  • Reply

    Let me be clear that it should work like this:


    <PRE>
    LEVEL 1 ITEM $111
    LEVEL 2 ITEM $ 11
    LEVEL 2 ITEM $ 22
    TOTAL LEVEL 2 $ 33
    LEVEL 1 ITEM $ 0
    LEVEL 2 ITEM $ 11
    LEVEL 2 ITEM $ 11
    LEVEL 2 ITEM $ 11
    LEVEL 2 ITEM $ 11
    LEVEL 2 ITEM $ 11
    TOTAL LEVEL 2 $ 55
    LEVEL 1 ITEM $ 2
    LEVEL 2 ITEM $ 0
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    LEVEL 3 ITEM $ 2
    TOTAL LEVEL 3 $ 14
    TOTAL LEVEL 2 $ 14
    TOTAL $215
    </PRE>


    This should be easy!
  • Marked as Answer

    Reply

    Hi,

    Your query is being followed up on the SupportOne thread. Kindly refer the same.

    Thanks,
    Esha
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels