I was working on an existing report, and I was trying to preview the report and choose the data adapter, but I do not get any options to choose one. It just says -- No Data Adapter --. And if I click on the down arrow for options, my only option is "Don't use a Data Adapter". I have several data sources setup on my local Studio which work fine when I create a new report. However once I've posted it on the server and then recall it to view, I have the same problem.
Using TIBCO Jaspersoft® Studio Professional 7.5.0 - Visual Designer for JasperReports 6.11.0. on a Mac.
2 Answers:
I was having what I think was the same issue and I fixed it by exporting the existing Data Adapter that wasn't showing up, then deleting it from my Data Adapters then importing the one I had exported earlier. I don't think I needed to delete the original, I probably could have just exported then imported and left the original, but I figured I'd just say exactly what I did to get it to work.
I had this problem too with one local Project: Adapters not showing up in Studio Prieview (only "Don't use any Data-Adapter")
after some playing arround in the Project Explorer
Cause:
- changing the "Report Repository Type" of one of my local Project-Folders (Rightclick Context Menu of Pr.-Folder in Project Explorer) to "JasperReports Server"
Solution:
- changing back to default: "Reset To Parent"
If you ever encounter another common adapter problem in studio preview:
- adapter is showing up in preview drop down menu but it is automaticaly switching back to "Don't use any Data-Adapter" when Running the Report
Cause 1:
- you may deleted this Report-Property in Report-JRXML: <property name="com.jaspersoft.studio.data.defaultdataadapter" value=""/>
Cause 2:
- you may deleted only the empty-string value of this Report-Property in Report-JRXML like so: <property name="com.jaspersoft.studio.data.defaultdataadapter"/>
Cause 3:
- some Co-Worker may changed the value to his local Adapter-Name in Report-JRXML: <property name="com.jaspersoft.studio.data.defaultdataadapter" value="not your adaptername">
if you write one of your adapters into com.jaspersoft.studio.data.defaultdataadapter you cannot choose another adapter in studio-preview anymore (keeps switching back to com.jaspersoft.studio.data.defaultdataadapter)
Okay it seems that existing reports that I pull down from the server to view and tweek gives me this problem. If I save it to my local report repo, then the adapters show up. It didn't always do that.