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!

Report's " Private Data Session"

Status
Not open for further replies.

OraWiz

Programmer
Aug 17, 2003
37
IN
I am calling a report from a FORM to show the data in the form in a report format.
In Report format Private Data Session is un-ticked
Report’s Data source is a view that consists of FORM’s table.

My problem is; when the report is closed the FORM’s DataEnvironment is not accessible
If the Private Data Session is ticked then rows are duplicating in the report and there is no problem in the form also. How can I sort out the problem.

I am rather new to Report tool. I am using VFP6
Somebody pls. help me
Thanks and Regards
Sebastian

 
Orawiz

Try using a cursor for your report with a private datasession.
select * from myformTable into cursor myReportcursor.
report form....



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Dear Mike
I have tried this also, but when I am selecting Private data session, the Rows are duplicating, irrespective of cursor or view.
Rgds
Sebastian


 
OraWiz,

Rows are duplicating

...if you mean that the detail section is showing duplicate records then that is a problem with your cursor or view most likely, there is not a native setting in the report designer or the dataenvironment that will give you duplicate records that I know of. Get rid of the duplicate rows in your datasource (cursor or view) and your report should also reflect this.

Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
Dear Slighthaze

I do agree with you, but if I unselect Private_data_session then the rows are coming properly with out any duplication. More over, if I run the query in Command Window the result are coming properly, That shows my query have no problem Same query I am putting in INIT event of the Data_Environment. That makes me clueless

Sebastian





 
Orawiz

As I suggested, remove anything from the DataEnvironment of the report and just use a cursor.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I have tried the possibilities View, Cursor.
The Phenomena of duplication is happening,
if Private Data Session is Enabled (ticked)
the query is working some different way and giving duplication.(assumption) I give up ....

Finally I tried with the source tables in the DataEnvironment with proper link.
Then the report is working properly.

Thanks for all reply
Sebastian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top