Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to display fixed number rows to a table in rdlc

Posted on 2011-04-20
4
Medium Priority
?
1,559 Views
Last Modified: 2012-08-13
i have a subreport which needs to print exactly 10 rows.  even if the datasource fetches 2 records , i want a print 10records.. can you tell me how to do that.?

0
Comment
Question by:eoswin
  • 2
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
jimbobmcgee earned 2000 total points
ID: 35436184
Is your report data source a SQL Server 2005/8 query?  If so, it might be easier to alter the query to always bring back 10 rows.  For example:
SELECT * FROM my_report_table ORDER BY col_01 ASC

Open in new window

might become:
WITH cte_nums AS (
    SELECT n = ROW_NUMBER() OVER (ORDER BY a.object_id, b.object_id)
    FROM sys.columns a, sys.columns b
),
cte_report AS (
    SELECT *, n = ROW_NUMBER() OVER (ORDER BY col_01 ASC)
    FROM my_report_table
)
SELECT n.n, r.*
FROM cte_nums n
    LEFT JOIN cte_report r ON n.n = r.n
WHERE n.n BETWEEN 1 AND 10

Open in new window

0
 

Author Comment

by:eoswin
ID: 35436243
thanks,...my database is oracle
0
 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 35436974
If it is Oracle 10g upwards, it should be very similar, as WITH and ROW_NUMBER() are ANSI standard.
Try changing sys.columns to all_tab_columns; otherwise it should be the same
0
 

Author Comment

by:eoswin
ID: 35441526
sure try that...

Is there any way i can print a rdlc table on a top of a fixed rectange with lines accross looks like a table?
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question