Code Comments
Programming Forum and web based access to our favorite programming groups.Hi all,
I created a DataEnvironment and a corresponding DataReport. The
DataEnvironment has a commaind (main table) and two other child-commands
that exposes related data other tables. The concept is identical to what the
NorthWind database uses with its "Orders" and "Order Details". I set the
report to point to the parent command ("Orders" in the case of the NorthWind
database) and then tried to drag and drop a child field from one of the
sub-commands to the Details section (or any other section for that matter)
and all I get is a circle with a line through it. If I add a text box and
then use the dropdown on the Data Member all I see is the parent command,
not the two child commands. I might point out that the report Data Member
objects sees all commands nicely. How do I get the report to accept data
fields from the various sub-commands, like in the NorthWind sample?
Thanks in advance,
--
Martin A. Weinberger
ButterflyVista
http://www.butterflyvista.com/
Post Follow-up to this messageMay want to check out the Shaped Recordset sample report at: http://www.veign.com/vrc_codeview.asp?type=app&id=24 -- Chris Hanscom - Microsoft MVP (VB) Veign's Resource Center http://www.veign.com/vrc_main.asp -- Read. Decide. Sign the petition to Microsoft. http://classicvb.org/petition/ "Martin A. Weinberger" <tg_mweinberger@butterflyvista.com> wrote in message news:u3CxGGkYFHA.3840@tk2msftngp13.phx.gbl... > Hi all, > > I created a DataEnvironment and a corresponding DataReport. The > DataEnvironment has a commaind (main table) and two other child-commands > that exposes related data other tables. The concept is identical to what the > NorthWind database uses with its "Orders" and "Order Details". I set the > report to point to the parent command ("Orders" in the case of the NorthWind > database) and then tried to drag and drop a child field from one of the > sub-commands to the Details section (or any other section for that matter) > and all I get is a circle with a line through it. If I add a text box and > then use the dropdown on the Data Member all I see is the parent command, > not the two child commands. I might point out that the report Data Member > objects sees all commands nicely. How do I get the report to accept data > fields from the various sub-commands, like in the NorthWind sample? > > Thanks in advance, > > -- > Martin A. Weinberger > ButterflyVista > http://www.butterflyvista.com/ > > > >
Post Follow-up to this messageHi Veign, I took a look at the sample. At least at first look, it wasn't very helpful. DataReport1 uses DataEnvironment1 as its Data Source. I explained on my other thread on how I set things up. If I run the report, I see everything fine, okay sans the other two sub-tables. The problem is that unloding the Data Report doesn't release the lock. When I go to print again and want to manually delete the file, I get a permission denied. I visually see that there is a ldb file indicating the lock, so hence the permission denied. To my knowledge I'm not doing anything special. Thanks in advance for any thoughts. -- Martin A. Weinberger ButterflyVista http://www.butterflyvista.com/
Post Follow-up to this messageYou asked about viewing child records in a DataReport. The sample shows the use of a Shaped recordset to display a Parent / Child report in the DataReport. You mentioned nothing about file locks in this thread. -- Chris Hanscom - Microsoft MVP (VB) Veign's Resource Center http://www.veign.com/vrc_main.asp -- Read. Decide. Sign the petition to Microsoft. http://classicvb.org/petition/ "Martin A. Weinberger" <tg_mweinberger@butterflyvista.com> wrote in message news:%23Cp%235XlYFHA.712@TK2MSFTNGP14.phx.gbl... > Hi Veign, > > I took a look at the sample. At least at first look, it wasn't very helpful. > DataReport1 uses DataEnvironment1 as its Data Source. I explained on my > other thread on how I set things up. If I run the report, I see everything > fine, okay sans the other two sub-tables. The problem is that unloding the > Data Report doesn't release the lock. When I go to print again and want to > manually delete the file, I get a permission denied. I visually see that > there is a ldb file indicating the lock, so hence the permission denied. To > my knowledge I'm not doing anything special. > > Thanks in advance for any thoughts. > > -- > Martin A. Weinberger > ButterflyVista > http://www.butterflyvista.com/ > >
Post Follow-up to this messageSorry, I guess that I'm just tired. I posted to the wrong thread. Although I still have a lot to learn about the Data Reporter and SQL in general, I think that there is a miscommunication. I'll look at your sample again, but what I did is create a parent command using a custom SQL Statement. In its simple for say: Parent Command (DataEnvironment): SELECT Table1.*, Table2.* FROM Table1 LEFT JOIN Table12 ON Table1.Key = Table2.Key; Sub Command (DataEnvironment) SELECT Table3.* FROM Table1 INNER JOIN Table1 ON Table1.Key=Table3.Key; When I attach the Data Environment to the DataReport, the DataReport designer only allows me to access data from the parent, not the child domains. I created the SQL statements using Access, so I know they work, at least as far as Access is concerned. Thanks a lot for your help Veign, -- Martin A. Weinberger ButterflyVista http://www.butterflyvista.com/
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.