[Chameleon] Dynamic Reports Generation

Julien-Samuel Lacroix jlacroix at mapgears.com
Fri May 18 11:33:19 EDT 2007


Hi,

1. There's a TYPO in your code below. you wrote
if(... == "UMEMP")
I guess you wanted to have:
if(... == "UNEMP")

Because of that, the code below probably never got executed.

To have 2 MapDHTML widgets for different project, you would need to copy 
the new widget in a custom widget directory. In 
myproject/htdocs/widgets/ for example and then change the CWCExecute 
call in your .phtml file to load the new widget directory:
$oApp->CWCExecute(array('widgets/'));

2. To change the maximum record of the Table widget simply specify 
Count="20" in your <CWC2 ...> tag. Keep in mind that this is number of 
record per pages. If you want to display all the records on one page use 
Count="-1"

Best regards,
Julien




Jessica Fendos wrote:
> 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
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/


More information about the Chameleon mailing list