Ok. This has me crazy. I'm sharing a value from subreport to main report and it's doing something odd. I've tried a dozen different troubleshooting steps and have stripped everything down to the basics to see what is going wrong. Here's the final troubleshooting steps I'm at.
//...
Solved it! Much cleaner than what I had. I'm omitting a few lines, but here's the key part so you can see how I solved it
Dim rSource as Variant
rSource = Array(1, 2, ...)
With wsSource
rSource(1) = .Range("B26".Value
rSource(2) = .Range("D22").Value
etc...
End With
For intCount =...
Andy: Good idea, I'll implement that
PHV: Thanks for the suggestion of wsTarget.Cells() = wsSource.Range().Value
Thanks to everyone for the suggestions, I keep lurking here to improve my skills, everyone has always been the most helpful!
Making a simple macro to open a series of workbooks, select certain cells out of them and copy to ThisWorkbook
I have it all set up and working, my code works, but I know there has to be a more elegant solution.
The cells I'm copying from are, of course, not in any logical order. Some are...
There is a whole series of reports, some of them access multiple data sources, some currently access only one. In the near future all will access only one data source.
The Project / Products aren't defined anywhere, at least not in machine readable format. The leadership team tells me to...
The subs were used because the first guy that made them (2 generations ago) made them that way. There's no row that needs to appear more than once, everything is a sum of fields in the database.
Some of the reports needed to reference different sources, in that case each sub is for each...
I've got a series of reports I'm tasked with maintaining, I know there has to be a better way of doing this but I don't know how to go about it.
The existing reports are all organized with sub-reports, each distinct product is in it's own sub-report. These are problematic to maintain...
If you're going to do this on a regular basis and not just a one-off, you might look into how that data is getting put into the spreadsheet to eliminate inconsistencies like leading/trailing spaces. Are people manually entering data into the sheet (human error) or are they copy / pasting. If...
I know I've done this in the past but I haven't done it in a number of years. The answer is in my head but I just can't remember how to do it.
Desired output:
UserID TotalCalls ShortCalls
100 200 10
101 210 50
102 150 6...
Negative, something somewhere is off.
I'm thinking the re-write is really needed, this particular report was written by one person, updated by another a year later and now I get to be the new maintainer.
I can tell by the format of the various components, each had their own style and their own...
Hrm, I guess "passing up" is the wrong terminology. I'm viewing it from subreports "under" the parent (main) report and therefore passing the value up.
In this particular example
Parent report
Report Footer b
SubReport - Location SC
Report Footer c
Currently used to display the shared...
You know, looking at the original report it's not a sum(table.field) it's just (table.field), you're correct LB and I just typed in the wrong formula.
I tried it your way, modified both parent and sub formula to follow a consistent format, I'm still not getting the desired result.
Subreport...
There's got to be something simple I'm overlooking, I have one specific variable that seems to have quit passing it's value to my parent report.
CR XI
Subreport variables
@SPSCAban
shared numbervar SPSCAban;
If condition = 1
then
SPSCAban := sum(table.abandon)
@SPSCHandled
shared numbervar...
The way I understand it, 'whilereadingrecords' doesn't work that way.
The data needs to be created (either read, calculated, whatever) in the subreport before it can pass the data to the parent.
What you are looking for is called a shared variable. Inside the sub report define the variable as shared and then in the parent report you need to define the variable under the same name and shared as well.
If you search this forum for 'shared variable' you will find many examples.
Working on a series of reports and I ran into a bit of a problem.
CR XI, pulling from Informix, DB2 and Oracle DBs
I am pulling data from 4 sources, each within it's own subreport, and compiling numbers to show combined scores. A row in my databases is created each time there is activity on a...
Ok, I need to add the group onto each side.
I tried sum({@AnswerTime},{table.project})/sum({@CallsHandled}) and several variations thereof.
Depending on which system I'm pulling data out of some of them report AnsweredTime and others report Average Answer Time. I'm trying to be able to report...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.