1 (edited by meideprac-x 2016-07-26 10:04:04)

Topic: Pass a variable to a report

Hi,
Anyone know how could I pass the value of a variable to a report without using a table or a view ??
( something like frVariables[ ] )
Thanks!
Javi

Re: Pass a variable to a report

Hello,


Can you more explain about your question?

Dmitry.

Re: Pass a variable to a report

DriveSoft wrote:

Hello,


Can you more explain about your question?

Hi Dimitry!!!
I'm using the function Real2CheckAmount that you explain in other topic, to wirte numbers in Catalan language (Spain), and all works fine. The problem is that I get a result like this "dos-cents cinquanta-nou euros i vint-i-cinc cèntims"., stored in a variable just before activate the report SQL. And I don't know how could I print that in my report (a sort of payment receipt), as I have tried to store it in a column of a table but do not get it (a syntax error I know not resolve).
I thought maybe I could send it to the report through a variable, but some instruction I've found, in MVD is not supported (like global object       frVariables['Reporting Period'] := 'January';         ).
I hope I explained now, excuse for my English.
Thanks.
Regards!
Javi

Re: Pass a variable to a report

meideprac-x
Please attach your project, I'll try to help you.

Dmitry.

Re: Pass a variable to a report

DriveSoft wrote:

meideprac-x
Please attach your project, I'll try to help you.

Hi Dimitry!

- It should be very simple but I can not resolve a syntax error when I save a record within script (than you can see it works perfectly within an action "save record").

- How could I pass var "words" to the report SQL without using a table ??

- In the script you wrote to pass numbers to words, it would be possible that when the cents were 0, it dont write "zero cents" ??

Thanks!

Javi

Post's attachments

Attachment icon ToWords by script.zip 342.93 kb, 494 downloads since 2016-07-29 

Re: Pass a variable to a report

meideprac-x wrote:
DriveSoft wrote:

meideprac-x
Please attach your project, I'll try to help you.

Hi Dimitry!

- It should be very simple but I can not resolve a syntax error when I save a record within script (than you can see it works perfectly within an action "save record").

- How could I pass var "words" to the report SQL without using a table ??

- In the script you wrote to pass numbers to words, it would be possible that when the cents were 0, it dont write "zero cents" ??

Thanks!

Javi

1.
In this code you shold replace Form1.import_w.Text to Form1.import_w.sqlValue

   SQLExecute ('INSERT INTO base (nom, import_v, import_w) Values ('+Form1.nom.sqlValue+','+Form1.import_v.sqlValue+','+Form1.import_w.Text+')');

2. It's no need, you should use this script in the report.

3. Fixed.


Fixed project attached.

Post's attachments

Attachment icon ToWords by script_fixed.zip 14.87 kb, 569 downloads since 2016-07-29 

Dmitry.

Re: Pass a variable to a report

Thanks Dimitry for your help!!! That works fine now