Print Header Band On All But Page 1

Stimulsoft Reports.NET discussion
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Print Header Band On All But Page 1

Post by MikeC »

I have a long report that resets the page number after a footer band runs. The report also has a header band that needs to run at the top of each page that is NOT page 1. Setting the "Print On" property to "Except First Page" only works on the first page of the entire report, but it doesn't work when the page number resets to 1 (the header band prints on all of the page number 1's except for the first).

How do I prevent the header band from printing on subsequent page 1's in the report?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Print Header Band On All But Page 1

Post by HighAley »

Hello.
MikeC wrote:I have a long report that resets the page number after a footer band runs. The report also has a header band that needs to run at the top of each page that is NOT page 1. Setting the "Print On" property to "Except First Page" only works on the first page of the entire report, but it doesn't work when the page number resets to 1 (the header band prints on all of the page number 1's except for the first).

How do I prevent the header band from printing on subsequent page 1's in the report?
Please, set the 'Number of Pass' property of the report to 'Double Pass'.

Thank you.
MikeC
Posts: 51
Joined: Mon Jun 07, 2010 3:36 pm

Print Header Band On All But Page 1

Post by MikeC »

Aleksey wrote:Hello.
MikeC wrote:I have a long report that resets the page number after a footer band runs. The report also has a header band that needs to run at the top of each page that is NOT page 1. Setting the "Print On" property to "Except First Page" only works on the first page of the entire report, but it doesn't work when the page number resets to 1 (the header band prints on all of the page number 1's except for the first).

How do I prevent the header band from printing on subsequent page 1's in the report?
Please, set the 'Number of Pass' property of the report to 'Double Pass'.

Thank you.
And that didn't do anything-the report still prints the header on all the page 1's.
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

Print Header Band On All But Page 1

Post by Ivan »

Hello,

Can you please send us a sample report template with database, which reproduces the issue?

Thank you.
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Print Header Band On All But Page 1

Post by roomy »

Hello,

I am facing the same issue when try to export reports in pdf. All headers are missing on page 2 to n. I have set the number of pass to double on template. One more thing is that I need to combine this report with other report.

Code: Select all

          JoinReports.NumberOfPass = StiNumberOfPass.DoublePass;
          JoinReports.Compile();
          JoinReports.Render();
          JoinReports.CompiledReport.DataStore.Clear();

          settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
          settings.ImageQuality = 1F;
          settings.ImageResolution = 100;
          settings.ImageFormat = Stimulsoft.Report.Export.StiImageFormat.Color;
          StiOptions.Export.Html.UseImageResolution = true;

          JoinReports.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, l_strPdfPath, settings);
Thankyou
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print Header Band On All But Page 1

Post by HighAley »

Hello.

Could you describe your issue more detailed?
Please, send us a sample project that reproduces the issue.

Thank you.
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Print Header Band On All But Page 1

Post by roomy »

report.xml
(24.18 KiB) Downloaded 467 times
report.mrt
(117.78 KiB) Downloaded 390 times
Please find the template report and xml. I have face this issue with c# code. Report headers are missing when I join more the one sti report objects together using c# code. I have use double pass property in this report and other report execute with single pass. The issue occur when attache report are added at the end.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: Print Header Band On All But Page 1

Post by Jan »

Hello,

Can you show your code where your merge reports?

Thank you.
roomy
Posts: 61
Joined: Mon May 06, 2013 12:34 pm

Re: Print Header Band On All But Page 1

Post by roomy »

Please find the code.

Code: Select all

JoinReports.SubReports.Add(CreateMrtReport(sTempFileName, XMLFILEPATH));

          JoinReports.NumberOfPass = StiNumberOfPass.DoublePass;
          JoinReports.Compile();
          JoinReports.Render();
          JoinReports.CompiledReport.DataStore.Clear();

          settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
          settings.ImageQuality = 1F;
          settings.ImageResolution = 100;
          settings.ImageFormat = Stimulsoft.Report.Export.StiImageFormat.Color;
          StiOptions.Export.Html.UseImageResolution = true;

          JoinReports.ExportDocument(Stimulsoft.Report.StiExportFormat.Pdf, l_strPdfPath, settings);

///Function to create sti report.
 private StiReport CreateMrtReport(string sTempMrtName, string XMLFILEPATH, string _GlossaryHighlight = null)
    {
      DataSet dataSet = null;
      StiReport report = null;
      try
      {
        dataSet = new DataSet();
        dataSet.ReadXml(l_strDataFilePath);


        report = new StiReport();
        report.Load(sTempMrtName);

        report.Dictionary.Databases.Clear();
        report.RegData("New Connection", "new", dataSet);

        report.Dictionary.Synchronize();
        return report;
      }
      catch (Exception ex)
      {
        throw;
      }
      finally
      {
        dataSet = null;
        report.Dispose();
        report = null;
      }
    }
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Print Header Band On All But Page 1

Post by HighAley »

Hello.

Sorry, but we still couldn't reproduce your issue.
What Headers are missing on pages?
Do you need to show headers from one report on pages of other reports? Then it's impossible.
Could you describe your issue more detailed? Or better please send us a sample project that reproduces the issue.

Thank you.
Post Reply