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)
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Need Guidance Please

Postby hemantpandya » Thu May 05, 2016 7:38 am

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
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: Need Guidance Please

Postby ignacio » Thu May 05, 2016 10:32 am

Try to put the method Create() first.

Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Re: Need Guidance Please

Postby hemantpandya » Fri May 06, 2016 6:26 am

Hi Ignacio,

Thanks for guidance but that did not help.

Regards
Hemant
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: Need Guidance Please

Postby ignacio » Fri May 06, 2016 9:22 am

Sorry you must create the category first:

Code: Select all

:AddCategory( "personal" )
:AddVariable( "test", 123 )


Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Re: Need Guidance Please

Postby hemantpandya » Sun May 08, 2016 3:40 am

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
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: Need Guidance Please

Postby ignacio » Mon May 09, 2016 9:32 am

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) Viewed 2959 times


About the variables issue: I have just modified our FR console demo with this code:

Code: Select all

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) Viewed 2959 times


Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Re: Need Guidance Please

Postby hemantpandya » Wed May 11, 2016 7:32 am

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
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: Need Guidance Please

Postby ignacio » Wed May 11, 2016 10:19 am

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]
http://www.xailer.com
http://www.xailer.info
hemantpandya
Posts: 11
Joined: Wed Apr 20, 2016 7:30 am

Re: Need Guidance Please

Postby hemantpandya » Fri May 13, 2016 4:06 am

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 [b]'_HB_FUN___BREAKBLOCK'[/b] referenced from C:\MINIGUI\HARBOUR\LIB\XAFRHBCC.LIB|iFastReport
Link error.

Please guide me which LIB I am missing.

Regards
Hemant
anser
Posts: 2
Joined: Sat Mar 11, 2017 5:59 am

Re: Need Guidance Please

Postby anser » Wed May 10, 2017 11:09 am

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
User avatar
ignacio
Site Admin
Posts: 8559
Joined: Mon Apr 06, 2015 8:00 pm
Location: Madrid, Spain
Contact:

Re: Need Guidance Please

Postby ignacio » Wed May 10, 2017 1:33 pm

Code: Select all

   ::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]
http://www.xailer.com
http://www.xailer.info

Return to “FastReport”