Generate report by report template

mohanarajmohanaraj 600001
edited 11:55AM in FastReport .NET
Dear all,

I have a requirement of displaying report by the user defined report templates.

The template with left block, Right block and Middle block eg. left block contains user name, Address etc, the middle block contains Report heading and the right block contains logo if the user can also alter this ie if he wants the image in center or left he can define and generate the report. This input are get from the user and the report generated using this template.

How can i achieve it?

How can i define this block is display in center or right or left.

Comments

  • edited 11:55AM
    Hello,

    You have to build your report in code. Please look at the Demos\C#\ReportFromCode project.
  • mohanarajmohanaraj 600001
    edited 11:55AM
    AlexTZ wrote: »
    Hello,

    You have to build your report in code. Please look at the Demos\C#\ReportFromCode project.


    Dear AlexTZ,

    The demo is in window.form application i need it for ASP.NET application i want the user defined Report header please advice.

    Thanks
  • edited 11:55AM
    Yes, the demo is for WinForms; but you can use the same technique to create the report items in ASP.Net. Also look at the programmer's manual, "Working with Windows.Forms/Creating a report by using code".
  • mohanarajmohanaraj 600001
    edited 11:55AM
    AlexTZ wrote: »
    Yes, the demo is for WinForms; but you can use the same technique to create the report items in ASP.Net. Also look at the programmer's manual, "Working with Windows.Forms/Creating a report by using code".



    Dear AlexTZ

    Can i add only title band and footer band from code others like page header, data, Report summary are design by using Designer.

    How can i achieve it.
  • edited 11:55AM
    Of course you can add only some report items, and keep other existing items. This code will add the Title band to the existing report:
          ReportPage page = report.Pages[0] as ReportPage;
          
          // create title band
          page.ReportTitle = new ReportTitleBand();
          page.ReportTitle.Height = Units.Centimeters * 1;
          page.ReportTitle.CreateUniqueName();
    
  • mohanarajmohanaraj 600001
    edited 11:55AM
    Dear Alex,

    Thanks for the above i can able to create the the report title band and others by dynamic.

    Now i want to display the the Date and Time separately in dynamic in a separate textobject Now i can able to display the Date with time by giving text as [Date] to textobject. In some situation with the date i will also display page number with the same text object as test [Date][Page#] when i give this as text to the text object it will display both date with time and the page number hear we can't format the [Date] to display only date or time because it having [Page#].

    How can i able to display the Date and Time separately with addition to other field like page number?

    Thanks in advance.
  • edited 11:55AM
    Hello,

    The Text object has a property called Formats. It's a collection of FormatBase objects. If your text has several items to format, you need to add several formats using that property.

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.