Showing posts with label single. Show all posts
Showing posts with label single. Show all posts

Wednesday, March 28, 2012

How to show SUBREPORT when no data is returned.

I have a subreport within the details section of my main report. This is enclosed by a single group. When I preview the subreport alone, it diplays the subreport correctly with no data (meaning it still displays the header and footer without a detail section). When the subreport is run within the main report and no subreport data is returned the subreport does not show.

Based on other threads I understand that the default functionality is to display headers and footers when no data is returned. This appears accurate except on a subreport.

Would the "no rows"-property help you? there you can define a message that is shown when the subreport has no rows..|||

I fixed this by returning a row of nulls in my return dataset when no records where found. Works.

How to show SUBREPORT when no data is returned.

I have a subreport within the details section of my main report. This is enclosed by a single group. When I preview the subreport alone, it diplays the subreport correctly with no data (meaning it still displays the header and footer without a detail section). When the subreport is run within the main report and no subreport data is returned the subreport does not show.

Based on other threads I understand that the default functionality is to display headers and footers when no data is returned. This appears accurate except on a subreport.

Would the "no rows"-property help you? there you can define a message that is shown when the subreport has no rows..|||

I fixed this by returning a row of nulls in my return dataset when no records where found. Works.

Monday, March 19, 2012

How to set two or more queries in one report

I'm having a problem with accessing two or more data sources and display in a single report(same paper). I'm using CR XI Dev. Ed. and VB 6.0 sp6

For example:

I have a table named 'Patients' and the fields are,

Name, Date_Admitted, Date_Discharged

The first sql query is

Select * from Patients Where Date_Admitted = 'Date'

then the second query is

Select * from Patients Where Name = 'James'

How will I display this two diffrent sql queries in a single report(same paper)?

Please! anyone! help me!!!See reply in other forum.|||Thanks for the reply! But I have another question if it's ok with you?

I managed to add a sub report on my main report, but how do I make it appear this way?

Example:

The given first sql query is

"Select * from Patients Where Date_Admitted = 'Date'"

Then display all the data in the first statement first

[Name][Date Admitted][Date_Discharged]

[Jay][8/15/2006][8/16/2006]
[John][8/15/2006][8/16/2006]
[Bob][8/15/2006][8/16/2006]

Then execute the second query

"Select * from Patients Where Name = 'James'"

Then display all the data in the second statement

[Name][Date Admitted] [Date_Discharged]

[James][8/9/2006][8/10/2006]
[James][8/6/2006][8/7/2006]
[James][8/10/2006][8/12/2006]

Then the final output would be like this

[Name][Date Admitted][Date_Discharged]

[Jay][8/15/2006][8/16/2006]
[John][8/15/2006][8/16/2006]
[Bob][8/15/2006][8/16/2006]

[Name][Date Admitted] [Date_Discharged]

[James][8/9/2006][8/10/2006]
[James][8/6/2006][8/7/2006]
[James][8/10/2006][8/12/2006]

How to set the width on the multi-select drop down (not the simple select)?

Hi,

How can I set the width on the multi-select parameter box? I checked the post about setting the SELECT, but that affects the single parameter box, not the multi-select.

I know there is an HtmlViewer.css file and have changed the rsReportServer.config file to use it, but I don't know what the tag is to set the width on the drop down parameter list box in the htmlViewer.css file. Or is it in another file?

Any ideas?

Thanks.

pl

The width of the MVP parameter box is not configurable sorry to say.

|||

Thank you for your response.

Is there any chance that the ability to set the width for the multi-select parameter box might be included in RS 2005 SP1?

Also, I read somewhere that the solution Report Manager is a project that is available as a download for Visual Studio 2005. If I were to download the project, could I set this feature up myself?

Thanks.

|||Has this bug been addressed in SP1. Users are gobsmacked when they hear that the size of the multi box cannot be set to the width of the widest entry.|||

This behavior will not changed in SP1. From our customers we have seen this as a good recommendation for the next release and it is on the list (with many other suggestions) as a possible feature improvement.

Wednesday, March 7, 2012

how to set multiple local variable from single select statement

is it possible to set the value of multiple local variables using just 1
statement. For example assume a simple table 'E' with 3 columns 'empID',
'empName', 'empToken'. I can get their values with
declare @.ENAME as char(30), @.ETOKEN as int
SET @.ENAME = (SELECT empName FROM E WHERE empID = 1)
SET @.ETOKEN = (SELECT empToken FROM E WHERE empID = 1)
What I want to do is compine the two assignments into 1 single statement so
that the db never has to be looked up more than once. e.g.
SET @.ENAME, @.ETOKEN = (SELECT empName, empToken FROM E WHERE empID = 1)
is this possible and if it is, what is the synthax?try this.. hope this helps.
SELECT @.ENAME = empName,
@.ETOKEN = empToken
FROM E WHERE empID = 1
--|||HI,
sure:
SELECT @.ENAME = empName , @.ETOKEN = emptoken FROM E WHERE empID = 1
HTH, jens Suessmeyer.
http://www.sqlserver2005.de
--