Showing posts with label header. Show all posts
Showing posts with label header. Show all posts

Monday, March 19, 2012

Displaying Total number of Rows in a Report in Page Header.

Hi,

I have requirement to display Total number of Rows in a Report in Page Header.

I have written the following code in Page header it shows RowCount for the Page only.

=Count(ReportItems!textboxInTableCell.Value)

Can anyone please help on this?

Regards

Raghav

By Total number of reports in the report do you mean the number of rows returned by the Dataset query? If so, add a textbox in your Report Body with the expression =CountRows("DataSet1") with the name of your Dataset in place of DataSet1.

Then refer to this textbox directly in the Page Header.

This should give you the total row count for your Dataset.

-Aayush

|||

Thanks aayush,

I used =CountRows() in body header and set the RepeatWith property to "tableName" and it works as Page header.

Regards

Raghavendra

Displaying sub report header when part of main report.

Does anyone know a way to display the header of a sub report when the sub report is part of a main report? Im able to get the main report and the sub report to display properly, but the header of the previously developed/tested sub report will not display when embedded in a main report.

Thanks,

MP

I'm afraid this is a feature. A report can only have one header/footer and the Main report takes precedence. To display, you'll need to move the components into the body of the subreport to have them displaying in the main report.

Displaying report parameters in report header or body

Hi,
I like to see in the generated report what the parameters value are for the
current report like startdate and enddate
Thanx WimmoYou can do this by adding a textboxes to the page header and using
expressions like:
=Parameters!startdate.Value
=Parameters!enddate.Value
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wimmo" <Wimmo@.discussions.microsoft.com> wrote in message
news:A1F341D0-9A5A-463E-9974-18A0232F9072@.microsoft.com...
> Hi,
> I like to see in the generated report what the parameters value are for
the
> current report like startdate and enddate
>
> Thanx Wimmo

Sunday, March 11, 2012

Displaying parameter list in report header

I'm trying to display a parameter list of items to a textbox in the header.
Somehow it never evaluates anything after the first item in the array. 1st
below is the expression... 2nd is the custom code. I don't know what I'm
doing wrong...
1.
=code.ParameterList(Parameters!ProgCatCode.value(0))
2.
Public Function ParameterList(ByVal Parameter as Object) as String
Dim sParamItem as Object
Dim sParamVal as String = " "
For Each sParamItem in Parameter
If sParamItem Is Nothing then Exit For
sParamVal &= sParamItem & ", "
Next
Return sParamVal
End FunctionFigured it out..
"gdjoshua" wrote:
> I'm trying to display a parameter list of items to a textbox in the header.
> Somehow it never evaluates anything after the first item in the array. 1st
> below is the expression... 2nd is the custom code. I don't know what I'm
> doing wrong...
> 1.
> =code.ParameterList(Parameters!ProgCatCode.value(0))
> 2.
> Public Function ParameterList(ByVal Parameter as Object) as String
> Dim sParamItem as Object
> Dim sParamVal as String = " "
> For Each sParamItem in Parameter
> If sParamItem Is Nothing then Exit For
> sParamVal &= sParamItem & ", "
> Next
> Return sParamVal
> End Function
>|||What was it that you figured out. Share it with us.
EROK
"gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> Figured it out..
> "gdjoshua" wrote:
>> I'm trying to display a parameter list of items to a textbox in the
>> header.
>> Somehow it never evaluates anything after the first item in the array.
>> 1st
>> below is the expression... 2nd is the custom code. I don't know what
>> I'm
>> doing wrong...
>> 1.
>> =code.ParameterList(Parameters!ProgCatCode.value(0))
>> 2.
>> Public Function ParameterList(ByVal Parameter as Object) as String
>> Dim sParamItem as Object
>> Dim sParamVal as String = " "
>> For Each sParamItem in Parameter
>> If sParamItem Is Nothing then Exit For
>> sParamVal &= sParamItem & ", "
>> Next
>> Return sParamVal
>> End Function|||I had a similar issue, so I can tell you the things I tried.
1. His primary issue with the custom code was what he was passing into the
function. Parameters!ProgCatCode.value(0) will only give the value at index
0, but Parameters!ProgCatCode.value without the parentethis will pass in the
entire array
2. One way around having to write custom code is to use the Join function.
Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
which might be better in some cases. Your Value might be numeric data and
meaningless to the user, but the Lable you made to display in your drop down
list might be what the user really wants to see.
"Erok" wrote:
> What was it that you figured out. Share it with us.
> EROK
> "gdjoshua" <gdjoshua@.discussions.microsoft.com> wrote in message
> news:1D6BB58A-C00C-496C-A675-3FBFBED4E332@.microsoft.com...
> > Figured it out..
> >
> > "gdjoshua" wrote:
> >
> >> I'm trying to display a parameter list of items to a textbox in the
> >> header.
> >> Somehow it never evaluates anything after the first item in the array.
> >> 1st
> >> below is the expression... 2nd is the custom code. I don't know what
> >> I'm
> >> doing wrong...
> >>
> >> 1.
> >> =code.ParameterList(Parameters!ProgCatCode.value(0))
> >>
> >> 2.
> >>
> >> Public Function ParameterList(ByVal Parameter as Object) as String
> >> Dim sParamItem as Object
> >> Dim sParamVal as String = " "
> >> For Each sParamItem in Parameter
> >> If sParamItem Is Nothing then Exit For
> >> sParamVal &= sParamItem & ", "
> >> Next
> >> Return sParamVal
> >> End Function
> >>
>
>|||Rob,
sicne the others did not thank you, I'll say it for them.
THANKS!
"Rob 'Spike' Stevens" wrote:
> I had a similar issue, so I can tell you the things I tried.
> 1. His primary issue with the custom code was what he was passing into the
> function. Parameters!ProgCatCode.value(0) will only give the value at index
> 0, but Parameters!ProgCatCode.value without the parentethis will pass in the
> entire array
> 2. One way around having to write custom code is to use the Join function.
> Join(Parameters!ProgCatCode.value, ", ") gives you all the selected Values.
> Join(Parameters!ProgCatCode.label, ", ") gives you all the selected Labels,
> which might be better in some cases. Your Value might be numeric data and
> meaningless to the user, but the Lable you made to display in your drop down
> list might be what the user really wants to see.

Friday, March 9, 2012

Displaying Header on each page

I am new to Report Services. CurrentlyI have mulitple pages of
information returned from my query and I would like to know if it is
possible to display the header information at the top of each page as
it is called by the user. At the moment it will only be present on the
first page.
Any help would be much appreciated.
IvanSimplest way is to incorporate your header info into the data region
(table, matrix, etc.) of your report.
Good luck and good reporting!!|||If it is group header that you want repeated you can click the end of a row
that has the group and then in the properties window you will see the option
to repeat on new page and you can set it to true.
"Ivan" wrote:
> I am new to Report Services. CurrentlyI have mulitple pages of
> information returned from my query and I would like to know if it is
> possible to display the header information at the top of each page as
> it is called by the user. At the moment it will only be present on the
> first page.
> Any help would be much appreciated.
> Ivan
>|||Ivan,
There is a group property called "RepeatOnNewPage" that can be set on
the group's header or footer lines.
Kent
Ivan wrote:
> I am new to Report Services. CurrentlyI have mulitple pages of
> information returned from my query and I would like to know if it is
> possible to display the header information at the top of each page as
> it is called by the user. At the moment it will only be present on the
> first page.
> Any help would be much appreciated.
> Ivan

displaying date ranges in the report header

I am using a table to structure my report.
Body of the report
Table header
Group Header
Details
Group Footer
Table Footer
Earlier I had put the report name with the company logo in the report
header section but now I moved it to the body of the report just above
the table. I am trying to display the date range next to the report
name. I am trying to use an expression saying that if the date
parameters are NULL, then print the date today() else print the two
date parameters with a hyphen seperating them. On running the report it
gives an error that I caanot use expressions in a text box or in the
report header. I am creating a variable in the dataset as a calculated
field and then setting the expression.
Can someone please help'
Regards
JaideepYes, specify the expression in a textbox (assume the textbox name is
textbox5 on the body and make the visibility property FALSE.
Next, in the report header, for the expression use:
=ReportItems!TextBox5.Value
=-Chris
"jai" <dbasybase@.gmail.com> wrote in message
news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
>I am using a table to structure my report.
> Body of the report
> Table header
> Group Header
> Details
> Group Footer
> Table Footer
> Earlier I had put the report name with the company logo in the report
> header section but now I moved it to the body of the report just above
> the table. I am trying to display the date range next to the report
> name. I am trying to use an expression saying that if the date
> parameters are NULL, then print the date today() else print the two
> date parameters with a hyphen seperating them. On running the report it
> gives an error that I caanot use expressions in a text box or in the
> report header. I am creating a variable in the dataset as a calculated
> field and then setting the expression.
> Can someone please help'
> Regards
> Jaideep
>|||Chris,
Thanks for the help. I am trying to set this expressions and it keeps
telling me that dbnull cannot be used.
IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
= System.DBNull),Today(),(Parameters!date1.Value & "-" &
Parameters!date2.Value))
I have two parameters. I am using a stored proc in the background. If
ther parameters are null it gives me data for the previous day.
I need to show the report heading as the <Report name> <date>/<date1 -
date2>
I think it the system does not want to accept the system.DBNull
Regards
Jaideep
Chris Conner wrote:
> Yes, specify the expression in a textbox (assume the textbox name is
> textbox5 on the body and make the visibility property FALSE.
> Next, in the report header, for the expression use:
> =ReportItems!TextBox5.Value
> =-Chris
> "jai" <dbasybase@.gmail.com> wrote in message
> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
> >I am using a table to structure my report.
> >
> > Body of the report
> >
> > Table header
> > Group Header
> > Details
> > Group Footer
> > Table Footer
> >
> > Earlier I had put the report name with the company logo in the report
> > header section but now I moved it to the body of the report just above
> > the table. I am trying to display the date range next to the report
> > name. I am trying to use an expression saying that if the date
> > parameters are NULL, then print the date today() else print the two
> > date parameters with a hyphen seperating them. On running the report it
> > gives an error that I caanot use expressions in a text box or in the
> > report header. I am creating a variable in the dataset as a calculated
> > field and then setting the expression.
> >
> > Can someone please help'
> >
> > Regards
> >
> > Jaideep
> >|||I think I got it. I should use is Nothing instead of System.DBNull.
I will try what you had said.
Jaideep
jai wrote:
> Chris,
> Thanks for the help. I am trying to set this expressions and it keeps
> telling me that dbnull cannot be used.
> IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
> = System.DBNull),Today(),(Parameters!date1.Value & "-" &
> Parameters!date2.Value))
> I have two parameters. I am using a stored proc in the background. If
> ther parameters are null it gives me data for the previous day.
> I need to show the report heading as the <Report name> <date>/<date1 -
> date2>
> I think it the system does not want to accept the system.DBNull
> Regards
> Jaideep
> Chris Conner wrote:
> > Yes, specify the expression in a textbox (assume the textbox name is
> > textbox5 on the body and make the visibility property FALSE.
> >
> > Next, in the report header, for the expression use:
> > =ReportItems!TextBox5.Value
> >
> > =-Chris
> >
> > "jai" <dbasybase@.gmail.com> wrote in message
> > news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
> > >I am using a table to structure my report.
> > >
> > > Body of the report
> > >
> > > Table header
> > > Group Header
> > > Details
> > > Group Footer
> > > Table Footer
> > >
> > > Earlier I had put the report name with the company logo in the report
> > > header section but now I moved it to the body of the report just above
> > > the table. I am trying to display the date range next to the report
> > > name. I am trying to use an expression saying that if the date
> > > parameters are NULL, then print the date today() else print the two
> > > date parameters with a hyphen seperating them. On running the report it
> > > gives an error that I caanot use expressions in a text box or in the
> > > report header. I am creating a variable in the dataset as a calculated
> > > field and then setting the expression.
> > >
> > > Can someone please help'
> > >
> > > Regards
> > >
> > > Jaideep
> > >|||Don't use that = use instead iif((Parameters!date1.Value = Nothing ...
to test for nullability.
=-Chris
"jai" <dbasybase@.gmail.com> wrote in message
news:1161371300.024539.176980@.k70g2000cwa.googlegroups.com...
> Chris,
> Thanks for the help. I am trying to set this expressions and it keeps
> telling me that dbnull cannot be used.
> IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
> = System.DBNull),Today(),(Parameters!date1.Value & "-" &
> Parameters!date2.Value))
> I have two parameters. I am using a stored proc in the background. If
> ther parameters are null it gives me data for the previous day.
> I need to show the report heading as the <Report name> <date>/<date1 -
> date2>
> I think it the system does not want to accept the system.DBNull
> Regards
> Jaideep
> Chris Conner wrote:
>> Yes, specify the expression in a textbox (assume the textbox name is
>> textbox5 on the body and make the visibility property FALSE.
>> Next, in the report header, for the expression use:
>> =ReportItems!TextBox5.Value
>> =-Chris
>> "jai" <dbasybase@.gmail.com> wrote in message
>> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
>> >I am using a table to structure my report.
>> >
>> > Body of the report
>> >
>> > Table header
>> > Group Header
>> > Details
>> > Group Footer
>> > Table Footer
>> >
>> > Earlier I had put the report name with the company logo in the report
>> > header section but now I moved it to the body of the report just above
>> > the table. I am trying to display the date range next to the report
>> > name. I am trying to use an expression saying that if the date
>> > parameters are NULL, then print the date today() else print the two
>> > date parameters with a hyphen seperating them. On running the report it
>> > gives an error that I caanot use expressions in a text box or in the
>> > report header. I am creating a variable in the dataset as a calculated
>> > field and then setting the expression.
>> >
>> > Can someone please help'
>> >
>> > Regards
>> >
>> > Jaideep
>> >
>|||Chris,
I created the text box in the body and set the expression which is
being displayed properly. Now I created another text box in the report
header section and in the expression I said
ReportItems!TextBox5.Value
It is giving me an error --
The Value expression for the textbox 'textbox17' contains an error:
The expression referenced a non-existing reportitem in the reportitems
collection.
Preview complete -- 0 errors, 1 warnings
I can understand the error but how do i add something to the
reportitems collection?
Jaideep
Chris Conner wrote:
> Don't use that = use instead iif((Parameters!date1.Value = Nothing ...
> to test for nullability.
> =-Chris
> "jai" <dbasybase@.gmail.com> wrote in message
> news:1161371300.024539.176980@.k70g2000cwa.googlegroups.com...
> > Chris,
> >
> > Thanks for the help. I am trying to set this expressions and it keeps
> > telling me that dbnull cannot be used.
> >
> > IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
> > = System.DBNull),Today(),(Parameters!date1.Value & "-" &
> > Parameters!date2.Value))
> >
> > I have two parameters. I am using a stored proc in the background. If
> > ther parameters are null it gives me data for the previous day.
> >
> > I need to show the report heading as the <Report name> <date>/<date1 -
> > date2>
> >
> > I think it the system does not want to accept the system.DBNull
> >
> > Regards
> >
> > Jaideep
> > Chris Conner wrote:
> >> Yes, specify the expression in a textbox (assume the textbox name is
> >> textbox5 on the body and make the visibility property FALSE.
> >>
> >> Next, in the report header, for the expression use:
> >> =ReportItems!TextBox5.Value
> >>
> >> =-Chris
> >>
> >> "jai" <dbasybase@.gmail.com> wrote in message
> >> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
> >> >I am using a table to structure my report.
> >> >
> >> > Body of the report
> >> >
> >> > Table header
> >> > Group Header
> >> > Details
> >> > Group Footer
> >> > Table Footer
> >> >
> >> > Earlier I had put the report name with the company logo in the report
> >> > header section but now I moved it to the body of the report just above
> >> > the table. I am trying to display the date range next to the report
> >> > name. I am trying to use an expression saying that if the date
> >> > parameters are NULL, then print the date today() else print the two
> >> > date parameters with a hyphen seperating them. On running the report it
> >> > gives an error that I caanot use expressions in a text box or in the
> >> > report header. I am creating a variable in the dataset as a calculated
> >> > field and then setting the expression.
> >> >
> >> > Can someone please help'
> >> >
> >> > Regards
> >> >
> >> > Jaideep
> >> >
> >|||I forgot to mention - it is CASE sensitive.. by default, the textbox names
are in lowercase. Sorry about that.
=-Chris
"jai" <dbasybase@.gmail.com> wrote in message
news:1161374030.963039.245760@.b28g2000cwb.googlegroups.com...
> Chris,
> I created the text box in the body and set the expression which is
> being displayed properly. Now I created another text box in the report
> header section and in the expression I said
> ReportItems!TextBox5.Value
> It is giving me an error --
> The Value expression for the textbox 'textbox17' contains an error:
> The expression referenced a non-existing reportitem in the reportitems
> collection.
> Preview complete -- 0 errors, 1 warnings
> I can understand the error but how do i add something to the
> reportitems collection?
> Jaideep
>
> Chris Conner wrote:
>> Don't use that = use instead iif((Parameters!date1.Value = Nothing ...
>> to test for nullability.
>> =-Chris
>> "jai" <dbasybase@.gmail.com> wrote in message
>> news:1161371300.024539.176980@.k70g2000cwa.googlegroups.com...
>> > Chris,
>> >
>> > Thanks for the help. I am trying to set this expressions and it keeps
>> > telling me that dbnull cannot be used.
>> >
>> > IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
>> > = System.DBNull),Today(),(Parameters!date1.Value & "-" &
>> > Parameters!date2.Value))
>> >
>> > I have two parameters. I am using a stored proc in the background. If
>> > ther parameters are null it gives me data for the previous day.
>> >
>> > I need to show the report heading as the <Report name> <date>/<date1 -
>> > date2>
>> >
>> > I think it the system does not want to accept the system.DBNull
>> >
>> > Regards
>> >
>> > Jaideep
>> > Chris Conner wrote:
>> >> Yes, specify the expression in a textbox (assume the textbox name is
>> >> textbox5 on the body and make the visibility property FALSE.
>> >>
>> >> Next, in the report header, for the expression use:
>> >> =ReportItems!TextBox5.Value
>> >>
>> >> =-Chris
>> >>
>> >> "jai" <dbasybase@.gmail.com> wrote in message
>> >> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
>> >> >I am using a table to structure my report.
>> >> >
>> >> > Body of the report
>> >> >
>> >> > Table header
>> >> > Group Header
>> >> > Details
>> >> > Group Footer
>> >> > Table Footer
>> >> >
>> >> > Earlier I had put the report name with the company logo in the
>> >> > report
>> >> > header section but now I moved it to the body of the report just
>> >> > above
>> >> > the table. I am trying to display the date range next to the report
>> >> > name. I am trying to use an expression saying that if the date
>> >> > parameters are NULL, then print the date today() else print the two
>> >> > date parameters with a hyphen seperating them. On running the report
>> >> > it
>> >> > gives an error that I caanot use expressions in a text box or in the
>> >> > report header. I am creating a variable in the dataset as a
>> >> > calculated
>> >> > field and then setting the expression.
>> >> >
>> >> > Can someone please help'
>> >> >
>> >> > Regards
>> >> >
>> >> > Jaideep
>> >> >
>> >
>|||Thanks that did the trick. But I found another problem. If the date
range is one day apart then the text box displays the correct values
but if the range is more than two days, then it does not display the
values but the report returns the data.
Any ideas?
Jaideep
Chris Conner wrote:
> I forgot to mention - it is CASE sensitive.. by default, the textbox names
> are in lowercase. Sorry about that.
> =-Chris
> "jai" <dbasybase@.gmail.com> wrote in message
> news:1161374030.963039.245760@.b28g2000cwb.googlegroups.com...
> > Chris,
> > I created the text box in the body and set the expression which is
> > being displayed properly. Now I created another text box in the report
> > header section and in the expression I said
> > ReportItems!TextBox5.Value
> >
> > It is giving me an error --
> > The Value expression for the textbox 'textbox17' contains an error:
> > The expression referenced a non-existing reportitem in the reportitems
> > collection.
> > Preview complete -- 0 errors, 1 warnings
> >
> > I can understand the error but how do i add something to the
> > reportitems collection?
> >
> > Jaideep
> >
> >
> >
> > Chris Conner wrote:
> >> Don't use that = use instead iif((Parameters!date1.Value = Nothing ...
> >>
> >> to test for nullability.
> >>
> >> =-Chris
> >>
> >> "jai" <dbasybase@.gmail.com> wrote in message
> >> news:1161371300.024539.176980@.k70g2000cwa.googlegroups.com...
> >> > Chris,
> >> >
> >> > Thanks for the help. I am trying to set this expressions and it keeps
> >> > telling me that dbnull cannot be used.
> >> >
> >> > IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
> >> > = System.DBNull),Today(),(Parameters!date1.Value & "-" &
> >> > Parameters!date2.Value))
> >> >
> >> > I have two parameters. I am using a stored proc in the background. If
> >> > ther parameters are null it gives me data for the previous day.
> >> >
> >> > I need to show the report heading as the <Report name> <date>/<date1 -
> >> > date2>
> >> >
> >> > I think it the system does not want to accept the system.DBNull
> >> >
> >> > Regards
> >> >
> >> > Jaideep
> >> > Chris Conner wrote:
> >> >> Yes, specify the expression in a textbox (assume the textbox name is
> >> >> textbox5 on the body and make the visibility property FALSE.
> >> >>
> >> >> Next, in the report header, for the expression use:
> >> >> =ReportItems!TextBox5.Value
> >> >>
> >> >> =-Chris
> >> >>
> >> >> "jai" <dbasybase@.gmail.com> wrote in message
> >> >> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
> >> >> >I am using a table to structure my report.
> >> >> >
> >> >> > Body of the report
> >> >> >
> >> >> > Table header
> >> >> > Group Header
> >> >> > Details
> >> >> > Group Footer
> >> >> > Table Footer
> >> >> >
> >> >> > Earlier I had put the report name with the company logo in the
> >> >> > report
> >> >> > header section but now I moved it to the body of the report just
> >> >> > above
> >> >> > the table. I am trying to display the date range next to the report
> >> >> > name. I am trying to use an expression saying that if the date
> >> >> > parameters are NULL, then print the date today() else print the two
> >> >> > date parameters with a hyphen seperating them. On running the report
> >> >> > it
> >> >> > gives an error that I caanot use expressions in a text box or in the
> >> >> > report header. I am creating a variable in the dataset as a
> >> >> > calculated
> >> >> > field and then setting the expression.
> >> >> >
> >> >> > Can someone please help'
> >> >> >
> >> >> > Regards
> >> >> >
> >> >> > Jaideep
> >> >> >
> >> >
> >|||Chris,
I have been seeing that if the report is more than one page, the system
prints the date range in the report header on the last page.
I checked the properties but did not find anything unusual there.
Regards
Jaideep
jai wrote:
> Thanks that did the trick. But I found another problem. If the date
> range is one day apart then the text box displays the correct values
> but if the range is more than two days, then it does not display the
> values but the report returns the data.
> Any ideas?
> Jaideep
> Chris Conner wrote:
> > I forgot to mention - it is CASE sensitive.. by default, the textbox names
> > are in lowercase. Sorry about that.
> >
> > =-Chris
> >
> > "jai" <dbasybase@.gmail.com> wrote in message
> > news:1161374030.963039.245760@.b28g2000cwb.googlegroups.com...
> > > Chris,
> > > I created the text box in the body and set the expression which is
> > > being displayed properly. Now I created another text box in the report
> > > header section and in the expression I said
> > > ReportItems!TextBox5.Value
> > >
> > > It is giving me an error --
> > > The Value expression for the textbox 'textbox17' contains an error:
> > > The expression referenced a non-existing reportitem in the reportitems
> > > collection.
> > > Preview complete -- 0 errors, 1 warnings
> > >
> > > I can understand the error but how do i add something to the
> > > reportitems collection?
> > >
> > > Jaideep
> > >
> > >
> > >
> > > Chris Conner wrote:
> > >> Don't use that = use instead iif((Parameters!date1.Value = Nothing ...
> > >>
> > >> to test for nullability.
> > >>
> > >> =-Chris
> > >>
> > >> "jai" <dbasybase@.gmail.com> wrote in message
> > >> news:1161371300.024539.176980@.k70g2000cwa.googlegroups.com...
> > >> > Chris,
> > >> >
> > >> > Thanks for the help. I am trying to set this expressions and it keeps
> > >> > telling me that dbnull cannot be used.
> > >> >
> > >> > IIf((Parameters!date1.Value = System.DBNull And Parameters!date2.Value
> > >> > = System.DBNull),Today(),(Parameters!date1.Value & "-" &
> > >> > Parameters!date2.Value))
> > >> >
> > >> > I have two parameters. I am using a stored proc in the background. If
> > >> > ther parameters are null it gives me data for the previous day.
> > >> >
> > >> > I need to show the report heading as the <Report name> <date>/<date1 -
> > >> > date2>
> > >> >
> > >> > I think it the system does not want to accept the system.DBNull
> > >> >
> > >> > Regards
> > >> >
> > >> > Jaideep
> > >> > Chris Conner wrote:
> > >> >> Yes, specify the expression in a textbox (assume the textbox name is
> > >> >> textbox5 on the body and make the visibility property FALSE.
> > >> >>
> > >> >> Next, in the report header, for the expression use:
> > >> >> =ReportItems!TextBox5.Value
> > >> >>
> > >> >> =-Chris
> > >> >>
> > >> >> "jai" <dbasybase@.gmail.com> wrote in message
> > >> >> news:1161364744.236416.98920@.k70g2000cwa.googlegroups.com...
> > >> >> >I am using a table to structure my report.
> > >> >> >
> > >> >> > Body of the report
> > >> >> >
> > >> >> > Table header
> > >> >> > Group Header
> > >> >> > Details
> > >> >> > Group Footer
> > >> >> > Table Footer
> > >> >> >
> > >> >> > Earlier I had put the report name with the company logo in the
> > >> >> > report
> > >> >> > header section but now I moved it to the body of the report just
> > >> >> > above
> > >> >> > the table. I am trying to display the date range next to the report
> > >> >> > name. I am trying to use an expression saying that if the date
> > >> >> > parameters are NULL, then print the date today() else print the two
> > >> >> > date parameters with a hyphen seperating them. On running the report
> > >> >> > it
> > >> >> > gives an error that I caanot use expressions in a text box or in the
> > >> >> > report header. I am creating a variable in the dataset as a
> > >> >> > calculated
> > >> >> > field and then setting the expression.
> > >> >> >
> > >> >> > Can someone please help'
> > >> >> >
> > >> >> > Regards
> > >> >> >
> > >> >> > Jaideep
> > >> >> >
> > >> >
> > >

Wednesday, March 7, 2012

Displaying CustomerID in the report header on mutliple pages

Hi everybody,
I would like to have a field (CustomerID) that is displayed in the header of
the page. I can reference a field of the page with
ReportItems!CustomerID.Value. This works fine as long the customer
information is not spanned across two different pages.
If this is the case the field in the header is empty on the second page. Is
there another solution to this? Why can't I just reference a field item?
Thanks,
tomIf you have any control in the Header of a report , then
by default the controls are repeated in all pages.
There is a Report Header property where you can set print
on first page and print on last page to true or false.
If you have "Print on Last Page " set to false and if 2nd
page is your last page then you will not see the header on
the second page.
Just see if this is the case with your report.
>--Original Message--
>Hi everybody,
>I would like to have a field (CustomerID) that is
displayed in the header of
>the page. I can reference a field of the page with
>ReportItems!CustomerID.Value. This works fine as long the
customer
>information is not spanned across two different pages.
>If this is the case the field in the header is empty on
the second page. Is
>there another solution to this? Why can't I just
reference a field item?
>Thanks,
>tom
>
>.
>

Displaying Aggregate Values in Header on every page

Hi all.
Product: SQL Server 2000 Reporting Services Service Pack
I am trying to display a calculated field in the Page Header for every page.
I have tried the suggestions written, but the textbox only appears on the
Page Header on the last page of the report.
For example, textbox29 in the body of my report is:
=First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
In the Page Header, I just display the textbox:
=ReportItems!textbox29.value
The result only appears on the last page of the report. How can this result
appear on every page of the report? I tried using RepeatWith, but that did
nothing. Please help. Thanks.
--
-RB
:)Can someone please respond to this question? I appreciate it. Thanks.
--
-RB
:)
"capricorn" wrote:
> Hi all.
> Product: SQL Server 2000 Reporting Services Service Pack
> I am trying to display a calculated field in the Page Header for every page.
> I have tried the suggestions written, but the textbox only appears on the
> Page Header on the last page of the report.
> For example, textbox29 in the body of my report is:
> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> In the Page Header, I just display the textbox:
> =ReportItems!textbox29.value
> The result only appears on the last page of the report. How can this result
> appear on every page of the report? I tried using RepeatWith, but that did
> nothing. Please help. Thanks.
> --
> -RB
> :)|||It sounds like you have a data region (matrix, table, list) above textbox29
in the report layout that will grow to multiple pages at runtime. You could
set the RepeatWith value of textbox29 to the name of that particular data
region that expands over many pages - also try putting textbox29 right next
to that data region. The value should then repeat on all these pages and
will be available in the page header/footer also. BTW: you could set the
textbox29 Visibility to be always hidden - the value will still show up in
the page header/footer, but it will be hidden in the report body.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> Can someone please respond to this question? I appreciate it. Thanks.
> --
> -RB
> :)
>
> "capricorn" wrote:
>> Hi all.
>> Product: SQL Server 2000 Reporting Services Service Pack
>> I am trying to display a calculated field in the Page Header for every
>> page.
>> I have tried the suggestions written, but the textbox only appears on the
>> Page Header on the last page of the report.
>> For example, textbox29 in the body of my report is:
>> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
>> In the Page Header, I just display the textbox:
>> =ReportItems!textbox29.value
>> The result only appears on the last page of the report. How can this
>> result
>> appear on every page of the report? I tried using RepeatWith, but that
>> did
>> nothing. Please help. Thanks.
>> --
>> -RB
>> :)|||Robert,
I tried putting textbox29 next to table1 with the repeatwith option pointing
to table1 and this time the value of textbox29 only appears on this first
page. I tried putting textbox29 before table1 and the value still only
appears on the first page. The textbox value is not repeating with the table
that is spanning multiple pages.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> It sounds like you have a data region (matrix, table, list) above textbox29
> in the report layout that will grow to multiple pages at runtime. You could
> set the RepeatWith value of textbox29 to the name of that particular data
> region that expands over many pages - also try putting textbox29 right next
> to that data region. The value should then repeat on all these pages and
> will be available in the page header/footer also. BTW: you could set the
> textbox29 Visibility to be always hidden - the value will still show up in
> the page header/footer, but it will be hidden in the report body.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> > Can someone please respond to this question? I appreciate it. Thanks.
> > --
> > -RB
> > :)
> >
> >
> > "capricorn" wrote:
> >
> >> Hi all.
> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> I am trying to display a calculated field in the Page Header for every
> >> page.
> >> I have tried the suggestions written, but the textbox only appears on the
> >> Page Header on the last page of the report.
> >>
> >> For example, textbox29 in the body of my report is:
> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> >>
> >> In the Page Header, I just display the textbox:
> >> =ReportItems!textbox29.value
> >>
> >> The result only appears on the last page of the report. How can this
> >> result
> >> appear on every page of the report? I tried using RepeatWith, but that
> >> did
> >> nothing. Please help. Thanks.
> >> --
> >> -RB
> >> :)
>
>|||Which output format are you using? Note: RepeatWith for duplicating items in
the report body is only supported for physical page oriented renderers (such
as PDF), but at this point not for interactive renderers such as HTML.
I assume the textbox is sitting parallel to the table (not above and not
below). The correct value of that textbox should still be available in the
page header/footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"capricorn" <capricorn@.discussions.microsoft.com> wrote in message
news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> Robert,
> I tried putting textbox29 next to table1 with the repeatwith option
> pointing
> to table1 and this time the value of textbox29 only appears on this first
> page. I tried putting textbox29 before table1 and the value still only
> appears on the first page. The textbox value is not repeating with the
> table
> that is spanning multiple pages.
> --
> -RB
> :)
>
> "Robert Bruckner [MSFT]" wrote:
>> It sounds like you have a data region (matrix, table, list) above
>> textbox29
>> in the report layout that will grow to multiple pages at runtime. You
>> could
>> set the RepeatWith value of textbox29 to the name of that particular data
>> region that expands over many pages - also try putting textbox29 right
>> next
>> to that data region. The value should then repeat on all these pages and
>> will be available in the page header/footer also. BTW: you could set the
>> textbox29 Visibility to be always hidden - the value will still show up
>> in
>> the page header/footer, but it will be hidden in the report body.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
>> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
>> > Can someone please respond to this question? I appreciate it. Thanks.
>> > --
>> > -RB
>> > :)
>> >
>> >
>> > "capricorn" wrote:
>> >
>> >> Hi all.
>> >> Product: SQL Server 2000 Reporting Services Service Pack
>> >> I am trying to display a calculated field in the Page Header for every
>> >> page.
>> >> I have tried the suggestions written, but the textbox only appears on
>> >> the
>> >> Page Header on the last page of the report.
>> >>
>> >> For example, textbox29 in the body of my report is:
>> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
>> >>
>> >> In the Page Header, I just display the textbox:
>> >> =ReportItems!textbox29.value
>> >>
>> >> The result only appears on the last page of the report. How can this
>> >> result
>> >> appear on every page of the report? I tried using RepeatWith, but that
>> >> did
>> >> nothing. Please help. Thanks.
>> >> --
>> >> -RB
>> >> :)
>>|||Robert,
I am looking at the Preview page within the Designer. As you suggested, I
put the textbox next to the table and the textbox value is available on the
Page Header of the first page. The textbox value does not repeat on
subsequent page headers.
--
-RB
:)
"Robert Bruckner [MSFT]" wrote:
> Which output format are you using? Note: RepeatWith for duplicating items in
> the report body is only supported for physical page oriented renderers (such
> as PDF), but at this point not for interactive renderers such as HTML.
> I assume the textbox is sitting parallel to the table (not above and not
> below). The correct value of that textbox should still be available in the
> page header/footer.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> news:1750AF6B-7CBE-4F21-9E98-26A60B93FF03@.microsoft.com...
> > Robert,
> > I tried putting textbox29 next to table1 with the repeatwith option
> > pointing
> > to table1 and this time the value of textbox29 only appears on this first
> > page. I tried putting textbox29 before table1 and the value still only
> > appears on the first page. The textbox value is not repeating with the
> > table
> > that is spanning multiple pages.
> > --
> > -RB
> > :)
> >
> >
> > "Robert Bruckner [MSFT]" wrote:
> >
> >> It sounds like you have a data region (matrix, table, list) above
> >> textbox29
> >> in the report layout that will grow to multiple pages at runtime. You
> >> could
> >> set the RepeatWith value of textbox29 to the name of that particular data
> >> region that expands over many pages - also try putting textbox29 right
> >> next
> >> to that data region. The value should then repeat on all these pages and
> >> will be available in the page header/footer also. BTW: you could set the
> >> textbox29 Visibility to be always hidden - the value will still show up
> >> in
> >> the page header/footer, but it will be hidden in the report body.
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >>
> >>
> >> "capricorn" <capricorn@.discussions.microsoft.com> wrote in message
> >> news:7A28CB6A-4E54-4A42-8C35-9D2894E11F3C@.microsoft.com...
> >> > Can someone please respond to this question? I appreciate it. Thanks.
> >> > --
> >> > -RB
> >> > :)
> >> >
> >> >
> >> > "capricorn" wrote:
> >> >
> >> >> Hi all.
> >> >> Product: SQL Server 2000 Reporting Services Service Pack
> >> >> I am trying to display a calculated field in the Page Header for every
> >> >> page.
> >> >> I have tried the suggestions written, but the textbox only appears on
> >> >> the
> >> >> Page Header on the last page of the report.
> >> >>
> >> >> For example, textbox29 in the body of my report is:
> >> >> =First(Fields!Next_2_Years.Value, "AnalysisCngEECSalary")
> >> >>
> >> >> In the Page Header, I just display the textbox:
> >> >> =ReportItems!textbox29.value
> >> >>
> >> >> The result only appears on the last page of the report. How can this
> >> >> result
> >> >> appear on every page of the report? I tried using RepeatWith, but that
> >> >> did
> >> >> nothing. Please help. Thanks.
> >> >> --
> >> >> -RB
> >> >> :)
> >>
> >>
> >>
>
>

Saturday, February 25, 2012

Displaying A Date Prompt (Range) In Page Header

I inserted a date prompt (range) into a "Page Header" of a "Crystal Reports", but when I refreshed the report, the date prompt did not display in the "Page Header". What am I doing wrong ?Never mind, I found a solution. Below is the solution . . .

"From: " + ToText ( Minimum ( {?Prompt_Date} ) ) +
" To: " + ToText ( Maximum ( {?Prompt_Date} ) )

Friday, February 24, 2012

Display Selected Parameters in Report

Is there a way of showing which parameter values were chosen from a multi-value parameter list in RS 2005?

I want to show in the Report Header the parameters that have been chosen. There are "Count", "Value", "Label", "IsMultiValue" options in the expression builder for the parameter but no way of knowing which ones were selected?

Found the answer....from Robert....

Once you mark a paraeter as "multi-value", the .Value property will return an object[] with all selected values. If only one value is selected, it will be an object array of length = 1. Object arrays cannot be directly compared with Strings.

To access individual values of a multi value parameter you can use expressions like this:
=Parameters!MVP1.IsMultiValue
boolean flag - tells if a parameter is defined as multi value
=Parameters!MVP1.Count
returns the number of values in the array
=Parameters!MVP1.Value(0)
returns the first selected value
=Join(Parameters!MVP1.Value)
creates a space separated list of values
=Join(Parameters!MVP1.Value, ", ")
creates a comma separated list of values
=Split("a b c", " ")
to create a multi value object array from a string (this can be used e.g. for drillthrough parameters, subreports, or query parameters)

See also MSDN:
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctjoin.asp
* http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctsplit.asp

-- Robert

Display Result in Page Header

Hi!

I've got following problem: I got a formula evaluated whileprintingrecords in page footer. It writes in a global variable the highest number on the page. When I display this variable in page footer it works fine. But I want it to appear on the page header, too! When I display it in page header, it is the old value. Of course, because the variable is written on the end of page.

Is there a possibility to say the page header should be written AFTER the Page Footer? Or that the variable shall be displayed AFTER the page footer?
I tried the EvaluateAfter() function but it didn't work. It just writes the previous value on the top of following page.

I would be glad about some hints.

Greeting and thanks,
MarkusCongratulations, you've run into one of the most unpleasant "features" of Crystal Reports - inability to display running totals in group or page headers. In fact, there are workarounds for squeezing group-level running totals into group headers (by using external views or crosstabs), but for page-level totals, I think you are out of luck.

The reason is, as you correctly mentioned, that pages are formed and all running totals are calculated AND PRINTED during pass 2, but to put the running totals into headers, pass 3 would be required. There is, in fact, pass 3, but it will not calculate anything except page count.|||Thank you for your answer. Although it's not the one I wanted to hear... :-(

Perhaps there is a possibility to locate the field at an absolute position? So I can say: "Okay, you're evaluated in page footer, but displayed 2cm away from top of page"... But I think, this is not possible, too. I've seen that the position relates on section, therefore is no absolute one...

Sad, that CR is far behind freeware tools in this topic... Had one where you could set the evaluation and print time for each field...

Display report parameter in report

How can I display the label field from a query parameter within the report header? I have a parameter that gets it's value from a drop down list. The parameter value is passed to the stored procedure but I want to display the text portion within the report.=Parameters!YourParam.Label() & ": " & Parameters!YourParam.Value()

Sunday, February 19, 2012

Display Report AUTHOR and DESCRIPTION

What is the syntax to display the report property
fields within a textbox on the report header ?These properties are not exposed in the Report Object Model (which is
accessible from expressions within a report).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> What is the syntax to display the report property
> fields within a textbox on the report header ?|||"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> These properties are not exposed in the Report Object Model (which is
> accessible from expressions within a report).
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Dave" <davidldoyle@.yahoo.com> wrote in message
> news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > What is the syntax to display the report property
> > fields within a textbox on the report header ?
I did not understand your reply in parenthesis....Do you mean
properties are not available, or that they are within expressions
within a report.
Thank you.|||The author and description properties are not available to textboxes. Your
choices are to either hard code the values into a textbox(es) or to add the
information to a table and pull it into the report using a dataset.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.|||I meant that expressions in reports can only access information and metadata
that is exposed in the Report Object Model. This object model contains the
following collections: Fields, Reportitems, Parameters, Globals, User.
The properties for Author and Description are not exposed there. So you
cannot access them.
BTW: these properties are exposed in the Rendering Object Model, but you
would need to write your own custom rendering extension to take advantage of
that and it would still be very hard to solve your initial problem (show
these properties in header / footer).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dave" <davidldoyle@.yahoo.com> wrote in message
news:4e7ae5a2.0406221148.7468775@.posting.google.com...
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:<uqo1jCAWEHA.2340@.TK2MSFTNGP09.phx.gbl>...
> > These properties are not exposed in the Report Object Model (which is
> > accessible from expressions within a report).
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> >
> > "Dave" <davidldoyle@.yahoo.com> wrote in message
> > news:4e7ae5a2.0406210905.67ff246e@.posting.google.com...
> > > What is the syntax to display the report property
> > > fields within a textbox on the report header ?
> I did not understand your reply in parenthesis....Do you mean
> properties are not available, or that they are within expressions
> within a report.
> Thank you.

display record count in footer

I have the following data: name, grade
and am displaying it in a table like the following:
table header: Monthly Attendance by Student
group header: ="Grade: " & Fields!grade.Value (grade 1-12)
group detail: =Fields!Name.Value
group footer: need a count of the number of students in grade
table footer: =Count(Fields!Name.Value, "AttendanceDetail") (total number of
students in all grades)
Right now if I do the same =Count that I am doing in the table footer in the
group footer, I get the total count of records returned, not the count for
the group (grade). How do I do this?
Thank you for your help!In the group footer, just use the following expression:
=Count(Fields!Name.Value)
Alternatively, specify the scope name explicitly as the name of the table
group.
E.g. =Count(Fields!Name.Value, "TableGroupFooterName")
Both expressions should give you the desired result in the group footer.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"SharinDenver" <SharinDenver@.discussions.microsoft.com> wrote in message
news:73422EA7-E49A-44A5-8EBD-EEE50842CB46@.microsoft.com...
>I have the following data: name, grade
> and am displaying it in a table like the following:
> table header: Monthly Attendance by Student
> group header: ="Grade: " & Fields!grade.Value (grade 1-12)
> group detail: =Fields!Name.Value
> group footer: need a count of the number of students in grade
> table footer: =Count(Fields!Name.Value, "AttendanceDetail") (total number
> of
> students in all grades)
> Right now if I do the same =Count that I am doing in the table footer in
> the
> group footer, I get the total count of records returned, not the count for
> the group (grade). How do I do this?
> Thank you for your help!

Display problem using FixedHeader

How do I keep a Page Header visible on screen if, in the Body of the report, a Table exists where the rows need to be scrolled?

Hmmmm ok If you open table properties under the general tab you will see a check box entitled

"Header should remain visible while scrolling" check it and your header will remain whil scrolling

km

|||

There is not property called FixedHeader for page header, it's there only for table. So, remove the page header and have the same information in your table header row and then set FixedHeader to true in your table. And also set RepeatHeaderOnNewPage property to true so that it behaves just like a page header.

Shyam

display problem

Hi

I m using CR 11.0.

In my report, I want to display the page header details only on the pages where the group header is displayed.

I cannot put the page header details also on the group header details, because it has to be displayed on the top of the page where the group details are displayed. And also I cannot give page break option for hew group.

Please help !!!

Thanking in advancePut the group header on every page :)
or suppress the page header section if it's not a new group.
e.g. not (onfirstrecord or previous(group field) <> group field)

Display Oracle User id and Database Name in Report header!

Hi am new to CR. I have two questions:
1- I am using oracle 10g and able to connect.
How can i display Oracle User id and Database Name in the report header.

2- I have big sql statement which is my report basis.
Can i write other small sql statements which that return a value and display in one of the columns the way you do in Oracle Reports.

Thanks
-Samsam1 Use parameters
2 Use stored procedure and design the report based on that

Friday, February 17, 2012

Display None if field is empty

I am grouping my report on a field called Crew. This field is sometimes empty and so the group header doesn't show anything. I want that if this field is empty the report should display 'none' instead of just leaving it blank. How can I do that?
ThanksUse a formula to display the group header. Ie, if Crew is Group #1 :

If IsNull(Group#1Name) then
"None"
else
Group#1Name

Group Header names are available through formula editor the same as all other report/database fields.|||Thanks for replying kristyw. I am new to Crystal. Where should I put this formula?|||Create a new formula and drag it onto your form.|||It gives me an error saying "The ) is missing" and highlisghts Group on the first line.

If IsNull(Group#6Name) then
"None"
else
Group#6Name|||Here's my working formula :

If IsNull(GroupName ({VRP_CUST_DETAILS.ACCOUNTNUMBER})) then
"None"
else
GroupName ({VRP_CUST_DETAILS.ACCOUNTNUMBER})

Learn how to use CR Formula Editor - it's very handy when it comes to creating these types of formulas as you can drag the field names into it and easily find all the available functions.|||Thanks, that works just fine.

Display Multiple Records In One Grouping Line

Is it possible to display three different record values in one grouping
header? For instance, I have End of Year values for three different records
for a grouping called Burbank. I am grouping by Burbank, but I want to show
the Year End value for Burbank in 2005, 2006, and a 2007 projection, but they
are three separate records in my query. If statements will only grab the
first year and subreports slow down the report a ton just for one value.
Thanks,
BJYou could always use a case statemnt for each year in your select statement.
"bjkaledas" <bjkaledas@.discussions.microsoft.com> wrote in message
news:D0704272-4328-44F9-8902-55CE36C704A8@.microsoft.com...
> Is it possible to display three different record values in one grouping
> header? For instance, I have End of Year values for three different
> records
> for a grouping called Burbank. I am grouping by Burbank, but I want to
> show
> the Year End value for Burbank in 2005, 2006, and a 2007 projection, but
> they
> are three separate records in my query. If statements will only grab the
> first year and subreports slow down the report a ton just for one value.
> Thanks,
> BJ|||How would I interact with the select statement in my report though? I have
the say 3 separate records in my SELECT statement of my dataset, but in the
report I want to display them all in one row. It is almost like a Matrix,
but I don't want to grow across. I want to preacknowledge that I have a
value from 2005, 2006, and 2007 that I want to display from three separate
records, but on one line of the report.
"Ben Watts" wrote:
> You could always use a case statemnt for each year in your select statement.
> "bjkaledas" <bjkaledas@.discussions.microsoft.com> wrote in message
> news:D0704272-4328-44F9-8902-55CE36C704A8@.microsoft.com...
> > Is it possible to display three different record values in one grouping
> > header? For instance, I have End of Year values for three different
> > records
> > for a grouping called Burbank. I am grouping by Burbank, but I want to
> > show
> > the Year End value for Burbank in 2005, 2006, and a 2007 projection, but
> > they
> > are three separate records in my query. If statements will only grab the
> > first year and subreports slow down the report a ton just for one value.
> >
> > Thanks,
> >
> > BJ
>
>|||You can put a sub report in a cell on a line. I have done this on the main
detail line and I have done this in an additional detail line below. That
might work for your needs. Takes a little playing around with the subreport
to make it look correct when embedded in the main report.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"bjkaledas" <bjkaledas@.discussions.microsoft.com> wrote in message
news:AA264F47-3040-40C6-9C87-9805596376B0@.microsoft.com...
> How would I interact with the select statement in my report though? I
> have
> the say 3 separate records in my SELECT statement of my dataset, but in
> the
> report I want to display them all in one row. It is almost like a Matrix,
> but I don't want to grow across. I want to preacknowledge that I have a
> value from 2005, 2006, and 2007 that I want to display from three separate
> records, but on one line of the report.
> "Ben Watts" wrote:
>> You could always use a case statemnt for each year in your select
>> statement.
>> "bjkaledas" <bjkaledas@.discussions.microsoft.com> wrote in message
>> news:D0704272-4328-44F9-8902-55CE36C704A8@.microsoft.com...
>> > Is it possible to display three different record values in one grouping
>> > header? For instance, I have End of Year values for three different
>> > records
>> > for a grouping called Burbank. I am grouping by Burbank, but I want to
>> > show
>> > the Year End value for Burbank in 2005, 2006, and a 2007 projection,
>> > but
>> > they
>> > are three separate records in my query. If statements will only grab
>> > the
>> > first year and subreports slow down the report a ton just for one
>> > value.
>> >
>> > Thanks,
>> >
>> > BJ
>>

Tuesday, February 14, 2012

Display group header with no items

I have to display group header inspite of not having records in that group.
Group1
values
group2
No valuesI did this, using a stored procedure, by inserting a row into the dataset
for each column heading you require with the name of the column heading as
the value for the "column heading" field in the dataset:
INSERT INTO tablename([column heading], [row heading], [detail])
VALUES("column heading", NULL, NULL)
If you want it to sort in a specific way, i.e. not alphabetical, add another
field (called "sort" perhaps) and then set the value of the sort field in
each row to the numbered location in the column groups you want it to appear
in. You then sort by the "sort" field. Its a bit messy, but it gets the
job done.
I am guessing somehow has a better idea, but if not then try this cos it
works.
Jarryd
"NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
news:F0FFA70C-AA27-44AE-9B83-BE0A62B6343E@.microsoft.com...
>I have to display group header inspite of not having records in that group.
> Group1
> values
> group2
> No values
>|||Is this an good idea if i have 4 different table results unioned by union.
Then the record in the first table might not match the same group record in
second table then. I am missing inspite of it.
"Jarryd" wrote:
> I did this, using a stored procedure, by inserting a row into the dataset
> for each column heading you require with the name of the column heading as
> the value for the "column heading" field in the dataset:
> INSERT INTO tablename([column heading], [row heading], [detail])
> VALUES("column heading", NULL, NULL)
> If you want it to sort in a specific way, i.e. not alphabetical, add another
> field (called "sort" perhaps) and then set the value of the sort field in
> each row to the numbered location in the column groups you want it to appear
> in. You then sort by the "sort" field. Its a bit messy, but it gets the
> job done.
> I am guessing somehow has a better idea, but if not then try this cos it
> works.
> Jarryd
> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
> news:F0FFA70C-AA27-44AE-9B83-BE0A62B6343E@.microsoft.com...
> >I have to display group header inspite of not having records in that group.
> >
> > Group1
> >
> > values
> >
> > group2
> >
> > No values
> >
>
>|||Why not dump the final result set to a virtaul table, and then insert the
columns as I explained into the virtual table. Then select all from the
virtual table and base the report on that dataset.
HTH.
Jarryd
"NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
news:48C1A492-50DA-41DA-AA1A-C3D046988600@.microsoft.com...
> Is this an good idea if i have 4 different table results unioned by union.
> Then the record in the first table might not match the same group record
> in
> second table then. I am missing inspite of it.
>
> "Jarryd" wrote:
>> I did this, using a stored procedure, by inserting a row into the dataset
>> for each column heading you require with the name of the column heading
>> as
>> the value for the "column heading" field in the dataset:
>> INSERT INTO tablename([column heading], [row heading], [detail])
>> VALUES("column heading", NULL, NULL)
>> If you want it to sort in a specific way, i.e. not alphabetical, add
>> another
>> field (called "sort" perhaps) and then set the value of the sort field in
>> each row to the numbered location in the column groups you want it to
>> appear
>> in. You then sort by the "sort" field. Its a bit messy, but it gets the
>> job done.
>> I am guessing somehow has a better idea, but if not then try this cos it
>> works.
>> Jarryd
>> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
>> news:F0FFA70C-AA27-44AE-9B83-BE0A62B6343E@.microsoft.com...
>> >I have to display group header inspite of not having records in that
>> >group.
>> >
>> > Group1
>> >
>> > values
>> >
>> > group2
>> >
>> > No values
>> >
>>|||It not giving results as expected.
"Jarryd" wrote:
> Why not dump the final result set to a virtaul table, and then insert the
> columns as I explained into the virtual table. Then select all from the
> virtual table and base the report on that dataset.
> HTH.
> Jarryd
> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
> news:48C1A492-50DA-41DA-AA1A-C3D046988600@.microsoft.com...
> > Is this an good idea if i have 4 different table results unioned by union.
> > Then the record in the first table might not match the same group record
> > in
> > second table then. I am missing inspite of it.
> >
> >
> >
> > "Jarryd" wrote:
> >
> >> I did this, using a stored procedure, by inserting a row into the dataset
> >> for each column heading you require with the name of the column heading
> >> as
> >> the value for the "column heading" field in the dataset:
> >>
> >> INSERT INTO tablename([column heading], [row heading], [detail])
> >> VALUES("column heading", NULL, NULL)
> >>
> >> If you want it to sort in a specific way, i.e. not alphabetical, add
> >> another
> >> field (called "sort" perhaps) and then set the value of the sort field in
> >> each row to the numbered location in the column groups you want it to
> >> appear
> >> in. You then sort by the "sort" field. Its a bit messy, but it gets the
> >> job done.
> >>
> >> I am guessing somehow has a better idea, but if not then try this cos it
> >> works.
> >>
> >> Jarryd
> >>
> >> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
> >> news:F0FFA70C-AA27-44AE-9B83-BE0A62B6343E@.microsoft.com...
> >> >I have to display group header inspite of not having records in that
> >> >group.
> >> >
> >> > Group1
> >> >
> >> > values
> >> >
> >> > group2
> >> >
> >> > No values
> >> >
> >>
> >>
> >>
>
>|||What does the virtual table look like? I am thinking something simple,
like:
Virt table fields = [Column_heading], [Row_heading], [Detail]
With data:
Column_heading | Row_Heading | Detail
----
CH1 | RH1 | $100
CH2 | RH1 | $125
CH3 | RH1 | $142
CH1 | RH2 | $95
CH2 | RH2 | $117
CH3 | RH2 | $102
CH1 | RH4 | $95
CH2 | RH4 | $117
CH3 | RH4 | $102
It doesn't really matter if it is more complicated than that cos the
principal should be the same. If you want to add a column heading that
inspite of there not being an entry for one in the final dataset simply add
one with NULL detail and NULL Row_Heading, or if you want to add a
Row_Heading do the same sort of thing:
INSERT INTO #Virt_Table*([Column_Heading], [Row_Heading], [Detail])
VALUES('CH4', NULL, NULL)
INSERT INTO #Virt_Table*([Column_Heading], [Row_Heading], [Detail])
VALUES(NULL, 'RH3', NULL)
You should then end up with a matrix (if that is what you are making) that
looks like this:
CH1 | CH2 | CH3 | CH4
RH1| $100 | $125 | $142 | NULL
RH2| $95 | $117 | $102 | NULL
RH3| NULL | NULL | NULL | NULL
RH4| $95 | $117 | $102 | NULL
Extend that method to however complicated your dataset or groups of columns
are. I have said column heading here, but you can interchange that with
Group_heading to make it clearer.
HTH,
Jarryd
"NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
news:41625D86-F099-44F6-A2BB-55F341CCD2F6@.microsoft.com...
> It not giving results as expected.
> "Jarryd" wrote:
>> Why not dump the final result set to a virtaul table, and then insert the
>> columns as I explained into the virtual table. Then select all from the
>> virtual table and base the report on that dataset.
>> HTH.
>> Jarryd
>> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
>> news:48C1A492-50DA-41DA-AA1A-C3D046988600@.microsoft.com...
>> > Is this an good idea if i have 4 different table results unioned by
>> > union.
>> > Then the record in the first table might not match the same group
>> > record
>> > in
>> > second table then. I am missing inspite of it.
>> >
>> >
>> >
>> > "Jarryd" wrote:
>> >
>> >> I did this, using a stored procedure, by inserting a row into the
>> >> dataset
>> >> for each column heading you require with the name of the column
>> >> heading
>> >> as
>> >> the value for the "column heading" field in the dataset:
>> >>
>> >> INSERT INTO tablename([column heading], [row heading], [detail])
>> >> VALUES("column heading", NULL, NULL)
>> >>
>> >> If you want it to sort in a specific way, i.e. not alphabetical, add
>> >> another
>> >> field (called "sort" perhaps) and then set the value of the sort field
>> >> in
>> >> each row to the numbered location in the column groups you want it to
>> >> appear
>> >> in. You then sort by the "sort" field. Its a bit messy, but it gets
>> >> the
>> >> job done.
>> >>
>> >> I am guessing somehow has a better idea, but if not then try this cos
>> >> it
>> >> works.
>> >>
>> >> Jarryd
>> >>
>> >> "NAVIN.D" <NAVIND@.discussions.microsoft.com> wrote in message
>> >> news:F0FFA70C-AA27-44AE-9B83-BE0A62B6343E@.microsoft.com...
>> >> >I have to display group header inspite of not having records in that
>> >> >group.
>> >> >
>> >> > Group1
>> >> >
>> >> > values
>> >> >
>> >> > group2
>> >> >
>> >> > No values
>> >> >
>> >>
>> >>
>> >>
>>