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

Tuesday, March 27, 2012

AddParameter to SubReport ? <VbScript>

Hello,

Can i pass parameter to a subreport inside a report with addParameter ?
Like that:

Dim webSource0
Set webSource0 = CreateObject("WebReportSource.WebReportSource")
webSource0.ReportSource = webBroker
webSource0.URL = "http://localhost/product.rpt"
webSource0.PromptOnRefresh = True
webSource0.AddParameter "password0", "cria"
webSource0.AddParameter "user0", "sa"
webSource0.AddParameter "prompt0", "1"
webSource0.AddParameter "subreport.password0", "cria" ?
webSource0.AddParameter "subreport.user0", "sa" ?

when i try to view the report with crystal viewer, it prompts for the
database settings of the subreport !

i'm using cr8.5 with oledb connection and vbscriptsee thread http://www.dev-archive.com/forum/showthread.php?t=315611

I think you have the same problem, caused by not understanding that each subreport's query must establish its own permissions with the server.

Dave

Tuesday, March 20, 2012

Adding subreport values

I have a _very_ simple table with just one row and three columns.
The first column of the row contains a subreport that retrieves a single
value.
The second column of the row contains a subreport that retrieves a single
value.
...and heres where I lose it... :-)
The third column should contain the sum of column1 and column2. Period.
Please help. Thanks :-)
jdjespersenIf all you are doing is returning one value from the sub-report then why
use the sub-report at all in the first place?
Secondly, you can't add two sub-reports together. Just because your
sub-reports only return one value does not mean that the main report will
see it as such. If you plugged a sub-report in to that area that returned
40 rows of data and then tried to add those together with another
sub-reports output what would you expect to see?
So in essence you can't do what you are trying to do since you can't
reference the subreport the way you are trying.
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> Subject: Adding subreport values
> Date: Fri, 26 Oct 2007 13:41:07 +0200
> Lines: 17
> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> format=flowed;
> charset="iso-8859-1";
> reply-type=original
> Content-Transfer-Encoding: 7bit
> I have a _very_ simple table with just one row and three columns.
> The first column of the row contains a subreport that retrieves a single
> value.
> The second column of the row contains a subreport that retrieves a single
> value.
> ...and heres where I lose it... :-)
> The third column should contain the sum of column1 and column2. Period.
> Please help. Thanks :-)
> jdjespersen
>
>|||Hi Chris, and thanks for replying...
> If all you are doing is returning one value from the sub-report then why
> use the sub-report at all in the first place?
In short, 'cause i suck. :-( I'll try to explain.
Data is in an Analysis Services database, and MDX is not my strongpoint.
I was hoping that by splitting my queries into seperate datasources, I could
get away with much simpler queries. But, not being able to use data from
two datasets within a single table control, i figured i could do it with
subreports.
Imagine a desired report table layout like this. Not the most complex, i
admit:
Company Last Years Sales Current Sales
Total
Adv.Works 10000 4000
14000
Northwind 3200 2000
5200
Designing the above query may not be rocket science, but as far as MDX goes,
i'm more of a soapbox-car scientist. And not even a good one... :-/
FYI, I do have a time dimension on my datasource.
Any help greatly appreciated.
Jeppe Jespersen
Denmark
> Secondly, you can't add two sub-reports together. Just because your
> sub-reports only return one value does not mean that the main report will
> see it as such. If you plugged a sub-report in to that area that returned
> 40 rows of data and then tried to add those together with another
> sub-reports output what would you expect to see?
> So in essence you can't do what you are trying to do since you can't
> reference the subreport the way you are trying.
> --
> Chris Alton, Microsoft Corp.
> SQL Server Developer Support Engineer
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> --
>> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
>> From: "Jeppe Jespersen" <jdj@.jdj.dk>
>> Subject: Adding subreport values
>> Date: Fri, 26 Oct 2007 13:41:07 +0200
>> Lines: 17
>> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
>> MIME-Version: 1.0
>> Content-Type: text/plain;
>> format=flowed;
>> charset="iso-8859-1";
>> reply-type=original
>> Content-Transfer-Encoding: 7bit
>> I have a _very_ simple table with just one row and three columns.
>> The first column of the row contains a subreport that retrieves a single
>> value.
>> The second column of the row contains a subreport that retrieves a single
>> value.
>> ...and heres where I lose it... :-)
>> The third column should contain the sum of column1 and column2. Period.
>> Please help. Thanks :-)
>> jdjespersen
>>
>|||Trust me Analysis Services is something I try to stay away from so I feel
your pain. When it comes to MDX I have almost no idea. Try the analysis
services newsgroup and see if they can give you a hand on creating a query
that will pull back the data you need in one dataset. That way you can
avoid the subreports altogether.
Good luck. You'll need it writing those queries ;)
--
Chris Alton, Microsoft Corp.
SQL Server Developer Support Engineer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> References: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
<FQVdkw$FIHA.360@.TK2MSFTNGHUB02.phx.gbl>
> Subject: Re: Adding subreport values
> Date: Fri, 26 Oct 2007 21:31:32 +0200
> Lines: 87
>
> Hi Chris, and thanks for replying...
> > If all you are doing is returning one value from the sub-report then why
> > use the sub-report at all in the first place?
> In short, 'cause i suck. :-( I'll try to explain.
> Data is in an Analysis Services database, and MDX is not my strongpoint.
> I was hoping that by splitting my queries into seperate datasources, I
could
> get away with much simpler queries. But, not being able to use data from
> two datasets within a single table control, i figured i could do it with
> subreports.
> Imagine a desired report table layout like this. Not the most complex, i
> admit:
> Company Last Years Sales Current Sales
> Total
> Adv.Works 10000 4000
> 14000
> Northwind 3200 2000
> 5200
> Designing the above query may not be rocket science, but as far as MDX
goes,
> i'm more of a soapbox-car scientist. And not even a good one... :-/
> FYI, I do have a time dimension on my datasource.
> Any help greatly appreciated.
> Jeppe Jespersen
> Denmark
>
>
> >
> > Secondly, you can't add two sub-reports together. Just because your
> > sub-reports only return one value does not mean that the main report
will
> > see it as such. If you plugged a sub-report in to that area that
returned
> > 40 rows of data and then tried to add those together with another
> > sub-reports output what would you expect to see?
> >
> > So in essence you can't do what you are trying to do since you can't
> > reference the subreport the way you are trying.
> >
> > --
> > Chris Alton, Microsoft Corp.
> > SQL Server Developer Support Engineer
> > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > --
> >> Reply-To: "Jeppe Jespersen" <jdj@.jdj.dk>
> >> From: "Jeppe Jespersen" <jdj@.jdj.dk>
> >> Subject: Adding subreport values
> >> Date: Fri, 26 Oct 2007 13:41:07 +0200
> >> Lines: 17
> >> Message-ID: <50E85932-E653-4C37-A096-567C497B9B78@.microsoft.com>
> >> MIME-Version: 1.0
> >> Content-Type: text/plain;
> >> format=flowed;
> >> charset="iso-8859-1";
> >> reply-type=original
> >> Content-Transfer-Encoding: 7bit
> >>
> >> I have a _very_ simple table with just one row and three columns.
> >>
> >> The first column of the row contains a subreport that retrieves a
single
> >> value.
> >>
> >> The second column of the row contains a subreport that retrieves a
single
> >> value.
> >>
> >> ...and heres where I lose it... :-)
> >>
> >> The third column should contain the sum of column1 and column2. Period.
> >>
> >> Please help. Thanks :-)
> >>
> >> jdjespersen
> >>
> >>
> >>
> >
>
>|||> Trust me Analysis Services is something I try to stay away from so I feel
> your pain. When it comes to MDX I have almost no idea. Try the analysis
> services newsgroup and see if they can give you a hand on creating a query
> that will pull back the data you need in one dataset. That way you can
> avoid the subreports altogether.
> Good luck. You'll need it writing those queries ;)
Eeeek. And this is one of the simpler queries I'll need.
Thanks for trying to help.
Jeppe Jespersen
Denmark

Adding Subreport Total to Main Report Total

Hi, can anyone help?

I have created a Report using Visual studio-the report displays a subreport within it.

On the Subjective Report I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value), and I

have named this text box ’SubRepM1’

The name of the subreport is ‘subreport1'.

On my Main Report, again I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value)*-1, and I

have named this text box 'MainRepM1'

The name of the main report is 'GMSHA Budget Adjustment Differentials'

The report displays both of the subreport and main report values

but I now need to total these values together for each month in order to

produce a grand total.

I have tried using the following to add the totals for Month 1 together,

=subreport1.Report.SubRepM1 + MainRepM1

but this does not work and I get the following error message ‘The value expression for the text box 'textbox18'contains an error [BC30451] Name subreport1 is not declared'.

I feel that it should be a simple matter of adding the two sets of values together but I’m having major problems trying to get these totals to work.

Can anyone help, thanks

I have the same problem, did you find a solution yet?

Please help. thanks

|||

Hi Dalia

Sorry, no one has been able to help me with this query yet!

But if i find the answer i will let you know.

|||

Hello,

Actually, this is not doable in SQL reporting, you can use multiple datasets instead.

I hope that helps you.

|||

hiya Dailia

tried using an additional dataset and it works perfectly

many thanx

|||How did you use an additional dataset?

Adding Subreport Total to Main Report Total

Hi, can anyone help?

I have created a Report using Visual studio-the report displays a subreport within it.

On the Subjective Report I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value), and I

have named this text box ’SubRepM1’

The name of the subreport is ‘subreport1'.

On my Main Report, again I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value)*-1, and I

have named this text box 'MainRepM1'

The name of the main report is 'GMSHA Budget Adjustment Differentials'

The report displays both of the subreport and main report values

but I now need to total these values together for each month in order to

produce a grand total.

I have tried using the following to add the totals for Month 1 together,

=subreport1.Report.SubRepM1 + MainRepM1

but this does not work and I get the following error message ‘The value expression for the text box 'textbox18'contains an error [BC30451] Name subreport1 is not declared'.

I feel that it should be a simple matter of adding the two sets of values together but I’m having major problems trying to get these totals to work.

Can anyone help, thanks

I have the same problem, did you find a solution yet?

Please help. thanks

|||

Hi Dalia

Sorry, no one has been able to help me with this query yet!

But if i find the answer i will let you know.

|||

Hello,

Actually, this is not doable in SQL reporting, you can use multiple datasets instead.

I hope that helps you.

|||

hiya Dailia

tried using an additional dataset and it works perfectly

many thanx

|||How did you use an additional dataset?

Adding Subreport Total to Main Report Total

Hi, can anyone help?

I have created a Report using Visual studio-the report displays a subreport within it.

On the Subjective Report I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value), and I

have named this text box ’SubRepM1’

The name of the subreport is ‘subreport1'.

On my Main Report, again I have 12 values for each month of the year.

For the first month the value is =sum(Fields! Month_1.Value)*-1, and I

have named this text box 'MainRepM1'

The name of the main report is 'GMSHA Budget Adjustment Differentials'

The report displays both of the subreport and main report values

but I now need to total these values together for each month in order to

produce a grand total.

I have tried using the following to add the totals for Month 1 together,

=subreport1.Report.SubRepM1 + MainRepM1

but this does not work and I get the following error message ‘The value expression for the text box 'textbox18'contains an error [BC30451] Name subreport1 is not declared'.

I feel that it should be a simple matter of adding the two sets of values together but I’m having major problems trying to get these totals to work.

Can anyone help, thanks

I have the same problem, did you find a solution yet?

Please help. thanks

|||

Hi Dalia

Sorry, no one has been able to help me with this query yet!

But if i find the answer i will let you know.

|||

Hello,

Actually, this is not doable in SQL reporting, you can use multiple datasets instead.

I hope that helps you.

|||

hiya Dailia

tried using an additional dataset and it works perfectly

many thanx

|||How did you use an additional dataset?

Adding subreport to report header?

Is it possible? Crystal allowed you to do it but RS doesn't seem to. I have
a number of reports that need to display same data (Org name, date etc.)
on the report header and I thought doing it as a subreport was a good idea.
Any workarounds?
Thanks in advance.Found report templates meet my needs better. Thanks anyway!
> Is it possible? Crystal allowed you to do it but RS doesn't seem to. I
> have a number of reports that need to display same data (Org name,
> date etc.) on the report header and I thought doing it as a subreport
> was a good idea.
> Any workarounds?
> Thanks in advance.
>sql

adding subreport to crosstab

Hi all
My first question is
Is it possible to add a subreport in crosstab report
I am doing a crosstab report and have to add two more fields from another view
is it possible to add a sub report
ThanksIt is possible to add Sub report in a Cross-tab report.

Thursday, February 16, 2012

Adding data from Subreport with data from Main Report

How can I create an expression that Adds values from a main report to values
from a subreport?
TIA
DeanOn Jul 9, 4:07 pm, "Dean" <deanl...@.hotmail.com.nospam> wrote:
> How can I create an expression that Adds values from a main report to values
> from a subreport?
> TIA
> Dean
The main way to do this is to create a new report dataset that
utilizes the data from both the main report and the subreport. Another
way (though limited) of doing it is to create an expression similar to
the following that aggregates the subreport's dataset w/the main one:
=Sum(Fields!SomeFieldName.Value, "SubReportDataSetName") + Fields!
FieldName.Value
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant