[Chameleon] Dynamic Reports Generation

Jessica Fendos Jessica.Fendos at state.mn.us
Fri May 18 00:43:05 EDT 2007


Greetings list,

I am trying to build a dynamic report through an ROI Rectangle
interface using SQLQuery widget and Table widget. 
http://map.deed.state.mn.us/chameleon/DEED_dev.phtml . The
goegraphic unit for my report is by county (under report tab, click
on unemployment and county, and then generate report).  My questions
are as follows:

1. I have in my mapfile COUNTY_SELECT AND COUNTY_SELECT_ANNO
layers defined. Both layers are from a county_mn file reside in a
PostgreSQL database.  However, when I drew the retangle I did not
see the supposedly highlighted county boundaries. I tried to specify
the following in the MapDHTML file without success. Can I have two
MapDHTML widgets for different mapping projects in the same
Chameleon 2.2.1 folder?  Another problem might be other projects
have different geographic units customized in the MapDHTML widget. 

if ($this->getVar( 'SelectValue' ) == "UMEMP")
        {
        if (is_null($rMinX))
              {
              $oLayer = $poMap->getlayerbyname('COUNTY_SELECT');
              $oLayer->set("status", MS_OFF);
   
              $oLayer =
$poMap->getlayerbyname('COUNTY_SELECT_ANNO');
              $oLayer->set("status", MS_OFF);
              }
        else
        {
              if ($this->getVar( 'SelectType') == "COUNTY")
                     {
                      $oLayer =
$poMap->getlayerbyname('COUNTY_SELECT');
                      $oLayer->set("status", MS_ON);
                      $oLayer->set("data",
                      "the_geom FROM ( SELECT the_geom, gid FROM
counties_mn
                      WHERE the_geom && SetSRID('BOX3D($rMinX
$rMinY,$rMaxX $rMaxY)'::box3d,-1)
                      AND intersects(the_geom, SetSRID('BOX3D($rMinX
$rMinY,$rMaxX $rMaxY)'::box3d,-1)))
                      as foo USING SRID=-1 USING UNIQUE gid");
                      
                      $oLayer =
$poMap->getlayerbyname('COUNTY_SELECT_ANNO');
                      $oLayer->set("status", MS_ON);
                      $oLayer->set("data",
                      "the_geom FROM ( SELECT the_geom, countyname,
gid FROM counties_mn
                      WHERE the_geom && SetSRID('BOX3D($rMinX
$rMinY,$rMaxX $rMaxY)'::box3d,-1)
                      AND intersects(the_geom, SetSRID('BOX3D($rMinX
$rMinY,$rMaxX $rMaxY)'::box3d,-1)))
                      as foo USING SRID=-1 USING UNIQUE gid");
                     }      
        }

2. The table and tablepopup widgets have the maximum record count
defined as 10. I also tried to modify the record counts to 20 in
table_new and tablepopup_new widgets but it failed to render the
report. Could someone please give me some guidance?  In advance,
thank you for your time. 

Regards,
Jessica 

Jessica M. L. Fendos
Research Analysis Specialist Sr./GIS Application Developer
Labor Market Information (LMI) Office
MN Department of Employment and Economic Development
Tel: 651-296-3739
jessica.fendos at state.mn.us
Homepage: jessicafendos.com



More information about the Chameleon mailing list