Normal Topic HTML report output file: can it be edited? (Read 2177 times)
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
HTML report output file: can it be edited?
Feb 2nd, 2010 at 9:27pm
Print Post Print Post  
We've noticed a funny thing when we print our various reports, like the daily and monthly sales reports. Some of the reports are divided into separate pages so that each dealer's information and subtotals prints on it's own page. This behavior is controlled by a certain CSS tag called 'page-break-after' which I noticed gets inserted into the html table after each dealer's data has been laid out into the various table cells.

This is where something buggy takes place. We do not use Internet Explorer as our default web browser. Rather, we use Firefox, which we keep updated with the latest versions and upgrades. Apparently this particular CSS page-break tag still has incomplete compatibility with Firefox in that it doesn't work when the tag is nested inside an html table.

In Internet Explorer there is no problem and the reports print out on individual pages. But in Firefox the tag is ignored and all the reports print out on sequential pages with no regard to which dealer's data is being printed on what page.

Now, I messed around in the html file that Sesame created and edited things so that the CSS tag in question came after the table and everything worked properly when I printed the pages out.

So my question is, is there a way to go in and edit the way that Sesame creates an html file so that the output comes out differently? I know we could solve the problem by switching back to Internet Explorer but that is something we don't want to do at this point. I'd rather solve this problem some other way.

Thanks,
Mark
  
Back to top
 
IP Logged
 
Acebanner
Full Member
***
Offline



Posts: 123
Location: New York City
Joined: Jan 23rd, 2008
Re: HTML report output file: can it be edited?
Reply #1 - Feb 3rd, 2010 at 1:27pm
Print Post Print Post  
Mark, I'm not an expert on reports by any means, but you might want to look at the ReportHTMLFilter command.
From the Sesame 2.0 Programming Manual, it seems that you should be able to specify a tag to be replaced. As far as moving it's placement... you might try inserting some sort of 'flag' into your reports that you could use to locate the position of the offending css property, and use the ReportHTMLFilter to change it's positioning.

Anyway, just an idea.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: HTML report output file: can it be edited?
Reply #2 - Feb 3rd, 2010 at 2:11pm
Print Post Print Post  
What version of Sesame are you running, Mark?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: HTML report output file: can it be edited?
Reply #3 - Feb 3rd, 2010 at 10:15pm
Print Post Print Post  
Version 2.5.

This one may be a lost cause. As I said, if the page break css property is located outside of the html table, it works. However, the reports do not list individual dealers' sales in separate tables; rather, separate rows of the same table. So, not only would I need to relocate the css page break tag, but I would also have to redesign how Sesame outputs the data so it shows up in separate tables and not just separate rows.

For now we overcome this obstacle by printing the html, which pops up in Firefox, then we copy and paste the resulting URL manually into Internet Explorer. Ultimately, continuing this method may prove to be the simplest solution.

Mark
  
Back to top
 
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: HTML report output file: can it be edited?
Reply #4 - Feb 4th, 2010 at 3:21pm
Print Post Print Post  
If you use CreateAProcess you can force the report to open in Internet Explorer (as well as your default, Firefox).  I have a report that prints a bare-bones Invoice report to IE, because we sometimes send them via email and Firefox does not have the "File-Send-Page by Email" ability that IE does.  Here's my code for the "Print To Browser" button:
Code
Select All
#INCLUDE "sbasic_include.sbas"

Var vFilename as String
var vCount as Int

vCount = @ResultSetTotal()

IF @MODE() = 2
THEN @MSGBOX("This button only works in ADD or UPDATE mode", "", "")
ELSE
IF vCount > 1
THEN @MSGBOX("This printout only works for a single Invoice.", "You have retrieved " + vCount + " Invoices", "Please narrow your selection to one record.")
ELSE
IF vCount = 1
THEN
	{
	vFilename = @PrintAReport("Invoice to Browser", REPORT_MODE_HTML_PREVIEW, PRINT_ORIENTATION_PORTRAIT, 0, -1, -1, -1, -1, -1, -1)
	CreateAProcess("C:\Program Files\Internet Explorer\iexplore.exe " + vFilename)
	} 


Hopefully there's something there you can use.
  

**
Captain Infinity
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: HTML report output file: can it be edited?
Reply #5 - Feb 4th, 2010 at 3:50pm
Print Post Print Post  
questionmarke wrote on Feb 3rd, 2010 at 10:15pm:
For now we overcome this obstacle by printing the html, which pops up in Firefox, then we copy and paste the resulting URL manually into Internet Explorer. Ultimately, continuing this method may prove to be the simplest solution.


An easier method is to set the SESAME_PRINT_PREVIEW_COMMAND System Variable. This is documented in the Inside Sesame issue for November 2006.

This will allow you to use FireFox for everything else, but when you print a report from Sesame, it will open in IE (or whatever you tell it to use in the System Variable).
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Ben
Lantica Support
*****
Offline



Posts: 218
Joined: Apr 7th, 2005
Re: HTML report output file: can it be edited?
Reply #6 - Feb 4th, 2010 at 6:22pm
Print Post Print Post  
Hello Mark,
There is a optional ini file entry that should allow you to print from Firefox and still retain your page breaks. Please open the Sesame.ini file (C:/Sesame2/Sesame.ini) and add the line below.

Report Page Break Always: On
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: HTML report output file: can it be edited?
Reply #7 - Feb 4th, 2010 at 7:51pm
Print Post Print Post  
Note: Ben's suggestion only works if you have actual Sesame Page Break elements in your report. What you will want to do is take a look at the report and see if you have a gray element that says "Page Break". If not then the Page break may be being inserted through programming or through a static text element in your report. A Sesame Page Break Element will close the table, break the page, and then re-open the table.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
questionmarke
Member
*
Offline



Posts: 8
Joined: Feb 2nd, 2010
Re: HTML report output file: can it be edited?
Reply #8 - Feb 5th, 2010 at 1:34am
Print Post Print Post  
Ooh, so many people chiming in on this one! Thanks, everyone for the feedback. I'll dig around and see what we can come up with. Will check back in after.

Thanks,
Mark
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: HTML report output file: can it be edited?
Reply #9 - Feb 5th, 2010 at 8:17pm
Print Post Print Post  
FireFox also has an AddOn, "Send Page By Email".  Current version is 0.6.3.  I have had it on my system for a few years.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged