Zum Hauptinhalt gehen

Report hyperlinks not grabbing right field values

Kommentare

3 Kommentare

  • Permanently deleted user

    Hi John,

    I think the issue is that you are using the page footer format event, but accessing the field data directly.

    The field data will change as the detail section formats - and we don't really have any control over when that happens versus when the footer is formatted.

    Rather than pulling the values you want out of the rpt.Fields collection, consider generating a lookup of pages to values, then when you format the page footer, use the page number to retrieve the value from your lookup table.

    Regards,

    -Malcolm

    0
  • John Nerge

    Malcolm,

    How do I generate a lookup of pages to values?

    0
  • John Nerge

    I moved the hyperlinks into the details section and now they grab the right values (kudos to Alejandro Mari at Latitude Support for his help). I'd still be interested in help on creating a lookup of pages to values, though.

     

    Updated Script

    public void PageDetail_Format()

     

    {

     

        Label hyperlink1 = rpt.Sections["PageDetail1"].Controls["Label11"] as Label;

     

        string pid = rpt.Fields["PID_NO"].Value as string;

     

        hyperlink1.HyperLink = "http://www16.co.hennepin.mn.us/pins/pidresult.jsp?pid=" + pid;

     

        hyperlink1.Text = "Go to Hennepin County Property Page";

     

        Label hyperlink2 = rpt.Sections["PageDetail"].Controls["Label14"] as Label;

     

        hyperlink2.HyperLink = "https://www.oursite.org/SilverlightViewer_1_9/Viewer.html?ViewerConfig=https://www.oursite.org/Geocortex/Essentials/REST/sites/CityView_test/viewers/CityView_test/virtualdirectory/Config/Viewer.xml&attributeSearch=SDE.GIS.Parcels,PID_NO," + pid;

     

        hyperlink2.Text = "Go to Property in CityView";    

     

    }
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.