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

sszretter

Members
  • Posts

    6
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by sszretter

  1. In iReports I have the mongodb connector installed and working, but I am having trouble getting an 'or' or 'and' query to work: This works to bring back ALL records: <queryString language="MongoDbQuery"> <![CDATA[{ 'collectionName':'Encounters' }]]> </queryString> But I have all kinds of variations to actually query a field for not equal to null / not blank (I want to find all records with a BSBegin not null and not blank: <queryString language="MongoDbQuery"> <![CDATA[{ 'collectionName':'Encounters' , 'findQuery':{ '$and': { 'bsBeginDT':{'$ne':null}, 'bsBeginDT':{'$ne':''} } } }]]> </queryString> I have tried several variations, with cury brackets around each query, square brackets around the $and criteria, etc. I either get iterator errors, report contains no pages or other errors.
  2. I am not sure I even know how to do this via command line yet, but basically I have this: Customer collection: customerID (MongoID) name Invoice collection customerID (String) total I want to create a report that shows all the invoices for a particular customer. In the invoice collection I have the MongoID stored for the customer (as a string). I often code in php against mongodb and I would do something like this to get a single invoice ($customerID is a string of the MongoID of the customer): $this->invoiceCollection->findOne( array('customerID' => $customerID ) ) I believe this will find all the invoices: $this->invoiceCollection->find( array('customerID' => $customerID ) ) If I did that in PHP, I would have all the invoices returned back in a mongo cursor and I could loop through them. I am just not sure how to do this in an iReport / JasperReport if I were reporting off customers and wanted to join it to invoices and display fields from the invoices table (total for example) for each customer?
  3. When using the MongoDB connector, how / is it possible to do a join type operation? For example, if my client record has an invoice number field, how can I join to invoices and display the invoice 'total' field on my client report?
  4. In JasperReports (iReport), how can I take a date field from the database and calculate the difference between that and the current date (for example to calculate age) and then GROUP the report on that value (age 18 group, age 19 group/break, etc.)? date field in iReport: $F{dob} [/code]example of how I calculate the age - at least to display it on the report, but I want to break on this value somehow: <![CDATA[theDate=new Date($F{dob}); currentDate=new Date(); Math.round((currentDate.getTime()-theDate.getTime())/1000/60/60/24/356)]]> [/code]Thanks!
  5. I am using the latest downloads of iReports (4.02) and JasperServer CP 4.0.0 - I followed the pdf instructions on installing the plugin for the MongoDB connector to iReports which worked fine and I dropped the files in to the WEBINF folder for JasperServer. I created a new data source fine of type MongoDB and it tested fine with the test button. However, when I follow the steps to create a report, I click new report, wizard, and when I get to the query step I am pasting in a sample from the pdf : { 'collectionName':'accounts' } If I change the collectionName to a valid name 'clients' in my case and click next, nothing happens and the next button is now grayed out. Nothing I do will make it clickable except starting over. SO I am unable to get past this point. What am I doing wrong, or what can I do instead to get a report created?
×
×
  • Create New...