|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do you make child sub-commands visible in DataReport controls?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, May want to check out the Shaped Recordset sample report at:
http://www.veign.com/vrc_codeview.asp?type=app&id=24 -- Show quoteHide quoteChris 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_mweinber***@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/ > > > > 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. You 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. -- Show quoteHide quoteChris 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_mweinber***@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/ > > Sorry, 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, From a post by Jeff Johnson:
"You have posted this question individually to multiple groups. This is called Multiposting and it's BAD. Replies made in one group will not be visible in the other groups, which may cause multiple people to respond to your question with the same answer because they didn't know someone else had already done it. This is a waste of time. If you MUST post your message to multiple groups, post a single message and select all the groups (or type their names manually, separated by commas) in which you want it to be seen. This is called Crossposting and when used properly it is GOOD." -- Show quoteHide quoteChris 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_mweinber***@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/ > > > >
Generate email from user
Correct way to get random results with arrays Run IE from VB6 ? VB6 vs VB.net compatibility Restore Form to Prior State Problem returning DISTINCT records - MS Access Can VB6 & VB.net co-exist How do I put the focus back in a text box Releasing lock on MDB file after DataReport1 closes How do your read selected values from a BOUND ListBox in VB.Net |
|||||||||||||||||||||||