Showing posts with label subreport. Show all posts
Showing posts with label subreport. Show all posts

Sunday, March 11, 2012

Displaying records in subreport

My report is grouped by the following fields.

Region
Sector
Interval
Area
Crew Unit

I have 8 different formulas that counts the records found under each and display them under each area by crew tech.

It looks something like this

Region: Central
Secotr: 11
Interval: Weekly or Greater (this is based on a formula)
Area: ESU

crew/tech Equip Not Available Parts On Order Timely Complete etc.
AAA 5 0 2

------
Next page
Region: Central
Secotr: 11
Interval: Weekly or Greater (this is based on a formula)
Area: COMM

crew/tech Equip Not Available Parts On Order Timely Complete etc.
BBB 0 0 3
CCC 5 0 1

----

Now, I have a subreport where I want to display the records found under
each column in detail but for both areas combined. So for "Equip Not Available" it needs to display 5+5 records under Area-ESU and COMM. Then on the next page it will display 2+3+1 records for "Timely Complete" for Area-ESU and COMM. What I did was in the subreport I created another formula {@.grpname} which had above formulas combined and grouped the subreport by that formula. That works fine.
But the problem is that - Out of the 8 formulas I want to display detail records for only 5 of them even if it finds records for the other 3 formulas.
This is how my {@.grpname} formula looks like -

If {pPMPERDET.COMPLETION_STATUS} = "X" AND {pPMPERDET.END_DATE_TIME} < {pPMPERDET.LATEST_DATE} then
"Equip Not Available" else

If {pPMPERDET.COMPLETION_STATUS}) = "O" AND
{pPMPERDET.INTERVAL_LENGTH = ''} then
"Timely Complete"
//etc for all the 5 groups

Right now it displays the records for the 5 groups but in addition to that it is also displaying the remaining records found under no heading. How should I stop it from displaying these records?

ThanksI'm not entirely sure what it is you're describing below, but it sounds like you want to look at suppressing either fields or entire subreports/sections.

To suppress a subreport : put it in it's own section, right click the section and go to Section Expert -> next to the Suppress option there is an x+2 button.

To suppress a field : right click it, go to Format Field (Common tab) and next to Suppress option is the x+2 box.

Suppression formula must return true or false. Use formula editor to get the result you're after, for example...

If IsNull( [your group name] ) then
true --yes, suppress the subreport/field
else
false --no, don't suppress.|||Got it. Works gr8! Thanks

Wednesday, March 7, 2012

Displaying data from multiple databases

I am using a subreport to lookup up a name from a code value since the lookup
table is in a separate database from the main report. How do I limit the
white space on the name field? I have defined a single textbox in the
subreport, but when I preview the subreport it displays a complete line.
Similarly, when the main report previews the subreport displays the complete
line. I have tried placing the textbox in a rectangle, but it doesn't appear
to make a difference. Any suggestions?If you have a table for the data of the main report, add another column to
the table and put the subreport in that column. If it is a single value they
it will not go to another row.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"jbmeeh" <jbmeeh@.discussions.microsoft.com> wrote in message
news:7C1E0D63-E86D-4A54-A7BE-7EBB2BD7F4F1@.microsoft.com...
>I am using a subreport to lookup up a name from a code value since the
>lookup
> table is in a separate database from the main report. How do I limit the
> white space on the name field? I have defined a single textbox in the
> subreport, but when I preview the subreport it displays a complete line.
> Similarly, when the main report previews the subreport displays the
> complete
> line. I have tried placing the textbox in a rectangle, but it doesn't
> appear
> to make a difference. Any suggestions?|||You could also try putting the subreport in a rectangle. (Can you guess,
I'm stuck on rectangles for solving white space problems?)
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:OZux6OM3EHA.3596@.TK2MSFTNGP12.phx.gbl...
> If you have a table for the data of the main report, add another column to
> the table and put the subreport in that column. If it is a single value
> they it will not go to another row.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "jbmeeh" <jbmeeh@.discussions.microsoft.com> wrote in message
> news:7C1E0D63-E86D-4A54-A7BE-7EBB2BD7F4F1@.microsoft.com...
>>I am using a subreport to lookup up a name from a code value since the
>>lookup
>> table is in a separate database from the main report. How do I limit the
>> white space on the name field? I have defined a single textbox in the
>> subreport, but when I preview the subreport it displays a complete line.
>> Similarly, when the main report previews the subreport displays the
>> complete
>> line. I have tried placing the textbox in a rectangle, but it doesn't
>> appear
>> to make a difference. Any suggestions?
>

Saturday, February 25, 2012

Displaying a subreport in main report at runtime

Hi

I have a report with a subreport within it. When I look at in the preview facility, the data from the subreport is displayed within the main report. At runtime, the sub report is not visible and has to be opened in a separate window. How can I display it in the main report at runtime?

Thanks.I've found the answer to this one. If anyone is interested, please see:

http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2007600&sliceId=&dialogID=6924658&stateId=1%200%206926126

Friday, February 24, 2012

Display subreports with in a main report

Hello All,

I have 4 subreports that I need to display in the main report. I can pull a sub-report with in the main report howevere\ the subreport doesn't display any data. It just gives me a blank template like:

Customer name Customer # Address 1 Address2 city

The subreport itself is not empty when I open it otherwise it shows me a list of all the customers however, no data when I call it as a part of main report.

Can anyone suggest me on this one?

Thanks,

Rashi

Do you need push parameter values from the main report into the sub report? If so, make sure they are being passed by clicking on the sub report's properties and checking the parameters property.|||Ya I have set all the parameters. All the parameters that are used in the subreport are also set in the main report|||And when you test the subreport it displays properly?|||Well the subreport when open separately displays all the data content however, if I call it from the main report it just gives me a blank template|||

I have the same error!

The not empty subreports are displayed empty in the main report..

But why?

|||

Well, I figured out in my case, it was the wrong company that I was selecting. I had 5 company ids and only one of them had data so, that was the problem in my case. Also, you might wanna check the parameters of your main report.

Next, how have you defined the visibility of your subreports. Did you use any report parameter? (I beleive you must have had) If yes, then check the visibility condition for each subreport.

Hope this helps!

Thanks,

Rashi