Tag Archives: schedules

Crystal Reports for Revit Schedules

1 Oct

I have been playing with Crystal Reports and think they are an excellent option for Revit schedules.  With Cystal Reports you can design and write a single report to work on EVERY Revit project. The report handles all the data collection and adjusts itself to fit the data.

I have a fake room schedule in Excel (I exported the schedule and imported to Excel). Opening Crystal Reports, I select a new connection and choose Access. Under Access is the option for Excel 8.

When I select the Excel file, I can choose the sheets. Choose sheet 1.

Now I have a designer screen in Crystal Reports.

In the design view, I added my face to the Report Header and you can see some fields like [Report Title], [Author] and [Page Number]. these are Special Fields that will pull from the report properties. The text in the page header is hard coded and will appear on every page, as will the footer. The magic happens in the Details Section. I will drag fields from my Excel sheet to this section and it will populate the data for me.

You can see on the left, I have all the fields that are in the Excel sheet. I can drag them to the Details and the Header will automatically get the title. There is only one line in this report, but it will duplicate the data values for each record in the schedule.

Crystal reports is very powerful. You can group and sort, filter, and add subtotals, running totals, and grand totals. You can also add formulas that operate on fields.

Here is the finished report.

Here is the PDF: REPORT.PDF  

You can export to many different formats. By saving out any schedules from different projects to the same Excel file, you can run the report on new data just by opening it. (Overwrite WallSchedule.XLS with every new Revit wall schedule. ) The data connection remains and the fields all have the same names.
This post was a bit rushed, but I hope the point is clear: Crystal Reports can create Revit reports that are far more attractive and powerful than Revit can — at the moment. My report is not beautiful, but Google some samples and you will see their power.

This report shows a little more: Better Report.PDF

 

URL Tricks in a Revit Schedule

22 May

In a Revit schedule you can add a parameter of type URL. I think everyone is fairly familiar with this but I think, as with QR Codes, people are just linking to a website. But what else would you link to? How about a local file on your hard or network drive. Or, why not pass data with the URL to a page in PHP that processes the URL – it’s much easier than you may think.

OPEN A LOCAL FILE

Revit URL

Opened from a Revit Schedule

With your Revit model, you could include a folder of documents that you could then link to withing Revit. They do not need to be on the internet.Web browsers are really just file browsers. Changing HTTP to FILE makes it a local file browser. I created a room in Revit and added a parameter of type URL. The URL added is:

file:///c:/Users/Paul/Desktop/efpGIS/Config/Splash.png

This URL links to a picture on my desktop. If I click the link in Revit, I get the image on the right. The computer knows to launch the appropriate program to open the file. A link to a AVI file opens my Divx Player.

PASS DATA TO A WEBSITE FROM A URL

In a my post on GIS and QR Codes, I explain how to use a QR Code to pass and retrieve data. The same can be done from a link in a Revit schedule. The trick uses PHP $_GET. Ever seen a url like this: http://amazon.com/books.php?book=revit-for-beginners. Well that is what a URL passing data looks like.  after the ? you enter a variable name then the = then a value. To add multiple variables include an &, like this: http://paul.com/names.php?name=paul&last=crickard. You will need a PHP script to process the data. Here is a working example that would pass the latitude and longitude of the room from a Revit field to a website. The URL to enter in the field is:

http://educationalfacilityplanning.com/latlong.php?lat=35.0967210997174&long=-106.635601453865

Click this link to see a map showing the room location. Enter this in to a Revit schedule field of type URL and click it in Revit.

You can also retrieve external database data from a Revit URL. Using the same method, you would make a SQL query like the following:

SELECT * FROM rooms WHERE number = $_GET[roomchosen].

The URL would be something like: http://paul.com/rooms.php?roomchosen=4. I have a post that describes this more and has source code HERE.

Do more with your Revit URL fields. Use HTML and PHP to build applications on top of your Revit file. If you think of any cool applications tell me about it in the comments section.