Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reporting from a view - HELP!
Message
From
11/11/1997 09:56:27
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00059393
Message ID:
00059498
Views:
31
>>I have a grid on my form that is based on a view and I want to print a simple report of what shows in the grid. I used the Report Wizard to design a report from this view. The report contains ONLY fields from this view. In my Print button on my form, I simply say:
>>
>>select MyView
>>report form PrintView to print noconsole
>>
>>For some unknown reason, the report is trying to print from another table! If I suspend after the 'select MyView' command I see that MyView is NOT actually selected, but I can't figure out why.
>>
>>More details:
>>1) It doesn't matter whether or not the fields in the report have an alias.
>>2) It doesn't matter whether or not MyView is in the DataEnvironment of the report.
>>3) If I step through the code from before the 'select', it works fine.
>>4) If I 'Browse' instead of 'Report form...', it is on the right file.
>>5) The STRANGEST - if I say 'preview' instead of 'to print', it previews fine!
>>
>>I've tried everything I can think of to no avail. This is happening in more than one form with different sets of files/views. Any help would be GREATLY appreciated!
>>
>>Thanks
>>Elyse
>
>Elyse, try setting the DataSession of the Report to Private. This will force it to look to its own DataEnvironment where you've called the view.
>
>An alternative, is to set the DataSession to default, remove the view from the data environment (this won't affect fields on the report) and make sure the view is requeried and active (Selected) before you run the report.
>
>HTH
>Barbara

I've been avoiding using a private DataSession because the user can set a filter and choose an order on what they see in the grid and I'd like to print it as they see it. Using a private DataSession means resetting the filter and order. I tried removing the view from the report's DataEnvironment but it didn't help. I select the view immediately before printing the report, but like I said, it doesn't seem to be selected.

Elyse
Elyse Pomerantz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform