In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Need Guidance Please

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Need Guidance Please

Mensaje por hemantpandya »

Hi All,

It's me again need guidance. How to use harbour side variable in FRH.
trying with following code but unable to add variable to Report Variable list.

Please guide me.

Thanks in advance

Regards
Hemant
Sydney - Australia

MY code
function create_report()

use group shared new
set orde to 1

vCmpName := "ABC Company Pty Ltd" //<<- want to this variable in report
vCmpCity := "Sydney" //<<- want to this variable in report

WITH OBJECT oReport := TFastReport():New()

:AddDbf( "group", { "group->*" } )
:AddVariable("Company", vCmpName)
:AddVariable("City", vCmpCity)
:Create()
:DesignReport()
:End()
END WITH

retu
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Need Guidance Please

Mensaje por ignacio »

Try to put the method Create() first.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Re: Need Guidance Please

Mensaje por hemantpandya »

Hi Ignacio,

Thanks for guidance but that did not help.

Regards
Hemant
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Need Guidance Please

Mensaje por ignacio »

Sorry you must create the category first:

Código: Seleccionar todo

:AddCategory( "personal" )
:AddVariable( "test", 123 )
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Re: Need Guidance Please

Mensaje por hemantpandya »

Hi Ignacio,

Tried as per your instructions but no luck did not see any Category or Variable in Report designer under Variable Tab.

I creating report using Designer but it generated reports for 4 Pages only (No Watermarks).

Please guide me.

Regards
Hemant
Sydney -Australia
my code
function create_report()

use group shared new
set orde to 1

vCmpName := "ABC Company Pty Ltd" //<<- want to this variable in report
vCmpCity := "Sydney" //<<- want to this variable in report

WITH OBJECT oReport := TFastReport():New()
:AddDbf( "group", { "group->*" } )
:Create()
:AddCategory("Personal")
:AddVariable("Company", vCmpName)
:AddVariable("City", vCmpCity)

:DesignReport()
:End()
END WITH

retu
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Need Guidance Please

Mensaje por ignacio »

Hello,
I creating report using Designer but it generated reports for 4 Pages only (No Watermarks).
2016-05-09 09_27_05-Ayuda de HTML.png
2016-05-09 09_27_05-Ayuda de HTML.png (11.4 KiB) Visto 50615 veces
About the variables issue: I have just modified our FR console demo with this code:

Código: Seleccionar todo

FUNCTION BioLife()
   LOCAL oReport
   .....
   WITH OBJECT oReport := TFastReport():New()
      ......
      :Create()
      ......
      :AddCategory( "personal" ) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      :AddVariable( "test", 123 ) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      ......
   END WITH
   .....
And ...
2016-05-09 09_31_21-FastReport - Biolife.fr3.png
2016-05-09 09_31_21-FastReport - Biolife.fr3.png (5.36 KiB) Visto 50615 veces
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Re: Need Guidance Please

Mensaje por hemantpandya »

Hi Ignacio

Thanks for your guidance for report (4 Page Problem) that's works perfect

but still I am not able to add the variable. I am using Harbour/Mingui

Harbour 3.2.0dev (r1406271520)
Copyright (c) 1999-2014, http://harbour-project.org/
Compiling 'con_frh.prg'...
Lines 13070, Functions/Procedures 2
Generating C source output to 'con_frh.c'... Done.

C:\Akola_Changes\oohg_new\FRH_Report\Trial>

Operating System

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

Also tried on Windows 8, Windows 7, Win XP and tried to compile with

and when trying to compile with Harbour/BCC and getting following error

C:\MiniGUI\SAMPLES\BASIC\FRX_Test>call ..\..\..\batch\compile.bat grp_dtl
Harbour 3.0.0 (Rev. 16950)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'grp_dtl.prg'...
Lines 20545, Functions/Procedures 3
Generating C source output to 'grp_dtl.c'... Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
grp_dtl.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN___BREAKBLOCK' referenced from C:\MINIGUI\HARBOUR\LIB\XAFRHBCC.LIB|iFastReport
Link error.

If required please let me know I will send you PRG/BAT/DBF Files for your review.

Please guide me.

Regards
Hemant

My Consol mode code
#include "oohg.ch"
#include "i_color.ch"
#include "frh.ch"

ANNOUNCE HB_GT_SYS
REQUEST HB_GT_WVT_DEFAULT

*----------------------------------------------------------------------------------*
Function Main()
*----------------------------------------------------------------------------------*
LOCAL oReport

SetMode( 25, 80 )
SetColor( "N/W" )
CLS

@ 10,10 say 'Hello'
use group shared new
set orde to 1


vCmpName := "ABC Company Pty Ltd" //<<- want to this variable in report
vCmpCity := "Sydney" //<<- want to this variable in report

WITH OBJECT oReport := TFastReport():New()
:Create()
:AddCategory( "Personal" )
:AddVariable( "Company", vCmpName )
:AddVariable( "City", vCmpCity )

:AddDbf( "group", { "group->*" } )

:DesignReport()
:End()
END WITH
Return nil
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Need Guidance Please

Mensaje por ignacio »

Hello,

There must be a report loaded and its not a FRX limitation but a FR limitation. Just create an empty report and loaded it first. It should work.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
hemantpandya
Mensajes: 11
Registrado: Mié Abr 20, 2016 7:30 am

Re: Need Guidance Please

Mensaje por hemantpandya »

Hi Ignacio,

Thanks for all your help and guidance but no luck.

I tried to generate report from scratch but no luck.

Trying to compile with Harbour/MiniGUI/BCC and getting following error

C:\MiniGUI\SAMPLES\BASIC\FRX_Test>call ..\..\..\batch\compile.bat grp_dtl
Harbour 3.0.0 (Rev. 16950)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'grp_dtl.prg'...
Lines 20545, Functions/Procedures 3
Generating C source output to 'grp_dtl.c'... Done.
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
grp_dtl.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Error: Unresolved external '_HB_FUN___BREAKBLOCK' referenced from C:\MINIGUI\HARBOUR\LIB\XAFRHBCC.LIB|iFastReport
Link error.

Please guide me which LIB I am missing.

Regards
Hemant
anser
Mensajes: 2
Registrado: Sab Mar 11, 2017 5:59 am

Re: Need Guidance Please

Mensaje por anser »

Hi Hemant,

Were you able to resolve the AddVariable Issue ?

I too face the same issue. The variables added via oFr:AddVariable() does not appear in the FastReport
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9250
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

Re: Need Guidance Please

Mensaje por ignacio »

Código: Seleccionar todo

   ::oFastReport1:AddVariable("VAR1", "this is a test")
   ::oFastReport1:ShowReport()
This is working nicely on any FR sample.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
Responder