crystalpy-barno


Namecrystalpy-barno JSON
Version 1.1.13 PyPI version JSON
download
home_pagehttps://github.com/barno1994/crystalpy_barno
SummaryPython integration with crystal report
upload_time2024-09-10 11:50:02
maintainerbarno.baptu
docs_urlNone
authorbarno1994
requires_python>=3.6
licenseMIT
keywords crystal report python integration
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # crystalpy-barno

Python Integration with Crystal Report for Dynamic Output
=====================================================

## Features

* Connect Crystal Report with Python for dynamic output

## Installation

To install this project, run the following command:
```bash
pip install crystalpy-barno

```

## Usage

### Example Code
```python
import os
from datetime import datetime
from crystalpy_barno import *

# Set database connection details externally
DatabaseConnectionHelper.set_connection_details(
    server_name="SERVER_NAME",
    database_name="DB_NAME",
    user_id="USER",
    password="PASS"
)

voucher_no = "VOUCHER_NO"
pdf_dir = os.path.join(cwd, 'pdf')
pdf_dir_sales = os.path.join(pdf_dir, 'sales')
pdf_filepath_sale = os.path.join(pdf_dir_sales, f"{voucher_no}.pdf")

## Example data
params = {
    "source_no": "ENTRY_NO",
    "voucher_no": voucher_no,
    "le_code": "AJPL",
    "user_code": "NIM",
    "s_inc_mak": True,
    "s_emp_name": "emp_name_value",
    "le_name": "le_name_value",
    "wh_name": "wh_name_value",
    "wh1": "wh1_value",
    "wh2": "wh2_value",
    "whp1": "whp1_value",
    "whp2": "whp2_value",
    "s_print_hdr": True,
}

SaleSnippet.SaleMemo(
    report_filename=os.path.join(cwd, 'rpt/Sale_Memo_IncludeMaking.rpt'),
    output_path=pdf_filepath_sale,
    params=params
)
```

## Report Generation
This code generates a sales memo report using the SaleMemo function from the SaleSnippet module. The report is generated based on the provided parameters and saved as a PDF file in the specified output path.

## Database Connection
The database connection details are set externally using the DatabaseConnectionHelper class. You need to replace the placeholders with your actual database connection details.

## Report Templates
The report template used in this example is Sale_Memo_IncludeMaking.rpt. You can modify this template or use a different one to suit your reporting needs.

## Output Directory
The output directory for the generated report is specified using the pdf_dir variable. You can modify this to change the output directory.

## Contributing
Contributions are welcome! Please submit a pull request with your changes and a brief description of what you've added or fixed.

## License
This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/barno1994/crystalpy_barno",
    "name": "crystalpy-barno",
    "maintainer": "barno.baptu",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "barno.baptu@gmail.com",
    "keywords": "crystal report, python integration",
    "author": "barno1994",
    "author_email": "barno.baptu@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b3/60/bb4245617b3efbf83817a8179e4f3fb83f13fc578a34addf237dfb9ecd2c/crystalpy_barno-1.1.13.tar.gz",
    "platform": null,
    "description": "# crystalpy-barno\n\nPython Integration with Crystal Report for Dynamic Output\n=====================================================\n\n## Features\n\n* Connect Crystal Report with Python for dynamic output\n\n## Installation\n\nTo install this project, run the following command:\n```bash\npip install crystalpy-barno\n\n```\n\n## Usage\n\n### Example Code\n```python\nimport os\nfrom datetime import datetime\nfrom crystalpy_barno import *\n\n# Set database connection details externally\nDatabaseConnectionHelper.set_connection_details(\n    server_name=\"SERVER_NAME\",\n    database_name=\"DB_NAME\",\n    user_id=\"USER\",\n    password=\"PASS\"\n)\n\nvoucher_no = \"VOUCHER_NO\"\npdf_dir = os.path.join(cwd, 'pdf')\npdf_dir_sales = os.path.join(pdf_dir, 'sales')\npdf_filepath_sale = os.path.join(pdf_dir_sales, f\"{voucher_no}.pdf\")\n\n## Example data\nparams = {\n    \"source_no\": \"ENTRY_NO\",\n    \"voucher_no\": voucher_no,\n    \"le_code\": \"AJPL\",\n    \"user_code\": \"NIM\",\n    \"s_inc_mak\": True,\n    \"s_emp_name\": \"emp_name_value\",\n    \"le_name\": \"le_name_value\",\n    \"wh_name\": \"wh_name_value\",\n    \"wh1\": \"wh1_value\",\n    \"wh2\": \"wh2_value\",\n    \"whp1\": \"whp1_value\",\n    \"whp2\": \"whp2_value\",\n    \"s_print_hdr\": True,\n}\n\nSaleSnippet.SaleMemo(\n    report_filename=os.path.join(cwd, 'rpt/Sale_Memo_IncludeMaking.rpt'),\n    output_path=pdf_filepath_sale,\n    params=params\n)\n```\n\n## Report Generation\nThis code generates a sales memo report using the SaleMemo function from the SaleSnippet module. The report is generated based on the provided parameters and saved as a PDF file in the specified output path.\n\n## Database Connection\nThe database connection details are set externally using the DatabaseConnectionHelper class. You need to replace the placeholders with your actual database connection details.\n\n## Report Templates\nThe report template used in this example is Sale_Memo_IncludeMaking.rpt. You can modify this template or use a different one to suit your reporting needs.\n\n## Output Directory\nThe output directory for the generated report is specified using the pdf_dir variable. You can modify this to change the output directory.\n\n## Contributing\nContributions are welcome! Please submit a pull request with your changes and a brief description of what you've added or fixed.\n\n## License\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python integration with crystal report",
    "version": "1.1.13",
    "project_urls": {
        "Homepage": "https://github.com/barno1994/crystalpy_barno",
        "Issues": "https://github.com/barno1994/crystalpy_barno/issues"
    },
    "split_keywords": [
        "crystal report",
        " python integration"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "723a56eec587a4eb4fc7d1486757b66ccab8afea18a4f58969ae02e8f7f0e515",
                "md5": "81dc5603a6fdcd28e46f0c47c2cbac6a",
                "sha256": "62e4adc4e7a03e89dc0e1c55e964b5bcd8eff0009cbf79928c90a43cf2bcd20c"
            },
            "downloads": -1,
            "filename": "crystalpy_barno-1.1.13-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "81dc5603a6fdcd28e46f0c47c2cbac6a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 462959,
            "upload_time": "2024-09-10T11:50:01",
            "upload_time_iso_8601": "2024-09-10T11:50:01.094568Z",
            "url": "https://files.pythonhosted.org/packages/72/3a/56eec587a4eb4fc7d1486757b66ccab8afea18a4f58969ae02e8f7f0e515/crystalpy_barno-1.1.13-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b360bb4245617b3efbf83817a8179e4f3fb83f13fc578a34addf237dfb9ecd2c",
                "md5": "7b6a0a3ff5ee1daadebf681b4fdb0d3f",
                "sha256": "71c2529772385fc8bb6e48a15ad7d53d92c03dbcf914a8244bfa7bd3604a6efe"
            },
            "downloads": -1,
            "filename": "crystalpy_barno-1.1.13.tar.gz",
            "has_sig": false,
            "md5_digest": "7b6a0a3ff5ee1daadebf681b4fdb0d3f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 460118,
            "upload_time": "2024-09-10T11:50:02",
            "upload_time_iso_8601": "2024-09-10T11:50:02.464021Z",
            "url": "https://files.pythonhosted.org/packages/b3/60/bb4245617b3efbf83817a8179e4f3fb83f13fc578a34addf237dfb9ecd2c/crystalpy_barno-1.1.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 11:50:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "barno1994",
    "github_project": "crystalpy_barno",
    "github_not_found": true,
    "lcname": "crystalpy-barno"
}
        
Elapsed time: 0.32578s