Jump to content
We've recently updated our Privacy Statement, available here ×

dablick

Members
  • Posts

    4
  • Joined

  • Last visited

dablick's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. This is how I do it in my (Java) code: JasperReportsContext jrc = DefaultJasperReportsContext.getInstance(); jrc.setProperty( JRXPathExecuterUtils.PROPERTY_XPATH_EXECUTER_FACTORY, XalanNamedParameterXPathExecutor.class.getCanonicalName()); JasperFillManager jfm = JasperFillManager.getInstance(jrc);
  2. Teodor, I have the same need. I'm open to implementing (and contributing) a new query executer, but unless I'm missing something, this is a fairly pervasive change as I see no mechanism to pass in the needed context (the parameter map), nor for that matter, any sort of context. JRXPathExecuterFactory is instantiated by reflection (so it can be cached) and thus you can't pass parameters into the constructor. Seems to me that you want to inject something that gives access to parameters into the JRXpathExecuter (perhaps the JRDataset). I'm surprised this feature hasn't been added yet. Basically it seems to me to be the mechanism to allow a single JRXML to be used with multiple record schemas by providing the ability of "mapping" field declarations in the JRXML to fields in the dataset(s). To put that a different way, I could define a single template for contact data and populate it from a number of different datasources with different record layouts. I could define my JRXML fields generically: LAST_NAME, FIRST_NAME and then provide different mappings (via XPATH, SQL field name, etc.) as follows: For one record format I might map LAST_NAME to "student/name/last" For another record format I might map LAST_NAME to "contact/last_name". Can you provide any guidance as to a feasible way to accomplish this? Either via existing mechanisms?
  3. I want to have shared (template) JRXML files that work for a variety of XML datasources. The only thing I know of that might prevent this is that the field specifications would be slightly different. For one XML file the XPATH for a name field might be: person/name/last For another XML file the XPATH might be: contact/last_name Ideally I could pass the XPATH in as a parameter and have the following inside a fieldDescription tag $P{XPATH_FOR_NAME} But Jasper doesn't seem to support the use of parameters in tags. Is the some way for me to inject the field specification into my JRXML templates?
  4. Jaspersoft needs to update the XSD that you pubosh to the web http://jasperreports.sourceforge.net/xsd/jasperreport.xsd In fact, if you did that, it would solve my problem which is that when I load a .jrxml file with an editor that does validation, I get validation errors because of the uuids. I'd appreciate some sort of notification when this is done.
×
×
  • Create New...