[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Adding Style Sheets to an SQR Report



Solution Found

Instead if using the built in procedure

html_set_head_tags($tags)

, I printed the Style Sheet information directly to the HTML using

print $temp () code-printer=ht


This now works properly on both mty PC and the the Brio Portal

Thanks for your help

Regards,
Ian Mills


>>> jarrodb@NETSPACE.NET.AU 04/01/2002 10:30:41 pm >>>
Does it run ok outside of the portal?

If so check out what the html_set_head_tags actually outputs with
regards to
your temp string.
You will probably find that your temp string is in the midst of the
title
that the
html_set_head_tags is doing.
ie you will probably end up with something like this.
  <title> <STYLE type="text/css"><!!-- .bigHeading
{....</STYLE></title>

I remember also having problems with the squiggle brackets so I did
this
  Let $LeftSquiggle     = Chr(123)
  Let $RightSquiggle    = Chr(125)

if you have a look at the html.inc file you will find.
        begin-procedure html_set_head_tags($tags)
           let $outtag = '%%HEADTAGS=' || $tags
           print $outtag () code-printer=ht
        end-procedure ! html_set_head_tags

I still haven't found out where or how the %%HEADTAGS is set.
If you find out please let me know!

This is what I ended up doing.

   Let $Title          = $ReportID || ' - ' || $ReportName
   Let $CSSLink        = 'rel="stylesheet" type="text/css"
href="MyCSS.css"'
   Let $ExtraStyleTags = 'p.page' || chr(9) || Chr(123) ||
'page-break-after:always' || Chr(125)
   Do html_set_head_tags($Title)

   Do html_CSS_link($CSSLink)
   Do html_extraStyle($ExtraStyleTags)
   Do html_extraStyle_end

begin-procedure html_extraStyle($tags)
   if $tags = ''
      print '<STYLE>' () code-printer=ht
   else
      let $outtag = '<STYLE ' || $tags || '>'
      print $outtag () code-printer=ht
   end-if
end-procedure
begin-procedure html_extraStyle_end
   print '</STYLE>' () code-printer=ht
end-procedure

begin-procedure html_CSS_link($tags)
   if $tags = ''
      print '<LINK>' () code-printer=ht
   else
      let $outtag = '<LINK ' || $tags || '>'
      print $outtag () code-printer=ht
   end-if
end-procedure

I hope this helps.  Try cutting and pasting but I can't guarentee
anything
as it
was copied from an old version of a program I had lying around.

Always test and retest it outside the portal first.

We ended up simply writing programs to generate the html files outside
of
the portal
and them load them using the OneAPI.  For us it was a better option
because
we had
a head of style sheet stuff in there, plus the programs were already
written
in ASP
so conversion was a piece of cake.  Also our ETL and other processing
initiates
the programs and we felt that we would have more control of when the
reports
are
available. ie After we had checked them!

Goodluck!




-----Original Message-----
From: Discussion of SQR, Brio Software's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Ian Mills
Sent: Friday, 4 January 2002 4:16 PM
To: SQR-USERS@list.iex.net
Subject: Adding Style Sheets to an SQR Report


Can anyone help?

I have an SQR report that is run on Brio Portal that produces an HTML
output.

I tried to add the following code to my report so that I can use style
sheets to set my fonts for the HTML output. When I add this code, the
report will no longer work when I try to run it on the Portal.
When I comment it out, the report runs fine.

Is there something obvious here to anyone that I am doing wrong?

begin-program
    do html_on
    let $temp1 = '}'
!    let $temp = '<TITLE>LP_044 - Reference Report</TITLE>'
    let $temp = '<STYLE type="text/css">'
                || '<!!--'
                || ' .bigHeading {  font-family: Arial, Helvetica,
sans-serif; font-size: 18px; font-weight: bold' || $temp1
                || ' .smallHeading {  font-family: Arial, Helvetica,
sans-serif; font-size: 12px; font-weight: bold' || $temp1
                || ' .normalText {  font-family: Arial, Helvetica,
sans-serif; font-size: 10px' || $temp1
                || ' .detailText {  font-family: Arial, Helvetica,
sans-serif; font-size: 8px; font-weight: italic' || $temp1
                || '-->'
                || '</STYLE>'
    do html_set_head_tags($temp)
...etc


Regards,
Ian Mills