How to design the sub report ?

2»

Comments

  • mohanarajmohanaraj 600001
    edited 9:41AM
    AlexTZ wrote: »
    Doubleclick the databand, select "Filter" tab and write the following expression:

    [TableName.ColumnName] == 0

    Dear alex,

    I tried this but it throw an error as 'Specified cast is not valid.'

    I tried this in Data1 (First Data band) as [dtOrgsummary.ParentId] == 10

    please advice.
  • mohanarajmohanaraj 600001
    edited January 2010
    Dear alex,

    In the report the summary, value is displayed according to the parent - child relation between them.
    ie

    In report's First page it showing the DepartmentId and ParentId
    eg:

    Production department having ParentId as 10 and DepartmentId as 11 and it having Child department Spices(parentid as 11) and masala(parentid as 11).

    I want to sum the child data ie I/C, Mobile, IDD etc of Spices(parentid as 11) and masala(parentid as 11) to its parent Department Production like wise if the Spices department have any SubDepartment thats record also added to its parent(spices) and then that added to the Production.

    And then i only show the Level 0 Department (Suzlanfoods, SuzlanParcel) and Level1 Department of its, in the first page of the report.

    How can i done this calculation.

    please help in this regards.

    Thanks in advance..
  • edited 9:41AM
    mohanaraj wrote: »
    I tried this but it throw an error as 'Specified cast is not valid.'

    I tried this in Data1 (First Data band) as [dtOrgsummary.ParentId] == 10

    please advice.

    ParentId column should be of Int64 type (as it is defined as "long" in the xml data file), but in your report it has Int32 type.
  • edited 9:41AM
    Could you post a screenshot (what you need to sum, and where you want to print the sum)? It's not easy to figure out what you need.
    mohanaraj wrote: »
    Dear alex,

    In the report the summary, value is displayed according to the parent - child relation between them.
    ie

    In report's First page it showing the DepartmentId and ParentId
    eg:

    Production department having ParentId as 10 and DepartmentId as 11 and it having Child department Spices(parentid as 11) and masala(parentid as 11).

    I want to sum the child data ie I/C, Mobile, IDD etc of Spices(parentid as 11) and masala(parentid as 11) to its parent Department Production like wise if the Spices department have any SubDepartment thats record also added to its parent(spices) and then that added to the Production.

    And then i only show the Level 0 Department (Suzlanfoods, SuzlanParcel) and Level1 Department of its, in the first page of the report.

    How can i done this calculation.

    please help in this regards.

    Thanks in advance..
  • mohanarajmohanaraj 600001
    edited January 2010
    Dear alex,

    Please run the application. In the report the summary is not displayed correct.

    ie the spices Department is the child for production so the summary of this Department should be added to the summary of Porduction.

    Please refer the summary displayed in the report.
  • edited 9:41AM
    If I understand you correctly, you need to print the total value in the parent data band (see the picture). I'll show you how to do this with I/C total:
    - download the latest build;
    - copy Text122 content to the Text15 object (so it will be [Currency]Org_Complete_IC1] + [Org_Complete_IC2] + [Org_Complete_IC3);
    - set Text15.ProcessAt property to Custom;
    - select the LevelSummaryFooter band and create LevelSummaryFooter_BeforePrint event handler;
    - write the following code in this handler:
    Engine.ProcessObject(Text15);
    

    This code will process the Text15 object again, and it will print the correct total value. This is needed because the Text15 object is printed before we calculate the total (read some info in the manual: http://fast-report.com/documentation/UserM...ntheheader.htm).

    See the modified new.frx report.
  • mohanarajmohanaraj 600001
    edited January 2010
    Dear Alex,

    Thanks for your support.

    It display the total value correct in the top.

    I want to disaply the summary of the Sub Department also with the parent please refer the Picture (pic1).

    In this production, package have the summary value 0.00 for all. But actually the Production have sub department Spices and Masala which have the non zero value. this sub department's summary also added to the Production's summary value. By this way according to the ParentId and ChildId the sub department's summary should be added to its parent's summary. The sub department level may extends to any level.

    How I can achieve this ?

    please help in this regard.
  • edited 9:41AM
    It's hard to do in a report. It would be easier if you calculate these values by yourself before running a report. Then, in a report, you may just print the value without using totals, script, etc.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.