Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Can forena do following:
I have external sql serv db and I want to send a param and show the results or show custom message if the parameter is not in the db. The parameter would be a cust id or something similar.
Comments
Comment #2
metzlerd CreditAttribution: metzlerd commentedYou shoul be able to do this with the following snippet of code in your .frx file:
The snippet should be placed outside of any elements containing frx:block attributes, so that it always displays.
Comment #3
metzlerd CreditAttribution: metzlerd commentedOr if you're really concerned with a customer id being in the database, invent a block called "customer_info" or something like it that has some relevant SQL such as:
Then embed that block in your reports, using named data contexts to display a message when the customer is not in the database.
Comment #4
johnger CreditAttribution: johnger commentedI thought I watched one of your screencast's on youtube where you did not leave the parameter field blank in the module report creation under drupal.
Basically, I am wanting to present a text box and have the customer input their id and then display the data if they are in db. I hope this makes sense?
Btw, thanks for taking time to answer and help.
Comment #5
metzlerd CreditAttribution: metzlerd commentedTake a look at:
http://forenasolutions.org/reports/help.reportingfrx#parameters
In that example you create a required parameter, which may or may not have defaults (WA in this case). But the establishment of a required parameter is how I would achieve what you are describing. Then use the techniques above to create the message you want to use when there is no matching cust_id in the database.
I think that's what you're asking for, but am a bit uncertain.