Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frx2Any closes my currently opened table after finishing with PDF creation!!!

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
542
MU
Dear Team!

The scenario is like this. I have a table with a few records containing the policy_no for which a report form needs to be used to create pdf. The report form compiles the data for the report from multiple tables. When I supply this report form to Frx2Any to create PDF, after it shows '100% converted', it closes my first loop table.

The flow is as follows:

Code:
select cPolicies
scan 
   nPolicy = policy_no
   I call frx2any here...
   pdf is created

   here the cPolicies table gets closed.
endscan

Any idea?
Thanks in advance.

Rajesh
 
Reports do scan the current table to the end.

To do multiple reports scan and then REPORT FORM ... NEXT 1. Reports act on scopes like FOR condition or NEXT n or WILE as the REPLACE command does. Provided your report has no private datasession and is controlled in the amount of data to print from outside.

But without any such scope clause, you print all record from current position. That's just normal.

Bye, Olaf.
 
Hi Olaf,

My report form uses Private Data Session.
Let me once again try to figure out the problem.

Rajesh
 
Are you sure it's closed, not just at EOF() (ending the scan).

Code:
select cPolicies
scan 
   nPolicy = policy_no
   I call frx2any here...
   pdf is created
   if !used("cPolicies")
       messagebox("Oh Wow, my table is closed")

   endif
   here the cPolicies table gets closed.
endscan




Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Dear GriffMG,

Yes, it gets closed. I think, the problem is elsewhere. Let me check myself first before I make you all spend your valuable time on this. Anyway, thank you for your support.

Rajesh
 
The private datasession means you can't prepare it with data from outside. Make a copy of the report, remove all data and relations from the DE, make that DE the default datasession and do as you planned open tables before calling into the report and position on the record.

You can't mix a call of REPORT FORM with a data scope with a report retrieving it's data via it's date environment, not only when the datasession is private.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top