I'd appreciate any help.still having this issue...
I wish there was atleast one person from the reporting team looking into these forums..Could this be a bug in RS ?|||Well Reporting services Automatically check the data of report if the data does not exist it automatically hide the subreport or in your senario.
What you can do is . There is noRows Properties in the reports to use if data does not exist in any case. to show the message .
Or if you reeally want to show the header in the report . you would have to change the query or procedure to pass atleast one balck row incase data doesn not exist. You can do this by union query.
There are 2 ways now . Choice is your|||hey dude
thanks for hint
(1) I have to type in the concatenated list of column names in the noRows property. which is okay but when the report is exported to excel the entire string is exported as one column rather than different column names.
(2) I cant use the UNION because we have one stored proc that is being used for 10-15 reports. and each report uses a diff set of column names from the stored proc. so i cant return all the column names in the stored proc when only some of them are used in the report.
I am trying to see if I can access the rdl file from custom code to see if i can parse the xml file and get the column names..
thanks again..|||I found a couple of hacks for this. Thought it could be useful for someone else...
(1) I can put the columns in the Page header ( Since I cant put table in the header I can throw in some textboxes) with the same width as the column below in the body section. This is a feasible solution.
(2) Modify the stored proc to something like :
SELECT
col1, col2...
FROM
<table
UNIONALLSELECT
NULL,
NULL
This will return a blank row at the end of the report and RS treats this as a row. So when exported we do get a row with headers and a blank row.
(3) This is not very efficient but works...
Get the results of the stored proc into a temp table. do a UNION with nulls and the temp table IF there are no rows in the temp table and return the result set. This can affect the performance coz it uses temp tables..
No comments:
Post a Comment