in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

strange behaviour: hide group header

Last post 06-19-2008 1:15 PM by C1_DaveT. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-28-2008 6:51 PM

    • milo71
    • Not Ranked
    • Joined on 08-31-2007
    • Posts 3

    strange behaviour: hide group header

    Hello,

    I have made a simple report where I group some values and want to hide group header depending on data field value. So I have wrote a script OnFormat:

    if hideheader = 1 then
      block_nr_Header.Visible = False
    else
      block_nr_Header.Visible = True
    end if

    Variable "hideheader" is data field from my data source which is pure xml file. Hiding works for some groups but for another doesn't even value of "hideheader" is allways correct. I can send you both files (data and report definition), just don't know how to upload them here.

    Kind regards,

    Milo

  • 06-02-2008 2:21 AM In reply to

    Re: strange behaviour: hide group header

    Hi Milo

     

    I used the following script in the GroupHeader0's OnFormat property in the "DynamicPageHeader" report of C:\Program Files\ComponentOne Studio.NET 2.0\C1Report\Samples\XML\CommonTasks\CommonTasks.XML report definition file and got favourable results.

     

    If CategoryID = 1 then ' CategoryID is a Database field
    Report.Groups("CategoryName").SectionHeader.visible = False
    Else
    Report.Groups("CategoryName").SectionHeader.visible = True
    End If

     

    In order to upload your report definition file along with database, I would suggest you to click on the OptionsTab and then under FileAttachments click on Add/Update Button, to upload the files. Preferably Zip files.

     

    Regards

    Dave

     

    <milo71> wrote in message news:205369@10.0.1.98...

    Hello,

    I have made a simple report where I group some values and want to hide group header depending on data field value. So I have wrote a script OnFormat:

    if hideheader = 1 then
      block_nr_Header.Visible = False
    else
      block_nr_Header.Visible = True
    end if

    Variable "hideheader" is data field from my data source which is pure xml file. Hiding works for some groups but for another doesn't even value of "hideheader" is allways correct. I can send you both files (data and report definition), just don't know how to upload them here.

    Kind regards,

    Milo



    http://helpcentral.componentone.com/cs/forums/p/75390/205369.aspx#205369

  • 06-04-2008 3:43 AM In reply to

    • milo71
    • Not Ranked
    • Joined on 08-31-2007
    • Posts 3

    Re: strange behaviour: hide group header

    Hi Dave,

    sorry I'm late. Here are my test files, data_test.xml is my data source (table laborlegende) and report_test.xml is report definition file. When you start report you will see in preview most left column contains 1 or 0. 1 means I want to hide block_nr_Header at this position otherwise I want to show it. Information is in field hideheader and script on header is:

    if hideheader = 1 then
      block_nr_Header.Visible = False
    else
      block_nr_Header.Visible = True
    end if

    problem: look at second page where position begins with B2006.23276, from there all block_nr_Header(s) are hidden even field hideheader=0. Have you an idea why?

    Regards,

    Milo
     

  • 06-19-2008 1:15 PM In reply to

    Re: strange behaviour: hide group header

    Hi Milo
     
    I was able to replicate the issue.
     
    The issue seems to be related to the way in which data is being populated, because if I use the attached New_Data_text.XML then the headers for positions beginning with B2006.23276 do get rendered. However headers for B2006.23278 do not show.
     
    block_nr_Header’s OnFormat property does not seem to fire in these cases (you may use a message box to check the occurrence). It seems to be related to the values set for the Block_nr element in the data file.
     
    I also noticed that the issue occurs at some instances in Position B2006.23272 also, when using Data_text.XML as data source.
     
    Hope it provides you some pointers.
     
    Regards
    Dave
    <milo71> wrote in message news:205555@10.0.1.98...

    Hi Dave,

    sorry I'm late. Here are my test files, data_test.xml is my data source (table laborlegende) and report_test.xml is report definition file. When you start report you will see in preview most left column contains 1 or 0. 1 means I want to hide block_nr_Header at this position otherwise I want to show it. Information is in field hideheader and script on header is:

    if hideheader = 1 then
      block_nr_Header.Visible = False
    else
      block_nr_Header.Visible = True
    end if

    problem: look at second page where position begins with B2006.23276, from there all block_nr_Header(s) are hidden even field hideheader=0. Have you an idea why?

    Regards,

    Milo
     



    http://helpcentral.componentone.com/cs/forums/p/75390/205555.aspx#205555

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.