Click here to Skip to main content
Licence 
First Posted 2 Sep 2004
Views 60,091
Downloads 124
Bookmarked 21 times

On Importing an Access Parametric Report into SQL 2000 Reporting Services

By mysorian | 2 Sep 2004
Describes importing of an Access 2000 parametric report into SQL 2000 Reporting Services.
 
Part of The SQL Zone sponsored by
See Also

1
1 vote, 33.3%
2
1 vote, 33.3%
3

4
1 vote, 33.3%
5
3.33/5 - 3 votes
μ 3.33, σa 2.67 [?]

Introduction

SQL Server 2000 Reporting Services allow importing Reports created in Microsoft Access. This article discusses importing of a parametric report created in MS Access 2000 into a Reporting Services *.rdl format, using Visual Studio 2003.

Details of the Access Report

A RepSVC.mdb file was created into which only the 'Orders' table from the Northwind database was imported. The fields were cleared of any look-ups or Joins to other fields in the Northwind database. The design view of this table is shown here:

Query Designer in Access was used to create a 'parametric query' to test how easily a report goes over into the SQL Server 2000 Reporting Services. The 'SQL' statement for this query is shown here. The query requires an input parameter, the name of the country, to produce the query results.

SELECT Orders.CustomerID, Orders.OrderDate, Orders.RequiredDate, 
Orders.ShipName, Orders.ShipCity, Orders.ShipCountry
FROM Orders
WHERE (((Orders.ShipCountry)=[Country?]));

The Report wizard was used to produce a report in MS Access for 'Denmark', and this is shown in the next screenshot:

Details of Importing into Visual Studio 2003

Create a report project, AccessProject in Visual Studio 2003, following the example in ASP.NET and SQL 2000 Reporting Services. This comes with a Report folder which is empty. From the Project menu item drop down, click on Import as shown:

This will automatically point to 'MS Access', and opens up a browsing of the 'My Documents' [default for MDB file]. Point to the RepSvc.mdb created earlier, which already has a report called 'Which Country'. This immediately creates a 'WhichCountry.rdl' in the Reports folder as shown:

In creating the reprot file 'WhichCountry.rdl', the Reporting Service has extracted a 'DataSet' with all the fields specified in the original query, as shown:

The next screenshot shows the 'Layout' of the report which resembles the Access Report, as shown:

If you right click at the spot shown in the above screen shot, you can see all the details of the Report Design. You can go item-by-item and make changes if you like. The next screen shot shows the 'Report parameters' window, wherein you can enter your parameters:

While entries can be made to this 'Report Parameters' window, the ellipsis by the side of the DataSet1 drop-down can be used to input the parameter as shown.

The parameter shipcountry='Denmark' will be used, and therefore the input in the 'Parameter' tab of this window is as shown here:

After inserting the parameter, the report can be run after building it, by right clicking the report WhichCountry.rdl file, and clicking Run. A part of the report generated is as shown here:

Interactive Report

In the previous section, the parameter value pair 'ShipCountry=Denmark' was hard coded into the Dataset properties. However, there is yet another way of inserting the parameter value in an easier manner. As in the previous case, the Dataset properties is set with the placeholder variable as shown in this screen shot:

In the preview tab of the report shown here, the check on the 'Null" is cleared which opens up the text field for entering the value of the parameter. If the check is left in place, the report will return zero records. The slide after next shows, some records for 'Country? = France'.

Printing the Report

The 'Print' button in this report's Preview is 'grayed' out. It is not clear whether this is so in full version [this happens to be a trial version]. However, by clicking the 'file save' icon in the above figure as shown, you are presented with a couple of alternatives in saving this file. From here, it is easy to print in Adobe format or TIFF format depending on the resources available.

Conclusions

Although what is presented is the import of a simple parametric report, it appears that the SQL 2000 Reporting Services does an extremely good job of importing the file. Whether this is backward compatible with the previous versions of Access remains to be seen. The conversion appears instantaneous, this is perhaps the example's data set is very small. It was also observed that when the import is invoked, all the reports in the database are automatically converted at the same time into *.rdl files with the same report name [x.rpt goes over to x.rdl].

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

mysorian

Web Developer
Hodentek
United States United States

Member

Follow on Twitter Follow on Twitter
Worked in the area of electrical discharges, high energy lasers, high voltage technology, plasma technology, lithography, thin film plastics, superconducting thin films, diamond thin films, electron accelerators, and free electron lasers for several years. Mentored/guided MS and PhD students at several universities in USA, Brazil, Australia, and India.
Reading books and photography are my hobbies.
 
Also trained workforce clients with legacy computer skills in web related technologies.
 
I recently authored a beginner level book on MS SQL Server Integration Services. Details available at the following link:
 
http://www.packtpub.com/sql-server-integration-services-visual-studio-2005/book
 
My second book was released in 2008
Learn SQL Server Reporting Services 2008
 
Get book details at the following site:
http://www.packtpub.com/learning-sql-server-2008-reporting-services/book
 
This is for anyone who is interested in Reporting Services a la Microsoft. It has over 50 hands-on exercises and covers all aspects of Reporting Services.
 
Recent new books:
 
Microsoft SQL Azure Enterprise Application Development 2010
-A Comprehensive book on SQL Azure
 
Microsoft Visual Studio LightSwitch Business Application Development 2011
A step-by-step approach that is sure to work

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralCode behind report inclusion PinmemberBOBLAiBAM!5:38 8 Aug '07  
Questionsql server Pinmembernagesh8619:19 29 Apr '07  
AnswerRe: sql server Pinmembermysorian3:17 30 Apr '07  
GeneralImport Access Reports Pinmemberarshadsa5:41 14 Dec '05  
GeneralRe: Import Access Reports Pinmembermysorian6:10 14 Dec '05  
GeneralRe: Import Access Reports Pinmemberarshadsa6:16 14 Dec '05  
GeneralRe: Import Access Reports Pinmembermysorian7:08 14 Dec '05  
GeneralRe: Import Access Reports Pinmemberarshadsa8:42 14 Dec '05  
GeneralRe: Import Access Reports Pinmembermysorian9:23 14 Dec '05  
GeneralCreate the RDL programmatically PinsussAnonymous7:51 29 Nov '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120209.1 | Last Updated 3 Sep 2004
Article Copyright 2004 by mysorian
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid