Hello Eli,
did you place the image "amvara_confidential.gif" in the corresponding folders?
root@amvara:/opt/IBM/cognos/crn0 : find ./ -name "amvara_confidential.gif"
./webcontent/bi/schemas/amvara_confidential.gif
./webcontent/bi/reportstyles/amvara_confidential.gif
./webcontent/schemas/amvara_confidential.gif
./reportstyles/amvara_confidential.gif
The result will look like this (depending on your image of course):
The screenshot is from QueryStudio - which I believe would not benefit from the other proposals to your request.
I tested this on CA11.1.5 ... and wuuuhuu ... .ph and .pf were removed from the default layouts. Sorry for that, Eli.
So, placeing something like this in your css files:
.pb::before {
background-image: url("/crn0/bi/schemas/amvara_confidential.gif");
text-align:center;
background-size: contain;
content:"--- BEFORE ---";
border:1px solid red;
display: inline-block;
vertical-align: middle;
margin-left:calc(50% - 50px)
}
.pb::after {
background-image: url("/crn0/bi/schemas/amvara_confidential.gif");
text-align:center;
background-size: contain;
content:"--- AFTER ---";
border:1px solid red;
display: inline-block;
vertical-align: middle;
margin-left:calc(50% - 50px)
}
td[specname="pageHeader"] {
background-color:red;
background-image: url("/crn0/bi/schemas/amvara_confidential.gif");
height:25px;
}
td[specname="pageFooter"] {
background-color:red;
background-image: url("/crn0/bi/schemas/amvara_confidential.gif");
height:25px;
}
In your CSS files, would do the trick.
".pb" is the pageBody element. The pageFooter and pageHeader elements are inserted if you use them. So users that do not put a header/footer will not see them.
It will look like this:
------------------------------
Ralf Roeber
------------------------------
Original Message:
Sent: Tue January 12, 2021 10:48 AM
From: Elihu El
Subject: Global Header and Footer Message On All Printed Reports
Good Morning,
I hope that your day has gotten off to a good start. I have added this -
.ph,.pf{
vertical-align: top;padding: 4px 8px;
background-image:url(amvara_confidential.gif);
background-repeat:no-repeat;
background-position:center;
}
...towards the top of each of these files:
./webcontent/bi/schemas/GlobalReportStyles.css
./webcontent/bi/reportstyles/GlobalReportStyles.css
./webcontent/schemas/GlobalReportStyles.css
./reportstyles/GlobalReportStyles.css
However, I am seeing no change. How would I confirm that I am modifying the correct file?
Continued Regards,
Eli
Original Message:
Sent: 1/11/2021 3:10:00 AM
From: Ralf Roeber
Subject: RE: Global Header and Footer Message On All Printed Reports
Hello @Elihu El,
in the archive(s) GlobalReportStyles.css you can find .ph and .pf declaring the styles for header and footer of any report.
In the example below, we added a watermark "confidential" image to any report:
.ph,.pf{
vertical-align: top;padding: 4px 8px;
background-image:url(amvara_confidential.gif);
background-repeat:no-repeat;
background-position:center;
}
Using CSS before:: and after:: you could achieve adding text as in your example.
The GlobalReportStyles.css files are somehow scattered around the filesystem and depending on your installation you must modify them on GW and/or the APP.-SERVER.
Rendering PDF is done on the App.-Server, so you will need modification there. Rendering HTML is mainly served by the GW. So, you would need the modification there.
root@amvara:/opt/IBM/cognos/crn0 : find ./ -name "GlobalReport*css"
./webcontent/bi/schemas/GlobalReportStyles.css
./webcontent/bi/schemas/GlobalReportStyles_1.css
./webcontent/bi/schemas/GlobalReportStyles_10.css
./webcontent/bi/schemas/GlobalReportStyles_11.4.css
./webcontent/bi/schemas/GlobalReportStyles_11.5.css
./webcontent/bi/schemas/GlobalReportStyles_11.6.css
./webcontent/bi/schemas/GlobalReportStyles_11.css
./webcontent/bi/schemas/GlobalReportStyles_none.css
./webcontent/bi/schemas/GlobalReportStyles_var.css
./webcontent/bi/reportstyles/GlobalReportStyles.css
./webcontent/bi/reportstyles/GlobalReportStyles_1.css
./webcontent/bi/reportstyles/GlobalReportStyles_10.css
./webcontent/bi/reportstyles/GlobalReportStyles_11.4.css
./webcontent/bi/reportstyles/GlobalReportStyles_11.5.css
./webcontent/bi/reportstyles/GlobalReportStyles_11.6.css
./webcontent/bi/reportstyles/GlobalReportStyles_11.css
./webcontent/bi/reportstyles/GlobalReportStyles_none.css
./webcontent/bi/reportstyles/GlobalReportStyles_var.css
./webcontent/schemas/GlobalReportStyles.css
./webcontent/schemas/GlobalReportStyles_1.css
./webcontent/schemas/GlobalReportStyles_10.css
./webcontent/schemas/GlobalReportStyles_11.4.css
./webcontent/schemas/GlobalReportStyles_11.5.css
./webcontent/schemas/GlobalReportStyles_11.6.css
./webcontent/schemas/GlobalReportStyles_11.css
./webcontent/schemas/GlobalReportStyles_none.css
./webcontent/schemas/GlobalReportStyles_var.css
./webcontent/schemas/GlobalReportStyles_10_NS.css
./webcontent/schemas/GlobalReportStyles_11.4_NS.css
./webcontent/schemas/GlobalReportStyles_11_NS.css
./webcontent/schemas/GlobalReportStyles_1_NS.css
./webcontent/schemas/GlobalReportStyles_NS.css
./webcontent/schemas/GlobalReportStyles_none_NS.css
./reportstyles/GlobalReportStyles.css
./reportstyles/GlobalReportStyles_1.css
./reportstyles/GlobalReportStyles_10.css
./reportstyles/GlobalReportStyles_11.4.css
./reportstyles/GlobalReportStyles_11.5.css
./reportstyles/GlobalReportStyles_11.6.css
./reportstyles/GlobalReportStyles_11.css
./reportstyles/GlobalReportStyles_none.css
./reportstyles/GlobalReportStyles_var.css
Hope this helps.
------------------------------
Ralf Roeber
Original Message:
Sent: Fri January 08, 2021 05:41 PM
From: Elihu El
Subject: Global Header and Footer Message On All Printed Reports
Good Evening,
I hope that you and yours are all doing well. We would like a specific header and footer to appear on every exported or printed report. For example, if the user runs the report as a pdf or Excel, we want the header and footer to appear on each report. The header and footer verbiage would be configured on the server by the System Admin as a system-side default process with no local user configuration. How would a System Admin make this change?
Warm Regards,
Eli
#CognosAnalyticswithWatson