using parameters instead of setting properties in application

edited 10:09AM in FastReport .NET
right now I'm setting properties in my application like

Dim GroupHeader2 = CType(Fastreport.FindObject("GroupHeader2"), FastReport.GroupHeaderBand)
Dim GroupHeader3 = CType(Fastreport.FindObject("GroupHeader3"), FastReport.GroupHeaderBand)
If Not IsNothing(GroupHeader2) Then GroupHeader2.Condition = "[Meldeliste.idAK]"
If Not IsNothing(GroupHeader3) Then GroupHeader3.Condition = "[Meldeliste.idGK]"
Fastreport.RegisterData(dvMeldung.ToTable, "Meldeliste")
Fastreport.Prepare(True)
Fastreport.Show()

Is there as way to use parameters to set these properties on GroupHeaders?

Same questions for textObject.Visible?

Thanks!

Comments

  • edited 10:09AM
    did you mean setting condition on report template? use script...
      public class ReportScript
      {
        private void _StartReport(object sender, EventArgs e)
        {
          GroupHeader2.Condition = Report.GetParameterValue("ParameterGroupHeader2").ToString();
          GroupHeader3.Condition = Report.GetParameterValue("ParameterGroupHeader3").ToString();
          Text1.Visible = (bool)Report.GetParameterValue("ParameterText1"); 
        }
      }
    

  • edited 10:09AM
    ipong wrote: »
    did you mean setting condition on report template? use script...
      public class ReportScript
      {
        private void _StartReport(object sender, EventArgs e)
        {
          GroupHeader2.Condition = Report.GetParameterValue("ParameterGroupHeader2").ToString();
          GroupHeader3.Condition = Report.GetParameterValue("ParameterGroupHeader3").ToString();
          Text1.Visible = (bool)Report.GetParameterValue("ParameterText1"); 
        }
      }
    

    I guess I am missing something... This code simply does nothing. Do I have to link this to somewhere? Is >_StartReport...< correct?

    Btw: Is there a book or any material to learn about FastReport? The FRNetUserManual is not very usefull.
  • edited June 2018
    wrote:
    I guess I am missing something... This code simply does nothing. Do I have to link this to somewhere? Is >_StartReport...< correct?
    see attached picture
    wrote:
    Btw: Is there a book or any material to learn about FastReport? The FRNetUserManual is not very usefull.
    learning by doing is very effective [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> just post your question on forum, I'm glad I could help[/img]
  • edited June 2018
    Finally I figured it out... what a fool [img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Ups.. I did not see your reply, but thank you for your help. It showed me the right way.[/img]

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.