Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

urgent suggestion needed 1

Status
Not open for further replies.

44veena

Technical User
Jun 24, 2002
15
US
I have a subreport with booking revenue field. now i have to calculate the running total of that field, and place it in the main report. That works fine but there is a problem
since i have placed the main report in detail section A and subreport in detail B,the value starts from zero in the main field, bcos the main report runs before the subreport,
if the calculated running total in the subreport is 10 for the first record and 20 for the second..
i get
0
10
20 in the main report
but it shud be like
10
20 in the main report.
but i have to have the main report before the subreport bcos it looks awkward to have the details first and the main heading after that.
 
Can't you activate Format/Customise/Suppress if Zero on the field?

Naith
 
hi naith,
if i supress i will not get any value there, i need the next value there...u know what i mean...
if i have
10
20
30 in my subreport....

in my main report i have
0
10
20
30
in the place of zero i need 10.. or can u suggest me a program where i will be able to leave the value of the first record and print values from second record or something
 
You can't have the value from the subreport before the subreport has even processed. The 0 value would have to be suppressed so that the field doesn't show up until the subreport generates the 10.

The only other way you could do this is to create a Details C, and return the values there - but I assume you have the subreport appearing after the details for a reason.

Naith
 
I am a little confused as to the look of your report.

Are you using shared variables to pass information back and forth from Main Report to Subreport?

Show us what a sample report should look like...not just the one field...and show us what you are actually getting.

Jim Broadbent
 
hi ngolem
i am using shard variables...
this report is to show all opportunities at the header and detail level. so all the header information i have it in my main report and all the details will show in the subreport.
the field which i am talking about the booking value field...it shows the value of each product. so basically i am adding all the booking values at the details level and showing it in the boooking value field of the main report. so actually only after the subreport runs we will get the sum of the booking value field and it can show in the main report.
so what happens is for the first opportunity if i have 2 line items in the subreport and their sum is $ 100, i get that sum in the next opportunity,
subreport main report
50 0
100 50
150 100

because the subreport runs before the main report
 
hi naith

if i suppress i get a blank space..i dont want that because that opportunity has a value, it has to show 10..not a blank space..so basically i want the value of the next record
 
"this report is to show all opportunities at the header and detail level. so all the header information i have it in my main report and all the details will show in the subreport."


I am still having trouble visualizing your ACTUAL REPORT LOOK....Please show an example...
all I see is 2 numbers...NO DETAILS
Jim Broadbent
 
this is how the report looks

header salesperson acc# prdname prd# bookvalue bookdate
item " " scanner 123 10 1/1/02

now the header level will not have the product number and name ..it will be blank bcos we can get that info only in the subreport..like this for each opportunity the header gives the brief descriptiona nd details will show how many products and the details the sales person has booked for. now to get this booking value i have to calculate the sum of all the booking fields in the detail level..so i added it up and declared it as a shared variable..and declared the shared variable in the main report. since the subreport is run after the header, for the first opportunity the booking value is 0 and the details are shown, and for the next opportunity the value of the previous opportunity appears in the booking value field..i think by now atleast u shud try to visualize something from what i am telling
 
yes now it is a bit clearer

You are linking to the Subreport by Item number correct
and that Prd# number is in the same line as the subreport.
Since the subreport is run first...that is why things are out of sync

try this

Create another subsection of the detail

Place the subreport in thes subsection before this one

item " " scanner 123 10 1/1/02


I am not sure if you are doing this but

1. suppress all lines of the subreport itself. This makes it
invisible.
2. remove the borders of the subreport field on the main
report.
3. give the subreport a conditional background of red
so that you can find it in design months later

if 1 = 1 then crNoColor else crRed

4. make the subreport as thin as possible...right click on
the subreport field in the main report and select
"Object size and position" and you can reduce the size
to a hairline (this is the reason for color coding the
subreport)
5. now tighten the borders of the subsection so this will
be as small a section as possible.

This should make the subreport work properly and have the effect of adding a hairline of spacing between lines of the report.

hope this helps Jim Broadbent
 
hey jim
great job..thank u so much..this works....i am very happy..thank you once again.
 
no problem...now you see why a clear example of the report look is necessary :) Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top