all groups > sql server reporting services > april 2005 >
I have 2 textbox within my detail table that has 2 subreport. Then in each subreport, it contains 1 stored procedure. Is it possible to do some calculation with those two textboxes? Example: Textbox1 - Textbox2 = 1234 Can someone tell me if this is possible? If not will RS 2 might have this option. So far I have no luck in doing calculation from one textbox with another. I can only use fields to do calculation if it exists, but just
try: =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value [quoted text, click to view] "chang" wrote: > I have 2 textbox within my detail table that has 2 subreport. Then in each > subreport, it contains 1 stored procedure. Is it possible to do some > calculation with those two textboxes? > > Example: Textbox1 - Textbox2 = 1234 > > Can someone tell me if this is possible? If not will RS 2 might have this > option. So far I have no luck in doing calculation from one textbox with > another. I can only use fields to do calculation if it exists, but just
There is one "=" too much in Mary's expression. Try this instead: =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value Note: there are scope limitations on which textboxes within a report can be referenced. -- This posting is provided "AS IS" with no warranties, and confers no rights. "Mary Bray [SQL Server MVP]" [quoted text, click to view] <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... > try: > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value > > "chang" wrote: > >> I have 2 textbox within my detail table that has 2 subreport. Then in >> each >> subreport, it contains 1 stored procedure. Is it possible to do some >> calculation with those two textboxes? >> >> Example: Textbox1 - Textbox2 = 1234 >> >> Can someone tell me if this is possible? If not will RS 2 might have >> this >> option. So far I have no luck in doing calculation from one textbox with >> another. I can only use fields to do calculation if it exists, but just >> using textboxes............I hoping someone can help.
Thanks Robert and Mary. I tried what you guys suggested but this is the error that I'm getting: Object reference not set to an instance of an object. Each of the textbox is a detail list item, but I want to be able to subtract it. Here's what my looks like: =ReportItems!Sales_SubReport.Values - ReportItems!Cost_SubReport.Values PLease advise. Thanks. [quoted text, click to view] "Robert Bruckner [MSFT]" wrote: > There is one "=" too much in Mary's expression. Try this instead: > =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value > > Note: there are scope limitations on which textboxes within a report can be > referenced. > > -- > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "Mary Bray [SQL Server MVP]" > <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message > news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... > > try: > > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value > > > > "chang" wrote: > > > >> I have 2 textbox within my detail table that has 2 subreport. Then in > >> each > >> subreport, it contains 1 stored procedure. Is it possible to do some > >> calculation with those two textboxes? > >> > >> Example: Textbox1 - Textbox2 = 1234 > >> > >> Can someone tell me if this is possible? If not will RS 2 might have > >> this > >> option. So far I have no luck in doing calculation from one textbox with > >> another. I can only use fields to do calculation if it exists, but just > >> using textboxes............I hoping someone can help. > >
There is no "Values" property defined for textboxes, only a "Value" property. Also it seems like you want to "reach inside" a subreport and reference a set of textbox values there - this is not possible. -- Robert This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "chang" <chang@discussions.microsoft.com> wrote in message news:2D2BAEC6-B765-43CA-8D5F-B5543673BAA7@microsoft.com... > Thanks Robert and Mary. I tried what you guys suggested but this is the > error that I'm getting: > > Object reference not set to an instance of an object. > > Each of the textbox is a detail list item, but I want to be able to > subtract > it. > > Here's what my looks like: > > =ReportItems!Sales_SubReport.Values - ReportItems!Cost_SubReport.Values > > PLease advise. Thanks. > > "Robert Bruckner [MSFT]" wrote: > >> There is one "=" too much in Mary's expression. Try this instead: >> =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value >> >> Note: there are scope limitations on which textboxes within a report can >> be >> referenced. >> >> -- >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> >> "Mary Bray [SQL Server MVP]" >> <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message >> news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... >> > try: >> > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value >> > >> > "chang" wrote: >> > >> >> I have 2 textbox within my detail table that has 2 subreport. Then in >> >> each >> >> subreport, it contains 1 stored procedure. Is it possible to do some >> >> calculation with those two textboxes? >> >> >> >> Example: Textbox1 - Textbox2 = 1234 >> >> >> >> Can someone tell me if this is possible? If not will RS 2 might have >> >> this >> >> option. So far I have no luck in doing calculation from one textbox >> >> with >> >> another. I can only use fields to do calculation if it exists, but >> >> just >> >> using textboxes............I hoping someone can help. >> >> >>
Robert, Is it possible to use code behind to reach what's already been output and display it to a new text box? I would've thought that this would be possible because the data are already been outputed to the detail list textboxes. I'm not too experience with RS so if it's possible to use custom code, please advise or possibly provide some examples. Thanks. [quoted text, click to view] "Robert Bruckner [MSFT]" wrote: > There is no "Values" property defined for textboxes, only a "Value" > property. Also it seems like you want to "reach inside" a subreport and > reference a set of textbox values there - this is not possible. > > > -- Robert > This posting is provided "AS IS" with no warranties, and confers no rights. > > "chang" <chang@discussions.microsoft.com> wrote in message > news:2D2BAEC6-B765-43CA-8D5F-B5543673BAA7@microsoft.com... > > Thanks Robert and Mary. I tried what you guys suggested but this is the > > error that I'm getting: > > > > Object reference not set to an instance of an object. > > > > Each of the textbox is a detail list item, but I want to be able to > > subtract > > it. > > > > Here's what my looks like: > > > > =ReportItems!Sales_SubReport.Values - ReportItems!Cost_SubReport.Values > > > > PLease advise. Thanks. > > > > "Robert Bruckner [MSFT]" wrote: > > > >> There is one "=" too much in Mary's expression. Try this instead: > >> =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value > >> > >> Note: there are scope limitations on which textboxes within a report can > >> be > >> referenced. > >> > >> -- > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> > >> "Mary Bray [SQL Server MVP]" > >> <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message > >> news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... > >> > try: > >> > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value > >> > > >> > "chang" wrote: > >> > > >> >> I have 2 textbox within my detail table that has 2 subreport. Then in > >> >> each > >> >> subreport, it contains 1 stored procedure. Is it possible to do some > >> >> calculation with those two textboxes? > >> >> > >> >> Example: Textbox1 - Textbox2 = 1234 > >> >> > >> >> Can someone tell me if this is possible? If not will RS 2 might have > >> >> this > >> >> option. So far I have no luck in doing calculation from one textbox > >> >> with > >> >> another. I can only use fields to do calculation if it exists, but > >> >> just > >> >> using textboxes............I hoping someone can help. > >> > >> > >> > >
As mentioned in my previous response, this is not supported. Subreports are completely independent of main reports. You could add a dataset to the main report which calculates the values you try to get from the sub report and just show them in the main report. -- Robert This posting is provided "AS IS" with no warranties, and confers no rights. [quoted text, click to view] "chang" <chang@discussions.microsoft.com> wrote in message news:CE98D44C-DCC0-4C2B-8047-654524B53511@microsoft.com... > Robert, > > Is it possible to use code behind to reach what's already been output and > display it to a new text box? I would've thought that this would be > possible > because the data are already been outputed to the detail list textboxes. > I'm > not too experience with RS so if it's possible to use custom code, please > advise or possibly provide some examples. > > Thanks. > > "Robert Bruckner [MSFT]" wrote: > >> There is no "Values" property defined for textboxes, only a "Value" >> property. Also it seems like you want to "reach inside" a subreport and >> reference a set of textbox values there - this is not possible. >> >> >> -- Robert >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> "chang" <chang@discussions.microsoft.com> wrote in message >> news:2D2BAEC6-B765-43CA-8D5F-B5543673BAA7@microsoft.com... >> > Thanks Robert and Mary. I tried what you guys suggested but this is >> > the >> > error that I'm getting: >> > >> > Object reference not set to an instance of an object. >> > >> > Each of the textbox is a detail list item, but I want to be able to >> > subtract >> > it. >> > >> > Here's what my looks like: >> > >> > =ReportItems!Sales_SubReport.Values - ReportItems!Cost_SubReport.Values >> > >> > PLease advise. Thanks. >> > >> > "Robert Bruckner [MSFT]" wrote: >> > >> >> There is one "=" too much in Mary's expression. Try this instead: >> >> =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value >> >> >> >> Note: there are scope limitations on which textboxes within a report >> >> can >> >> be >> >> referenced. >> >> >> >> -- >> >> This posting is provided "AS IS" with no warranties, and confers no >> >> rights. >> >> >> >> >> >> "Mary Bray [SQL Server MVP]" >> >> <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message >> >> news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... >> >> > try: >> >> > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value >> >> > >> >> > "chang" wrote: >> >> > >> >> >> I have 2 textbox within my detail table that has 2 subreport. Then >> >> >> in >> >> >> each >> >> >> subreport, it contains 1 stored procedure. Is it possible to do >> >> >> some >> >> >> calculation with those two textboxes? >> >> >> >> >> >> Example: Textbox1 - Textbox2 = 1234 >> >> >> >> >> >> Can someone tell me if this is possible? If not will RS 2 might >> >> >> have >> >> >> this >> >> >> option. So far I have no luck in doing calculation from one >> >> >> textbox >> >> >> with >> >> >> another. I can only use fields to do calculation if it exists, but >> >> >> just >> >> >> using textboxes............I hoping someone can help. >> >> >> >> >> >> >> >> >>
Robert, Is it possible to use another dataset as you mentioned and pass variable from one to the other? I need to be able to pass object fields as parameters so that I can use the parameters in my where clause to filter out data. Is this possible? [quoted text, click to view] "Robert Bruckner [MSFT]" wrote: > As mentioned in my previous response, this is not supported. Subreports are > completely independent of main reports. You could add a dataset to the main > report which calculates the values you try to get from the sub report and > just show them in the main report. > > -- Robert > This posting is provided "AS IS" with no warranties, and confers no rights. > > > "chang" <chang@discussions.microsoft.com> wrote in message > news:CE98D44C-DCC0-4C2B-8047-654524B53511@microsoft.com... > > Robert, > > > > Is it possible to use code behind to reach what's already been output and > > display it to a new text box? I would've thought that this would be > > possible > > because the data are already been outputed to the detail list textboxes. > > I'm > > not too experience with RS so if it's possible to use custom code, please > > advise or possibly provide some examples. > > > > Thanks. > > > > "Robert Bruckner [MSFT]" wrote: > > > >> There is no "Values" property defined for textboxes, only a "Value" > >> property. Also it seems like you want to "reach inside" a subreport and > >> reference a set of textbox values there - this is not possible. > >> > >> > >> -- Robert > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> "chang" <chang@discussions.microsoft.com> wrote in message > >> news:2D2BAEC6-B765-43CA-8D5F-B5543673BAA7@microsoft.com... > >> > Thanks Robert and Mary. I tried what you guys suggested but this is > >> > the > >> > error that I'm getting: > >> > > >> > Object reference not set to an instance of an object. > >> > > >> > Each of the textbox is a detail list item, but I want to be able to > >> > subtract > >> > it. > >> > > >> > Here's what my looks like: > >> > > >> > =ReportItems!Sales_SubReport.Values - ReportItems!Cost_SubReport.Values > >> > > >> > PLease advise. Thanks. > >> > > >> > "Robert Bruckner [MSFT]" wrote: > >> > > >> >> There is one "=" too much in Mary's expression. Try this instead: > >> >> =ReportItems!Textbox1.Value - ReportItems!Textbox2.Value > >> >> > >> >> Note: there are scope limitations on which textboxes within a report > >> >> can > >> >> be > >> >> referenced. > >> >> > >> >> -- > >> >> This posting is provided "AS IS" with no warranties, and confers no > >> >> rights. > >> >> > >> >> > >> >> "Mary Bray [SQL Server MVP]" > >> >> <MaryBraySQLServerMVP@discussions.microsoft.com> wrote in message > >> >> news:4DCA1B66-9F57-4364-AC5D-997A50C5DE47@microsoft.com... > >> >> > try: > >> >> > =ReportItems!Textbox1.Value - =ReportItems!Textbox2.Value > >> >> > > >> >> > "chang" wrote: > >> >> > > >> >> >> I have 2 textbox within my detail table that has 2 subreport. Then > >> >> >> in > >> >> >> each > >> >> >> subreport, it contains 1 stored procedure. Is it possible to do > >> >> >> some > >> >> >> calculation with those two textboxes? > >> >> >> > >> >> >> Example: Textbox1 - Textbox2 = 1234 > >> >> >> > >> >> >> Can someone tell me if this is possible? If not will RS 2 might > >> >> >> have > >> >> >> this > >> >> >> option. So far I have no luck in doing calculation from one > >> >> >> textbox > >> >> >> with > >> >> >> another. I can only use fields to do calculation if it exists, but > >> >> >> just > >> >> >> using textboxes............I hoping someone can help. > >> >> > >> >> > >> >> > >> > >> > >> > >
Don't see what you're looking for? Try a search.
|
|
|