Parcel Summary Report with AlivePDF

1028
7
12-09-2011 05:24 AM
PaulMcBride
New Contributor III
Hello all,

I have a parcel search widget that brings up a results display and for each returned feature I have a set of buttons that will display attributes, go to tax link and zoom to the feature. 

I have added another button for a summary report that I would like to have pull up a pdf within the application that shows the map display, selected attributes, logo and north arrow.  Another feature would be to include a button to print the pdf for the user to click on. 

Could anyone direct me in the correct direction on how to get this pdf started?

I believe Robert Scheitlin has this on his parcel search results, but I'm just not sure how he gets it to display directly within the application.

Thank you for the help.
Tags (2)
0 Kudos
7 Replies
AaronNash
New Contributor
I did it, not in a widget but a stand alone query to a data grid. Attached is the code I used to create the report. It is just a text report, but it shows how the alive pdf code works. if you get it to work can you post your code. Would love to create something similar, just not enough time in the day to work on it yet. Here is a link to the reporting application so you can see the output of the report http://www.vernon-ct.gov/propertycard
0 Kudos
PaulMcBride
New Contributor III
I will begin to work on this and post when I get my code completed.  Thanks for the reply.
0 Kudos
PaulMcBride
New Contributor III
Aaron,

The only error I'm gettin in this line.

var grid:Grid = new Grid (DGresultsGridselected.dataProvider.toArray(), 0, 0, new RGBColor (0xC0C0C0), new RGBColor (0xCCCCCC), true , new RGBColor(0x000000), 1, Joint.ROUND);

DGresultsGridselected is not a defined property and I'm wondering how I can get this defined inside my code.

Thanks!
0 Kudos
AaronNash
New Contributor
That is where you are pulling your data from, when you run your selection what type of container are you sending your data too? I sent mine to a data grid, and the name of the datagrid is dgresultsgrid selected
0 Kudos
TonyAlmeida
Occasional Contributor II
TOVernon i must say that' very impressive.

A few questions for you, if you don't mind.

1st, where is this pulling the date to fill in the columns with, CAMA system?
2nd where and how is the photos for the properties being loaded
3rd if you could add some notes to see what is doing what please.
4th would if be possible to share your whole project?

Thanks!
0 Kudos
AaronNash
New Contributor
The system I used is SQL tables from the assessor's CAMA joined to the Parcel Data in the MXD, I then published it as an ArcServer web service. There are 5 tables in the CAMA system I am pulling data from and that is why the query is so slow, when the user selects a street and searches it is querying the SQL CAMA tables live. I am going to eventually going to work out a different solution but that was a quick way to accomplish what I needed to do.
The pictures took a little bit to figure out. I copied all the photos to our GIS webserver and put them in a virtual directory. In the assessors SQL table there was an image path column, but it was the UNC path. So then the user selects the row in the datagrid it runs a function that changes the \ to /, contructs the URL, removes any spaces in the string, and then loads the photo to an <mx:Image id="building" visible="false"/>. The users does not see the picture loading because the visibility is false, but when they click the get card button this line of code adds it to the PDF report myPDF.addImage(building,null,110,15,150,150,0,1,true,ImageFormat.JPG,100);
The section of code I sent was commented at every level, anything with // in front of it was explaining what each step was for, but the whole report was custom for my application. I can send you my project but everything in the project is specific to the our system in Vernon, and may not work in your application, the project file is a little large and I would need your email. You said in the beginning that you were selecting a parcel and then were looking for a way to export that to PDF report. My suggestion would be to put the selected feature into a datagrid and then pull the data for the PDF report from the datagrid. Last time I looked at Robert's site he was not using AlivePDF to generate his report but doing it within Flex. He had posted the code for the report a while back, it might be in the old forum. I believe what he was doing was using a field from the selected feature to query a custom web service and then return the results into a Flex report. His method is much different than what I am doing, I do not have any experience writing custom webservices. Maybe he will chime in with a better solution
0 Kudos
TonyAlmeida
Occasional Contributor II
TOVernon yes i would really appreciate it.

my email is
sttuntman@hotmail.com
0 Kudos