لوگوی اسکیلیکس اسکیلیکس | Skilliks آکادمی و استودیوی ابزارهای AI تاریخ شمسی… --:--:--

Connect report data

آزاد تازه‌وارد تاییدشده امن

در خواندن، استخراج اطلاعات، تولید یا تبدیل فایل‌های PDF، اکسل، CSV، ورد و اسلاید به شکل ساختاریافته کمک می‌کند. (شامل ۹ گام عملی · سازگار با Claude Code و Cursor).

سازگاری با ابزارها: سازنده فقط میزبان‌های نام‌برده را تأیید کرده است. مشاهدهٔ جدول سازگاری

متن دستورالعمل (SKILL.md)

دسترسی کامل فعال است
---
name: data-sources
description: Connect JasperReports reports to JDBC, JavaBean, Map, CSV, XML, or JSON data; map fields, bind query parameters safely, add the required data modules, and manage connection and data-source lifecycle. Use for report input, query, field-mapping, or empty/consumed data-source problems, not for layout or styling of an already fixed data contract.
---

# Connect report data

## Establish the data contract

Identify the exact engine/Java versions, the data-source type, how the application fills the report, and who owns the connection. Record each field's name, Java type, nullability and source mapping, plus each parameter's type and whether it reaches a query. Use synthetic data; never request production credentials or connect to a production database to test a report.

## Workflow

1. Add the modules the source needs at the engine's exact version. In the tested 7.1.1 runtime, JDBC, JavaBean, Map, CSV and XML data sources are in core, but JSON and JSONQL (`net.sf.jasperreports.json.data`) need `jasperreports-json`, and `JRXmlDataSource` fails with `JaxenXPathExecuterFactory not found` unless `jasperreports-jaxen` is present. Verify module boundaries for other releases.
2. Map fields deliberately. JDBC fields match column labels; Map fields match keys; JavaBean fields use getter properties (or field descriptions when configured); CSV fields match header or configured column names; JSON and XML fields use the field description as a path relative to the selected records. Declare actual types such as `java.math.BigDecimal` and check conversions.
3. Treat nulls by source. A SQL `NULL`, absent Map key or JSON `null` arrives as null, but a blank CSV text column arrives as an empty String. Make no-data behavior explicit with `whenNoDataType` and null-safe expressions and totals.
4. Bind query values with `$P{...}`, which becomes a prepared-statement parameter. Use `$X{...}` for supported generated clauses such as collection `IN`. `$P!{...}` substitutes raw SQL text before the query runs: never pass user input to it. If an identifier such as a sort column must vary, map an application-side enum or allowlist to fixed SQL text and reject everything else before filling.
5. Give each fill its own cursor. A `JRDataSource` is consumed by the fill that reads it; reusing the same instance silently produces an empty report. Create a new data source per fill, reuse the filled `JasperPrint` for several exports of the same output, or use `JRRewindableDataSource.moveFirst()` only where its semantics fit. Subreports and dataset runs need their own data source expressions.
6. The caller owns a passed JDBC `Connection`: obtain it from the application's pool with least privilege, close it with try-with-resources, and do not share it across concurrent fills unless the driver and pool allow it. Keep query timeouts and fetch sizes in the application's normal configuration.

## Validate and deliver

Fill with the consuming project's engine and synthetic input covering ordinary, null and empty rows. Assert row counts and typed totals, fill twice to prove fresh cursors, and pass an injection-shaped string (for example `x' OR '1'='1`) to each bound parameter to show it is treated as data. Use an in-memory or disposable test database. Report the exact modules, commands and results; label any data-source behavior you could not execute as unverified.

## Sources

- [Data source samples](https://jasperreports.sourceforge.net/sample.reference/README.html)
- [API](https://jasperreports.sourceforge.net/api/index.html)
- [Release changes](https://github.com/Jaspersoft/jasperreports/blob/master/changes.txt)


— ‹guest · 2026-11-29› —

این نسخه با نشانه‌گذاری اختصاصی حساب شما نمایش داده می‌شود. برای نصب سریع، به تب نصب و راه‌اندازی بروید.

مهارت‌های مشابه و پیشنهادی

مشاهدهٔ همه ←
توسعه وب
✦ Pro

Web Application Testing

«Web Application Testing» همان چیزی است که وقتی سر توسعه وب کار می‌کنید کم است: دستیار شما با این مهارت «مدیریت هوشمند …

⚡ /webapp-testing SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
توسعه وب
✦ Pro

Web Artifacts Builder

این مهارت با نام «Web Artifacts Builder» تجربهٔ یک کاربلد در توسعه وب را کنار دستیار شما می‌گذارد؛ کافی است درخواست بده…

⚡ /web-artifacts-builder SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۱۹۸,۷۹۴
توسعه وب
✦ Pro

Docs Page Skill

برای کدها، APIها و تغییرات پروژه مستندات تمیز، README کاربردی و گزارش تغییرات (Changelog) قابل فهم می‌نویسد. (شامل ۱۹ گ…

⚡ /docs-page SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۶/۱۰۰ ★ ۱۰۹,۵۹۶
توسعه وب
✦ Pro

Canopy Part Title

قواعد و مراحل استاندارد توسعه وب را به دستیار هوش مصنوعی اضافه می‌کند تا خروجی یکدست بگیرید. (شامل ۱۱ گام عملی · سازگار…

⚡ /canopy-part-title SKILL.md
Claude / Claude CodeOpenAI Codex +۱
۹۶/۱۰۰ ★ ۹۰,۱۴۸
توسعه وب
✦ Pro

Vercel React Best Practices

در طراحی مسیرهای سرور، فرم‌ها، فرانت‌اند مدرن و ارتباط امن کلاینت و سرور طبق استانداردهای روز کمک می‌کند. (شامل ۷۱ گام …

⚡ /vercel-react-best-practices SKILL.md
MCP
۹۶/۱۰۰ ★ ۵۳,۹۱۶
توسعه وب
✦ Pro

Find Skills

این مهارت با نام «Find Skills» تجربهٔ یک کاربلد در توسعه وب را کنار دستیار شما می‌گذارد؛ کافی است درخواست بدهید تا «توس…

⚡ /find-skills SKILL.md
Claude / Claude Code
۹۶/۱۰۰ ★ ۴۰,۵۰۹