Subreports

Hi,

I would like to know if there's a way to delete or hide the sub reports designed in the designer. Here's the situation :

For our application, we design reports, which are configurable. Because of this, we dynamically create the required SQL statements and
assigned them to the Databands. However, these configuration may sometimes required that some parts of the report to be hid.

For better performances, we do not bind the non-required statements. However, we get errors because the report do not find the data.

I tried to hid the subreports : I get the "Invalid expression term"
I tried to delete the non-needed sub report : I get a "null reference exception"

Can someone help me?

Thanks.

Fast report Version : current 1.3 stable version.

Comments

  • edited 12:37AM
    Hello,

    If you don't want to print a subreport, just set its Visible property to false.
  • edited 12:37AM
    Hi,

    When i set the subreport visible property to false like this :
    wrote:
    SubreportObject sub = (SubreportObject)c_FReport.FindObject("Subreport");
    sub.Visible = false;

    I get :
    wrote:
    (Text64): error CS1525: Invalid expression term '['
    (Text64): error CS1002: ; expected
    (Text64): error CS1002: ; expected
    (Text64): error CS1525: Invalid expression term ']'
    (Text64): error CS1525: Invalid expression term '['
    (Text64): error CS1002: ; expected
    (Text64): error CS1002: ; expected
    (Text64): error CS1525: Invalid expression term ']'
    (Text73): error CS1525: Invalid expression term '['
    (Text73): error CS1002: ; expected
    (Text73): error CS1002: ; expected
    (Text73): error CS1525: Invalid expression term ']'
    (Text73): error CS1525: Invalid expression term '['
    (Text73): error CS1002: ; expected
    (Text73): error CS1002: ; expected
    (Text73): error CS1525: Invalid expression term ']'
    and this goes on for all the fields in the subreport.
  • edited 12:37AM
    Sorry, I cannot reproduce this. Do you have a simple test project for me? You may send it to tz@fast-report.com.

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.