DataBands as Page Header

Stimulsoft Reports.WEB discussion
Post Reply
brjohnsmith
Posts: 30
Joined: Mon Jan 29, 2018 11:04 am

DataBands as Page Header

Post by brjohnsmith »

Hi,

I have several databands with a filter and I would like to set only one databand as page header according to the filter. It means, according to what the user choose the company name (for example), the corresponding logo needs to be applied.

Is there a way to do it?

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: DataBands as Page Header

Post by Edward »

Hi John,

Please use a second HeaderBand2 for the Databand with a filter. It has the condition against it, as it is shown in the screenshot:
HeaderBand2Condition.png
HeaderBand2Condition.png (90.72 KiB) Viewed 2877 times
The condition determines either the HeaderBand2 is visible, or not. That depends on the 'AllCountries' variable switched on or off. This variable is declared in the report's Dictionary. The value of the variable is taken from the dialogue form with the parameters when the report is rendered.
Also HeaderBand2.PrintOnAllPages = true, so this is a header.
ParametersSelectingCountry_NameInTheTop.mrt
(792.23 KiB) Downloaded 292 times
Thank you,
Edward
brjohnsmith
Posts: 30
Joined: Mon Jan 29, 2018 11:04 am

Re: DataBands as Page Header

Post by brjohnsmith »

Hi Edward, Thank you for the info, but I am afraid that it would not work as I would like.

Supposing that you have 5 databands. Each databand, you have a company logo, and depending on the customer that you have, a specific page header with the correct company logo should appear in all pages.

Do you think that it would work this way?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: DataBands as Page Header

Post by Edward »

Hi John,

if you need to display all the 5 databands for every customer, then obviously only the headerbands for the first databand on the page will be rendered as a page header bands. But if you need to display only one databand depending on the customer who was selected for the report, then disabling the other databands with their headerbands with their own conditions would work.

Do you need always to display all the 5 databands for every customer? If not, then it is possible to add a condition to all the headers and to all the databands so only one databand and its headers are displayed when a specific company is selected.

Thank you,
Edward
brjohnsmith
Posts: 30
Joined: Mon Jan 29, 2018 11:04 am

Re: DataBands as Page Header

Post by brjohnsmith »

Hi Edward,

let me try to explain:

DataBand1 - Customer1
DataBand2 - Customer2
DataBand3 - Customer3
DataBand4 - Customer4
DataBand5 - Customer5

Each DataBand, I have a different LOGO (of course). Supposing that the customer chosen is Customer3. In this case, for ALL PAGES (as page header), I would like that the DataBand3 be printed. Currently, I have been using CONDITION to print only the correct DataBand, however, I have the LOGO only in the first page, not in others, even I have set ALL PAGES=TRUE.

Please, let me know if it is clear.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: DataBands as Page Header

Post by Edward »

Hi John,

In that case, you need to use a Page Header definitely, the Databand approach will not work, as you need the same header as a header for all the pages. Please feel free to attach your report, or, alternatively, I could modify the report template I used above for multiple databands case.

Thank you,
Edward
User avatar
dmasterplan
Posts: 143
Joined: Thu Mar 17, 2022 4:04 am
Location: Philippines

Re: DataBands as Page Header

Post by dmasterplan »

Hi,

I did make a cross data band as a header. I placed it in a panel.

Please see images attached.

Regards,

dmasterplan
Attachments
report layout.png
report layout.png (63.55 KiB) Viewed 1129 times
report output.png
report output.png (151.68 KiB) Viewed 1129 times
Max Shamanov
Posts: 786
Joined: Tue Sep 07, 2021 10:11 am

Re: DataBands as Page Header

Post by Max Shamanov »

Hello,

You are welcome!
Post Reply