HTML report sample

HTML report sample

Postby Otto » Fri Jul 02, 2021 10:57 pm

Hello friends,

I think that the HTML report is not that bad after all.
The subsequent replacement of the "placeholders" simplifies the program.
Best regards,
Otto

Code: Select all  Expand view

       cHtml += memoread("c:\fwh\samples\manfred.html")
       cHtml := STRTRAN( cHtml, "[text1]", "Text einmalig pro Seite(1)" )
       cHtml := STRTRAN( cHtml, "[text2]", "Text einmalig pro Seite(2)" )
    cHtml := STRTRAN( cHtml, "[text3]", "Januar 2021" )
    cHtml := STRTRAN( cHtml, "[text4]", "Februar 2021" )
    cHtml := STRTRAN( cHtml, "[text5]", "März 2021" )
    cHtml := STRTRAN( cHtml, "[text6]", "April 2021" )
    cHtml := STRTRAN( cHtml, "[text7]", "Mai 2021" )
    cHtml := STRTRAN( cHtml, "[text8]", "Juni 2021" )
    cHtml := STRTRAN( cHtml, "[text9]", "Juli 2021" )
    cHtml := STRTRAN( cHtml, "[text10]", "August 2021" )
    cHtml := STRTRAN( cHtml, "[text11]", "September 2021" )
    cHtml := STRTRAN( cHtml, "[text12]", "Oktober 2021" )
    cHtml := STRTRAN( cHtml, "[text13]", "November 2021" )
    cHtml := STRTRAN( cHtml, "[text14]", "Dezember 2021" )
    cHtml := STRTRAN( cHtml, "[text15]", "Text einmalig pro Seite(3)" )
    cHtml := STRTRAN( cHtml, "[text16]", "Text einmalig pro Seite(4)" )
        cHtml := STRTRAN( cHtml, "[text19]", "„Lorem ipsum dolor sit amet, consectetur adipisici elit, …“ ist ein Blindtext" )
        memowrit(cHtmlOrUrl, cHtml)

     PrintHtml(cHtmlOrUrl,1,.t.)
 


LG
Otto


Image

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby elvira » Sun Jul 11, 2021 10:21 am

Otto,

It is much better to use a Word file for the report layout than what you do with HTML, because the client is not going to be able to change anything but with Word he can.

Regards
elvira
 
Posts: 515
Joined: Fri Jun 29, 2012 12:49 pm

Re: HTML report sample

Postby Otto » Sun Jul 11, 2021 10:43 am

Hello Elvira,
Yes you are right.
But I think it depends on the case and the report you want to create.
I have also made the experience that the users do not actually make any changes themselves. They usually let them help with this.

What is nice about these HTML reports is that the finished report is also saved as HTML.
Then you can open the reports with WORD and make the changes. The changes can then simply be adopted in the source code.

The fact is that the print results are professional, very professional .

Now Instructions are needed on how the user can change the reports.
The reports like FastReport or L&L have designers but a user can certainly not make any designs himself.
It's way too complicated and dangerous.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby leandro » Mon Jul 12, 2021 12:52 am

Amigo otto buenas tardes,

Me gustaría probar el generador de reportes html, pero no logro encontrar el ejemplo para hacer uso de este con harbour/xharbour.

Podrías publicarlo?

De antemano gracias,
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1481
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: HTML report sample

Postby Otto » Tue Jul 13, 2021 6:51 am

Hello Leandro,
I am happy to give you my example.
Can you write me a private message?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Otto » Mon Jul 19, 2021 5:02 pm

Hello friends,

The first report generator that I used for my WINHOTEL version 1.0 (1995) was CA-Ret, which was part of VO.

Image

After CA-Ret was discontinued, I also tested with the RTF format, among other things. It's very similar to HTML.
But MS then started to save the images directly into RTF. Searching and replacing then took much time (286, 386 PCs).

Now I'm going to try a similar way again with HTML.


It's also funny what kind of "joke" we had back then.
If a woman was registered as a user, we displayed Wilma otherwise Fred as an icon.

Image




Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Otto » Sat Jul 24, 2021 11:04 am

Hello Leandro,

Just out of interest I would like to ask you whether you have got my emails?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Marc Venken » Sat Jul 24, 2021 11:36 am

Otto wrote:Hello friends,

I think that the HTML report is not that bad after all.
The subsequent replacement of the "placeholders" simplifies the program.
Best regards,
Otto

Code: Select all  Expand view

       cHtml += memoread("c:\fwh\samples\manfred.html")
       cHtml := STRTRAN( cHtml, "[text1]", "Text einmalig pro Seite(1)" )
       cHtml := STRTRAN( cHtml, "[text2]", "Text einmalig pro Seite(2)" )
    cHtml := STRTRAN( cHtml, "[text3]", "Januar 2021" )
    cHtml := STRTRAN( cHtml, "[text4]", "Februar 2021" )
    cHtml := STRTRAN( cHtml, "[text5]", "März 2021" )
    cHtml := STRTRAN( cHtml, "[text6]", "April 2021" )
    cHtml := STRTRAN( cHtml, "[text7]", "Mai 2021" )
    cHtml := STRTRAN( cHtml, "[text8]", "Juni 2021" )
    cHtml := STRTRAN( cHtml, "[text9]", "Juli 2021" )
    cHtml := STRTRAN( cHtml, "[text10]", "August 2021" )
    cHtml := STRTRAN( cHtml, "[text11]", "September 2021" )
    cHtml := STRTRAN( cHtml, "[text12]", "Oktober 2021" )
    cHtml := STRTRAN( cHtml, "[text13]", "November 2021" )
    cHtml := STRTRAN( cHtml, "[text14]", "Dezember 2021" )
    cHtml := STRTRAN( cHtml, "[text15]", "Text einmalig pro Seite(3)" )
    cHtml := STRTRAN( cHtml, "[text16]", "Text einmalig pro Seite(4)" )
        cHtml := STRTRAN( cHtml, "[text19]", "„Lorem ipsum dolor sit amet, consectetur adipisici elit, …“ ist ein Blindtext" )
        memowrit(cHtmlOrUrl, cHtml)

     PrintHtml(cHtmlOrUrl,1,.t.)
 



You will bring this kind of conversions (coded) into a xbrowse replacement i suspect in order to manipulate the conversion data into a browse ?
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1343
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: HTML report sample

Postby Otto » Sat Jul 24, 2021 4:31 pm

Hello Marc,
I have emailed you a link where you can download this example.
There is also an example inside how to print ARRAYs.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Marc Venken » Sun Jul 25, 2021 11:13 pm

Hey Otto,

I looked into you sample and could make a xbrowser based changer of the data, so that they are not coded in the prg.
I left a routine for looking up your data : text1, text2, text3 enz..
but I also made a version using a other labeling way :
prefix : #_ and a readable name : #_name, #_adres, #_phone etc.. that will be used in the html

I got a error when using it on my laptop with no IE. Is it only IE that you use for this ? I think the error is comming from it, but not shure

Time from start: 0 hours 25 mins 42 secs
Error occurred at: 26-07-2021, 00:55:41
Error description: Error BASE/1004 No exported method: HWND
Args:
[ 1] = U

Stack Calls
===========
Called from: => HWND( 0 )
Called from: .\source\classes\ACTIVEX.PRG => TACTIVEX:NEW( 75 )
Called from: iz_doc_1.prg => PRINTHTML( 157 )
Called from: iz_doc_1.prg => REPORT( 126 )
Called from: iz_doc_1.prg => (b)MAIN( 37 )

But what I wonder the most is that for a report like this, the HTML file has : 1.100 rows of text ????
Looking at that html file and the difficulty of the content... i see no normal use of it. way to complex for just a report.
I'm lost now on what you are trying to do for normal use...
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1343
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: HTML report sample

Postby Otto » Mon Jul 26, 2021 7:52 am

Hello Mark,
Yes, you are right. WORD creates an inflated source code.

But first a fact.
The most important thing about a report is the printout.
And this one is undeniably very professional.


Actually, you don't have to edit anything directly in the HTML source code.
You can easily design the form with WORD.

If I use WORD for the first draft, then I open the HTML file with OpenOffice.
OpenOffice removes all WORD-specific tags.
Then the source code looks like this.

Image

I also have a function that removes the unnecessary OpenOffice tags.

function cleansouce( cHtml)

for example:
cHtml := STRTRAN( cHtml, 'LANG="en-GB', ''")


return ()


But again. At the moment, there is no report system available to us that makes it easier for you to create such professional-looking reports.


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Otto » Mon Jul 26, 2021 8:13 am

Mark,
You only need these two functions from the WORD template to your finished report.
<hr>
Extract placeholders from HTML
Image

and replace the placeholder
<hr>
FOR I: = 1 to len (aText)
cHtml: = STRTRAN (cHtml, aText [I, 1], aText [I, 2])
next
<hr>

aText [I, 2] is your data
Image





Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm

Re: HTML report sample

Postby Otto » Wed Jul 28, 2021 8:08 am

Hello Marc,
a special example for you. :-)

Image

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6003
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 77 guests