Using data from a subreports, in other subreport :
Author 
Message 
Dennis T. Hol #1 / 11

Using data from a subreports, in other subreport :
Hi I just bounced into a problem that I cannot cope with I need to somehow get data from one of my subreports and use them in my formular in another subreport.. But how is that possible.. The field i need to get is a sum and can accure serveral times, I dont know if its possible somehow to get these data from my other subreport if it occures more than once.. Hope you can understand my problem, even though its a little bit hard to explain :) Dennis

Tue, 11 Oct 2005 15:16:20 GMT 


Bob Holme #2 / 11

Using data from a subreports, in other subreport :
Hi Dennis, You can make information available to both your main report and to all subreports by using "Shared" variables. Being "Shared" gives it the proper scope to be available in all subreport as well as the main report. If you want to give more details about your report, we can give you a more specific solution. In general, insert a formula into your subreport that equates a shared variable to the data you want to pass to the main report. For example, if you use a running total field called SubreportSum, then your formula would be: Shared numberVar Sub_sum := #SubreportSum In your main report, you can use this variable anywhere you would like. Keep in mind that the value of the variable is dependent on subreport. The value won't change until the subreport has executed. Bob Holmes
Quote: > Hi > I just bounced into a problem that I cannot cope with > I need to somehow get data from one of my subreports and use them in my > formular in another subreport.. But how is that possible.. > The field i need to get is a sum and can accure serveral times, I dont know > if its possible somehow to get these data from my other subreport if it > occures more than once.. > Hope you can understand my problem, even though its a little bit hard to > explain :) > Dennis

Tue, 11 Oct 2005 19:52:27 GMT 


Dennis T. Hol #3 / 11

Using data from a subreports, in other subreport :
Quote: > You can make information available to both your main report and to all > subreports by using "Shared" variables. Being "Shared" gives it the proper > scope to be available in all subreport as well as the main report. If you > want to give more details about your report, we can give you a more specific > solution. In general, insert a formula into your subreport that equates a > shared variable to the data you want to pass to the main report. For > example, if you use a running total field called SubreportSum, then your > formula would be: Shared numberVar Sub_sum := #SubreportSum > In your main report, you can use this variable anywhere you would like. > Keep in mind that the value of the variable is dependent on subreport. The > value won't change until the subreport has executed.
Hey again Works fine with the Share Var ... but still have a problem :) The problem is that i have a unknown amount of Shared variables.. Fx. i have an unknown amount of OrderNumbers, and i wish to Share ALL these OrderNumbers with my mainreport. Is it possible, og isnt it ? Best Regards Dennis T. Holm

Tue, 11 Oct 2005 20:17:44 GMT 


Bob Holme #4 / 11

Using data from a subreports, in other subreport :
Hi Dennis, Are you doing anything with these order numbers or are you only displaying them. I suggested a simple number variable, but there are also array variables. I've not used them in this way, so I don't know how versatile this type might be. If you want to give a better description of what you are trying to do, I might be able to make some better suggestions. Bob Holmes
Quote: > > You can make information available to both your main report and to all > > subreports by using "Shared" variables. Being "Shared" gives it the > proper > > scope to be available in all subreport as well as the main report. If you > > want to give more details about your report, we can give you a more > specific > > solution. In general, insert a formula into your subreport that equates a > > shared variable to the data you want to pass to the main report. For > > example, if you use a running total field called SubreportSum, then your > > formula would be: Shared numberVar Sub_sum := #SubreportSum > > In your main report, you can use this variable anywhere you would like. > > Keep in mind that the value of the variable is dependent on subreport. > The > > value won't change until the subreport has executed. > Hey again > Works fine with the Share Var ... but still have a problem :) > The problem is that i have a unknown amount of Shared variables.. Fx. i > have an unknown amount of OrderNumbers, and i wish to Share ALL these > OrderNumbers with my mainreport. > Is it possible, og isnt it ? > Best Regards > Dennis T. Holm

Tue, 11 Oct 2005 20:33:41 GMT 


Dennis T. Hol #5 / 11

Using data from a subreports, in other subreport :
Hey Bob Im using these numbers in another formular on my mainreport.. You see, i've got a mainreport with a crosstab, and 2 subreport. From one of my subreports(crosstab subreport) i need the SUM field, which can accure serveral time depending on how many orders there are... THERE IS ONE SUM PR ORDER In my other subreport i also need the SUM field which also can accure serveral times depending on how many orders there are. THERE IS ONE SUM PR ORDER here as well The SUMS from these 2 subreports must then be used in a Formula in the mainreport to calculate some numbers.. Its a bit difficult to explain .. :) I really hope this made it a bit easier to understand . Did my best REgards Dennis T. Holm Quote: > Hi Dennis, > Are you doing anything with these order numbers or are you only > displaying them. I suggested a simple number variable, but there are also > array variables. I've not used them in this way, so I don't know how > versatile this type might be. If you want to give a better description of > what you are trying to do, I might be able to make some better suggestions.

Tue, 11 Oct 2005 20:52:31 GMT 


Bob Holme #6 / 11

Using data from a subreports, in other subreport :
Hi Dennis, If you only need to get a total of each of the subreport "Sums" then you can use a formula in your main report with another variable that will keep accumulating the values of the other variable. Ex. In the report footer section of your subreport you insert a formula that equates a shared variable to your "SUM", In the main report, insert a formula that uses it's own variable to accumulate the values from the subreport. Main Report: formula = shared numbervar varMain; shared numbervar varSub; varMain := varMain + varSub This should keep a running total of the value from the subreport. If you need to display the numbers, you can use a text variable to which you can keep appending the "SUM" so that a list of numbers is produced. I hope this helps. Bob Holmes P.S. remember to reset your variables as needed.
Quote: > Hey Bob > Im using these numbers in another formular on my mainreport.. You see, i've > got a mainreport with a crosstab, and 2 subreport. > From one of my subreports(crosstab subreport) i need the SUM field, which > can accure serveral time depending on how many orders there are... > THERE IS ONE SUM PR ORDER > In my other subreport i also need the SUM field which also can accure > serveral times depending on how many orders there are. > THERE IS ONE SUM PR ORDER here as well > The SUMS from these 2 subreports must then be used in a Formula in the > mainreport to calculate some numbers.. > Its a bit difficult to explain .. :) > I really hope this made it a bit easier to understand . Did my best > REgards Dennis T. Holm > > Hi Dennis, > > Are you doing anything with these order numbers or are you only > > displaying them. I suggested a simple number variable, but there are also > > array variables. I've not used them in this way, so I don't know how > > versatile this type might be. If you want to give a better description of > > what you are trying to do, I might be able to make some better > suggestions.

Tue, 11 Oct 2005 22:14:05 GMT 


Dennis T. Hol #7 / 11

Using data from a subreports, in other subreport :
Hey Again :) What if i have more than ONE SUM, in my subreports that i want to access ? ... How can i put that into variables if I have an unknown amount of SUMS that I want to pass on to my mainreport.. ? .. REgards Dennis T. Holm
Quote: > Hi Dennis, > If you only need to get a total of each of the subreport "Sums" then you > can use a formula in your main report with another variable that will keep > accumulating the values of the other variable. > Ex. In the report footer section of your subreport you insert a formula that > equates a shared variable to your "SUM", > In the main report, insert a formula that uses it's own variable to > accumulate the values from the subreport. > Main Report: formula = > shared numbervar varMain; > shared numbervar varSub; > varMain := varMain + varSub > This should keep a running total of the value from the subreport. > If you need to display the numbers, you can use a text variable to which you > can keep appending the "SUM" so that a list of numbers is produced. > I hope this helps. > Bob Holmes > P.S. remember to reset your variables as needed.
> > Hey Bob > > Im using these numbers in another formular on my mainreport.. You see, > i've > > got a mainreport with a crosstab, and 2 subreport. > > From one of my subreports(crosstab subreport) i need the SUM field, which > > can accure serveral time depending on how many orders there are... > > THERE IS ONE SUM PR ORDER > > In my other subreport i also need the SUM field which also can accure > > serveral times depending on how many orders there are. > > THERE IS ONE SUM PR ORDER here as well > > The SUMS from these 2 subreports must then be used in a Formula in the > > mainreport to calculate some numbers.. > > Its a bit difficult to explain .. :) > > I really hope this made it a bit easier to understand . Did my best > > REgards Dennis T. Holm > > > Hi Dennis, > > > Are you doing anything with these order numbers or are you only > > > displaying them. I suggested a simple number variable, but there are > also > > > array variables. I've not used them in this way, so I don't know how > > > versatile this type might be. If you want to give a better description > of > > > what you are trying to do, I might be able to make some better > > suggestions.

Fri, 14 Oct 2005 14:12:18 GMT 


Bob Holme #8 / 11

Using data from a subreports, in other subreport :
Hi Dennis, Do you need to pass all of these sums, independently, to the main report, or can you perform calculations on them within your subreport and then pass the result? A brief description of your report would help. Bob Holmes
Quote: > Hey Again :) > What if i have more than ONE SUM, in my subreports that i want to access ? > ... How can i put that into variables if I have an unknown amount of SUMS > that I want to pass on to my mainreport.. ? .. > REgards Dennis T. Holm
> > Hi Dennis, > > If you only need to get a total of each of the subreport "Sums" then > you > > can use a formula in your main report with another variable that will keep > > accumulating the values of the other variable. > > Ex. In the report footer section of your subreport you insert a formula > that > > equates a shared variable to your "SUM", > > In the main report, insert a formula that uses it's own variable to > > accumulate the values from the subreport. > > Main Report: formula = > > shared numbervar varMain; > > shared numbervar varSub; > > varMain := varMain + varSub > > This should keep a running total of the value from the subreport. > > If you need to display the numbers, you can use a text variable to which > you > > can keep appending the "SUM" so that a list of numbers is produced. > > I hope this helps. > > Bob Holmes > > P.S. remember to reset your variables as needed.
> > > Hey Bob > > > Im using these numbers in another formular on my mainreport.. You see, > > i've > > > got a mainreport with a crosstab, and 2 subreport. > > > From one of my subreports(crosstab subreport) i need the SUM field, > which > > > can accure serveral time depending on how many orders there are... > > > THERE IS ONE SUM PR ORDER > > > In my other subreport i also need the SUM field which also can accure > > > serveral times depending on how many orders there are. > > > THERE IS ONE SUM PR ORDER here as well > > > The SUMS from these 2 subreports must then be used in a Formula in the > > > mainreport to calculate some numbers.. > > > Its a bit difficult to explain .. :) > > > I really hope this made it a bit easier to understand . Did my best > > > REgards Dennis T. Holm > > > > Hi Dennis, > > > > Are you doing anything with these order numbers or are you only > > > > displaying them. I suggested a simple number variable, but there are > > also > > > > array variables. I've not used them in this way, so I don't know how > > > > versatile this type might be. If you want to give a better > description > > of > > > > what you are trying to do, I might be able to make some better > > > suggestions.

Fri, 14 Oct 2005 20:03:33 GMT 


Dennis T. Hol #9 / 11

Using data from a subreports, in other subreport :
Quote: > Do you need to pass all of these sums, independently, to the main > report, or can you perform calculations on them within your subreport and > then pass the result? A brief description of your report would help.
Hey again I wont help performing the calculations within the subreport, because i need data from another subreport which must be included in the calculation.. I could try to explain how my report looks like ...... MAINREPORT REPORT HEADER A CrossTab Report REPORT HEADER B SubReport with a crosstabreport(From here i need the SUM fields from the crosstab, the SUM field can accure many times depending on number of orders) PAGE HEADER SubReport with a normal report(I need the SUM fields from REPORT HEADER B to make som calculations (formulars) in this subreport.) SO what i need is all the SUM fields from REPORT HEADER B to be accessable in my PAGER HEADER because i need those fields in my calculations. I hope this made it easier to understand :) Regards Dennis T. Holm

Fri, 14 Oct 2005 20:17:38 GMT 


Bob Holme #10 / 11

Using data from a subreports, in other subreport :
Hi Dennis, It is easier to understand, unfortunately it is not any easier to find a solution. I wonder if it is possible to use a multidimensional array to collect the sums from the subreport, then extract the elements of the array to make those values available when you need them. I'm afraid I'm running out of ideas. Bob Holmes
Quote: > > Do you need to pass all of these sums, independently, to the main > > report, or can you perform calculations on them within your subreport and > > then pass the result? A brief description of your report would help. > Hey again > I wont help performing the calculations within the subreport, because i need > data from another subreport which must be included in the calculation.. > I could try to explain how my report looks like ...... > MAINREPORT > REPORT HEADER A > CrossTab Report > REPORT HEADER B > SubReport with a crosstabreport(From here i need the SUM fields > from the crosstab, the SUM field can accure many times > depending on number of orders) > PAGE HEADER > SubReport with a normal report(I need the SUM fields from REPORT > HEADER B to make som calculations (formulars) in this subreport.) > SO what i need is all the SUM fields from REPORT HEADER B to be accessable > in my PAGER HEADER because i need those fields in my calculations. > I hope this made it easier to understand :) > Regards Dennis T. Holm

Fri, 14 Oct 2005 21:37:14 GMT 


Dennis T. Hol #11 / 11

Using data from a subreports, in other subreport :
Quote: > Hi Dennis, > It is easier to understand, unfortunately it is not any easier to find a > solution. I wonder if it is possible to use a multidimensional array to > collect the sums from the subreport, then extract the elements of the array > to make those values available when you need them. I'm afraid I'm running > out of ideas. > Bob Holmes
Thats OK .. I thought about making another VIEW on my MS SQL Server instead. This way i can select the data just the way i like it.. Even though it'll take some more ressources because ive allready got the DATA in my report.. Ill find a way .. Thanx for the help Regards Dennis T. Holm

Fri, 14 Oct 2005 21:43:24 GMT 


