Passing data from application
Passing data from application
Hi,____I have a xbase++ application and I use R&R 12.5. In the application I have a screen that contains a summary table displaying a calculated array of data (9 rows by 32 columns). Due to the vast amount of calculations required this array is calculated in memory using c++ sub-routines and then displayed once calculated.____Is there a way to pass this array to R&R so that I do not have to build the report logic to recalculate when I run a report that requires this data?____Best regards,____Bruce__
=> RE: Passing data from application
There is not a direct way to do this.__But if you can tell me how the data will be used in the report, maybe I can think of an indirect way to get there.__ ____Kathleen__R&R Support
==> RE: Passing data from application
Kathleen,____I have now moved forward with this issue and have a function that dumps the complete array to a dbf file.____I now need to know how to use a dbf file within an existing report whose name will be randomly generated but known? Can I pass the dbf file name in someway to the RR report?____Best regards,____Bruce____
-
- Posts: 32
- Joined: Tue Oct 10, 2017 12:44 pm
=> RE: Passing data from application
What about making a program that will copy the calculations to a single record databases file. Then you can link it using the recno link of 1.____I do this a lot with my xbase programs. I create a dbf file using the users login name that I give them, such as U1, U2 etc.____I then create the structure of the database, perform the calculations and copy each calculation to the appropriate field.______Tom Freitas__
==> RE: Passing data from application
Tom,____This is almost what I am doing - however I am unsure how to indicate that the data base name changes each time the report is run dependent on the user running the report. Is there a way of over-riding or passing a variable to R&R to indicate which data base to take the data from?____Best regards,____Bruce__
===> RE: Passing data from application
If you use runtime you can use one of the RI_ALIAS fields to override a saved related table in a report. It is all explained in the help file.____Kathleen__R&R Support
-
- Posts: 32
- Joined: Tue Oct 10, 2017 12:44 pm
===> RE: Passing data from application
Kathleen,____I have started to use your suggested method. I can now access the db in the report, however, as the db will always have 11 records and they are all needed to be displayed in the Summary section....: How do I control R&R to skip through each of the 11 records and display the contents? ____I have tried linking the db to the report via a calculated field value of 1. If I then try and increment the 1 to get the other records R&R will crash. I could set-up 11 link fields and 11 aliases but this would seem a crude way of controlling this type of requirement.____Suggestions welcome!____Best regards,____Bruce____
====> RE: Passing data from application
Bruce,____In my xbase program, I have a file called permatrs.dbf I use this file for passing data and I keep it unique by user. I also have a table where I keep all the users of the program. I then create a variable, such as "U"+ltrim(str(recno()))+".DBF". U is for user, then the record number and the .dbf. I use the entire name with the .dbf to make it easier to delete once I am finished.____I then use my permatrs.dbf file and copy the structure to the variable name, let^s say I call it test! I then use &test and append blank then fill in all the appropriate data without interfering with anyone else.____Now I use my control file, rrwrunin.dbf, (as information, I also copy this to a unique name for each user.). In the control file, rrwrunin.dbf, I replace the ri_alias1 with "permatrs="+test____Now when I run the report the RR report will automatically substitute the permatrs.dbf file with the newly create test file. ____Tom Freitas
====> RE: Passing data from application
Thank you both for your ideas - I think I now have a way forward. I will let you know which option works best.____Best regards,____Bruce__
=====> RE: Passing data from application
Tom & Kathleen,____Many thanks for both your help with this matter. I now have a working solution based partly on advice from each of you and by also using the RIPARM() function (very powerful feature that I had not tried before).____Best regards,____Bruce__