![]() ![]() > Also, as for counting the records in the subreport, I recommend a running total at the bottom of it. > IMPORTANT: Due to the fundamental logic of Crystal, you can only use this field if it is BELOW it's subreport. > 3.Use the formula name for #2 for whatever calculations you need. > Shared numbervar SubRecordCount:=(however you want to count the records in the report) You can suppress it from display if you like. I found some stuff on shared variables on the net, but they are always zero for me. The only way I know to do this is to test for count(field)>1 etc. ![]() Maybe I am swinging too far for the fences, but I want to suppress the subreport hyperlink if the subreport contains no records. > Ok that works, but I should have mentioned I wanted to do on demand reports (hyperlink style). Regarding point 3: if I'm putting a subreport with shared variables in, say, the Detail section of the main report, then I would create a second Detail section and put the subreport in the "Details a" and your formula 2 in "Details b".Īlternatively if you put the subreport in a Header (Report/Group) you can then use the variables in Details or a Footer. There's no formula button beside the "On-demand Subreport" checkbox, so you can't set a condition there.Īlso, because the subreport is "on-demand", until you actually preview it, it hasn't been run and therefore can't calculate your formula 1. I don't think Crystal can do what you want. > Said another way, how can I test from the parent report if the subreport has any records? > You may also have to open the Section Expert (on the main report) and tick "Suppress Blank Section" for that section. and tick "Suppress Blank Subreport" on the Subreport tab. > You should be able to right-click on the subreport, open Format Subreport. I know it has to do with the order crystal processes sections, but what qualifies as below? I can function the way things are, but anyone have more experience with shared variables? IMPORTANT: Due to the fundamental logic of Crystal, you can only use this field if it is BELOW it's subreport.Īlso, as for counting the records in the subreport, I recommend a running total at the bottom of it. Again, this can also be suppressed.ģ.Use the formula name for #2 for whatever calculations you need. Shared numbervar SubRecordCount:=(however you want to count the records in the report) Ģ.Put this in your main report. I found some stuff on shared variables on the net, but they are always zero for me.ġ.Put this formula in your subreport. Ok that works, but I should have mentioned I wanted to do on demand reports (hyperlink style). > Alternatively if you put the subreport in a Header (Report/Group) you can then use the variables in Details or a Footer. > Regarding point 3: if I'm putting a subreport with shared variables in, say, the Detail section of the main report, then I would create a second Detail section and put the subreport in the "Details a" and your formula 2 in "Details b". > Also, because the subreport is "on-demand", until you actually preview it, it hasn't been run and therefore can't calculate your formula 1. There's no formula button beside the "On-demand Subreport" checkbox, so you can't set a condition there. > I don't think Crystal can do what you want. What I have without ondemand works so we'll call it a win for now. I can't actually pass the record count back up to the main report from an on-demand subreport because it hasn't actually processed until you click the subreport. ![]() After much educating myself on how Crystal processes reports, I came to the same conclusion. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |